CN109375620B - Method and device for controlling steering wheel to return to original point by using single photoelectric sensor - Google Patents

Method and device for controlling steering wheel to return to original point by using single photoelectric sensor Download PDF

Info

Publication number
CN109375620B
CN109375620B CN201811190257.2A CN201811190257A CN109375620B CN 109375620 B CN109375620 B CN 109375620B CN 201811190257 A CN201811190257 A CN 201811190257A CN 109375620 B CN109375620 B CN 109375620B
Authority
CN
China
Prior art keywords
steering wheel
photoelectric sensor
controlling
time
recording
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811190257.2A
Other languages
Chinese (zh)
Other versions
CN109375620A (en
Inventor
王焜
缪欣呈
邵健锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Jintian International Intelligent Robot Co ltd
Original Assignee
Shenzhen Jintian International Intelligent Robot Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Jintian International Intelligent Robot Co ltd filed Critical Shenzhen Jintian International Intelligent Robot Co ltd
Priority to CN201811190257.2A priority Critical patent/CN109375620B/en
Publication of CN109375620A publication Critical patent/CN109375620A/en
Application granted granted Critical
Publication of CN109375620B publication Critical patent/CN109375620B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0223Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving speed control of the vehicle
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a method and a device for controlling a steering wheel to return to an original point by using a single photoelectric sensor, wherein the method comprises the following steps: when a system is powered on, the working state of a single photoelectric sensor is acquired; if the photoelectric sensor is in a normally open state, the rotation starting point of the steering wheel is positioned on the right side; in the left turning process of the steering wheel, when the photoelectric sensor suddenly changes from a normally open state to a normally closed state, recording the first time, stopping after the steering wheel continuously rotates for a section of displacement, and recording the second time; if the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side; in the process of the right turning of the steering wheel, when the photoelectric sensor suddenly changes from a normally closed state to a disconnected state, recording the first moment, stopping after the steering wheel continuously rotates for a section of displacement, and recording the second moment; calculating and feeding back the pulse number between the first time and the second time; and controlling the steering wheel to rotate according to the pulse number until the steering wheel returns to the original point position. The invention can find out the rotation origin of the steering wheel and is convenient to control the rotation angle of the steering wheel.

Description

Method and device for controlling steering wheel to return to original point by using single photoelectric sensor
Technical Field
The invention relates to a steering wheel rotation control technology, in particular to a method, a device, computer equipment and a storage medium for controlling a steering wheel to return to an original point by using a single photoelectric sensor.
Background
At present, a steering wheel is generally used for rotation control in intelligent equipment, and steering of the intelligent equipment is achieved through rotation of the steering wheel. The steering wheel realizes left steering or right steering through left rotation and right rotation. The rotation angle of the steering wheel in the prior art can be restored to the original point or the starting point through the elastic mechanism, the elastic mechanism is prone to causing inaccurate recovery precision when being used for multiple times, the original point of the steering wheel is difficult to find, and the control of the steering angle of the steering wheel is influenced.
In view of the above, it is necessary to provide further improvements to the current steering wheel rotation starting technology.
Disclosure of Invention
To solve at least one of the above problems, it is a primary object of the present invention to provide a method, an apparatus, a computer device, and a storage medium for controlling a steering wheel to return to an origin using a single photosensor.
In order to achieve the above purpose, the first technical solution adopted by the present invention is: there is provided a method of controlling a steering wheel to return to an origin using a single photosensor, comprising:
when a system is powered on, the working state of a single photoelectric sensor is acquired;
if the photoelectric sensor is in a normally open state, the rotation starting point of the steering wheel is located on the right side; if the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side;
in the process of leftward rotation of the steering wheel, when the photoelectric sensor suddenly changes from a normally open state to a normally closed state, recording the time as a first moment, and after the steering wheel continuously rotates leftward for a section of displacement, stopping and recording the time as a second moment; calculating and feeding back the pulse number between the first time and the second time; controlling the steering wheel to rotate rightwards according to the pulse number, and continuously controlling the steering wheel to rotate rightwards until the steering wheel returns to the original point position;
in the process of rightward rotation of the steering wheel, when the photoelectric sensor suddenly changes from a normally closed state to a disconnected state, recording the time as a first moment, and after the steering wheel continuously rotates rightwards for a certain displacement, stopping and recording the time as a second moment; calculating and feeding back the pulse number between the first time and the second time; and controlling the steering wheel to rotate leftwards according to the pulse number, and continuously controlling the steering wheel to rotate leftwards until the steering wheel returns to the original point position.
When the photoelectric sensor is in a normally open state, the rudder angle of the rudder wheel rotating leftwards is negative, and the right side of the rudder wheel is in the normally open state of the photoelectric sensor.
When the photoelectric sensor is in a normally closed state, a rudder angle of the steering wheel rotating to the right is positive, and the left side of the steering wheel is in the normally closed state of the photoelectric sensor.
Before acquiring the working state of the single photoelectric sensor, the method further comprises:
the position which is in contact with the photoelectric sensor or is close to the edge of the steering wheel is preset as the original point position of the steering wheel.
And the speed of the steering wheel rotating leftwards or rightwards is a preset rotating speed.
Wherein, the calculating and feeding back the number of pulses between the first time and the second time further comprises:
calculating and feeding back a second pulse number between the left or right rotation of the steering wheel and the first moment; and
and controlling the steering wheel to rotate left or right according to the second pulse number until the steering wheel returns to the starting position.
In order to achieve the purpose, the second technical scheme adopted by the invention is as follows: there is provided an apparatus for controlling a steering wheel to return to an origin using a single photosensor, comprising:
the acquisition module is used for acquiring the working state of a single photoelectric sensor when the system is powered on;
the determination module is used for indicating that the rotation starting point of the steering wheel is positioned on the right side when the photoelectric sensor is in a normally open state; when the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side;
the first recording module is used for recording a first moment when the photoelectric sensor suddenly changes from a normally open state to a normally closed state in the leftward rotation process of the steering wheel, and recording a second moment when the steering wheel continuously rotates leftward for a period of displacement and then stops;
the first feedback module is used for calculating and feeding back the pulse number between the first time and the second time;
the first control module is used for controlling the steering wheel to rotate rightwards according to the pulse number and continuously controlling the steering wheel to rotate rightwards until the steering wheel returns to the original point position;
the second recording module is used for recording a first moment when the photoelectric sensor suddenly changes from a normally closed state to a disconnected state in the process of rightwards rotating the steering wheel, stopping after the steering wheel continuously rotates rightwards for a certain displacement and recording a second moment;
the second feedback module is used for calculating and feeding back the pulse number between the first moment and the second moment;
and the second control module is used for controlling the steering wheel to rotate leftwards according to the pulse number and continuously controlling the steering wheel to rotate leftwards until the steering wheel returns to the original point position.
In order to achieve the above object, the third technical solution adopted by the present invention is: there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In order to achieve the above object, the fourth technical solution adopted by the present invention is: a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method.
The technical scheme of the invention mainly adopts the state of the photoelectric sensor to determine the rotation method of the rudder angle of the rudder wheel, and when the rudder wheel continues to rotate, the pulse number is utilized to record the rotation time of the rudder wheel along a certain direction, so that the state of the photoelectric sensor for half-cycle rotation of the rudder wheel is changed once when the origin of the rudder wheel is found from the position where the state of the photoelectric sensor can be changed according to the pulse number, and then the rudder wheel is returned to the origin after the rudder wheel is controlled to reversely rotate for half-cycle, therefore, the origin of the rudder wheel can be quickly found, and the control of the rotation rudder angle of the rudder wheel is convenient.
Drawings
FIG. 1 is a flowchart of a method for controlling a steering wheel to return to an origin using a single photo sensor according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for controlling a steering wheel to return to an origin by using a single photoelectric sensor according to another embodiment of the present invention;
FIG. 3 is a block diagram of an apparatus for controlling a steering wheel to return to an origin using a single photosensor according to an embodiment of the present invention;
fig. 4 is an internal structural diagram of a computer device according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that the description of the invention relating to "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying any relative importance or implicit indication of the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In addition, technical solutions between various embodiments may be combined with each other, but must be realized by a person skilled in the art, and when the technical solutions are contradictory or cannot be realized, such a combination should not be considered to exist, and is not within the protection scope of the present invention.
In the embodiment of the invention, the method for controlling the steering wheel to return to the original point by using the single photoelectric sensor is particularly applied to the intelligent robot. Specifically, the photoelectric sensor comprises a photoelectric switch and an induction ring, the photoelectric switch is arranged close to the outer edge of the steering wheel, the induction ring is arranged around the half circumference of the steering wheel on the outer edge of the steering wheel, and the induction ring is positioned on the left side of the steering wheel. When the photoelectric switch is positioned on the induction ring, the photoelectric sensor is in a normally closed state to generate a photoelectric signal; when the photoelectric switch is positioned outside the induction ring, the photoelectric sensor is in a normally open state and does not generate photoelectric signals. For a specific method for controlling the steering wheel to return to the origin, please refer to the following embodiments.
Referring to fig. 1, fig. 1 is a flowchart illustrating a method for controlling a steering wheel to return to an origin by using a single photo sensor according to an embodiment of the present invention. In an embodiment of the present invention, the method for controlling a steering wheel to return to an origin by using a single photoelectric sensor includes:
step S10, acquiring the working state of a single photoelectric sensor when the system is powered on;
step S20, if the photoelectric sensor is in a normally open state, the rotation starting point of the steering wheel is located on the right side; if the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side;
step S30, recording a first moment when the photoelectric sensor suddenly changes from a normally open state to a normally closed state in the leftward rotation process of the steering wheel, and recording a second moment when the steering wheel continuously rotates leftward for a period of displacement and then stops; calculating and feeding back the pulse number between the first time and the second time; controlling the steering wheel to rotate rightwards according to the pulse number, and continuously controlling the steering wheel to rotate rightwards until the steering wheel returns to the original point position;
step S40, recording a first moment when the photoelectric sensor suddenly changes from a normally closed state to an open state in the process of rightward rotation of the steering wheel, and recording a second moment when the steering wheel stops after continuously rotating rightward for a certain displacement; calculating and feeding back the pulse number between the first time and the second time; and controlling the steering wheel to rotate leftwards according to the pulse number, and continuously controlling the steering wheel to rotate leftwards until the steering wheel returns to the original point position.
When the system is powered on, the steering wheel may begin to rotate as controlled by the processor. In order to accurately control the steering wheel rotation angle, the origin of the steering wheel rotation needs to be found first. In practice, the initial position of the steering wheel during rotation often deviates from the original point, and it is difficult to directly control the rotation of the steering wheel so as to ensure the rotation angle of the steering wheel. In this embodiment, the rotation direction of the steering wheel can be determined by two states of the photoelectric sensor. It will be appreciated that the photo sensor is located differently from the steering wheel and that different abrupt changes in the state of the photo sensor indicate different directions of rotation of the steering wheel. Taking the scheme as an example, the original point of the outer edge of the steering wheel is set as the position of an inductive switch of the optical proximity electric sensor, the inductive ring of the photoelectric sensor is positioned on the left half cycle of the steering wheel, and when the outer edge of the steering wheel rotates to the left half cycle, the photoelectric sensor is normally closed; when the outer edge of the corresponding steering wheel rotates to the right half circumference, the photoelectric sensor is normally opened. When the steering wheel rotates, if the photoelectric sensor is in a normally open state, the rotation starting point of the steering wheel is positioned on the right side; if the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is located on the left side, and therefore the subsequent direction control for finding the origin of the steering wheel is facilitated. When the steering wheel rotates to the state mutation position of the photoelectric sensor, the first time is recorded, and when the steering wheel continues to move to the stop, the second time is recorded. The number of pulses between the first time and the second time can be calculated and fed back to the processor, and the rotational displacement between the first time and the second time can be obtained through calculation of the processor. The origin of the steering wheel can be found out through the rotation direction and the pulse number; if the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is located on the right side, and therefore the subsequent direction control for finding the origin of the steering wheel is facilitated. When the steering wheel rotates to the state mutation position of the photoelectric sensor, the first time is recorded, and when the steering wheel continues to move to the stop, the second time is recorded. The number of pulses between the first time and the second time can be calculated and fed back to the processor, and the rotational displacement between the first time and the second time can be obtained through calculation of the processor. The origin of the steering wheel can be found through the rotating direction and the pulse number so as to conveniently and accurately control the rotating angle of the steering wheel.
The technical scheme of the invention mainly adopts the state of the photoelectric sensor to determine the rotation method of the rudder angle of the rudder wheel, and when the rudder wheel continues to rotate, the pulse number is utilized to record the rotation time of the rudder wheel along a certain direction, so that the state of the photoelectric sensor for half-cycle rotation of the rudder wheel is changed once when the origin of the rudder wheel is found from the position where the state of the photoelectric sensor can be changed according to the pulse number, and then the rudder wheel is returned to the origin after the rudder wheel is controlled to reversely rotate for half-cycle, therefore, the origin of the rudder wheel can be quickly found, and the control of the rotation rudder angle of the rudder wheel is convenient.
Referring to fig. 2, fig. 2 is a flowchart illustrating a method for controlling a steering wheel to return to an origin using a single photo sensor according to another embodiment of the present invention. In a specific embodiment, when the photoelectric sensor is in a normally open state, a rudder angle of the rudder wheel rotating leftward is negative, and the right side of the rudder wheel is in the normally open state of the photoelectric sensor; when the photoelectric sensor is in a normally closed state, a rudder angle of the rudder wheel rotating to the right is positive, and the left side of the rudder wheel is in the normally closed state of the photoelectric sensor. In the embodiment, the direction of the steering angle of the steering wheel is set, so that the original position of the rotation starting point of the steering wheel, namely the original point of the steering wheel, can be conveniently found subsequently.
In the above embodiment, the speed of the steering wheel rotating leftwards or rightwards is the preset rotating speed. That is, the speed at which the rudder wheel rotates is constant for easy calculation. Considering a complex model, the rotating speed of the steering wheel can also be variable speed, and the steering wheel can drive the gear of the encoder to rotate when rotating, so that the rotating speed of the steering wheel can be encoded, and the rotating speed of the steering wheel can be accurately controlled.
In a specific embodiment, the calculating and feeding back the number of pulses between the first time and the second time further includes:
calculating and feeding back a second pulse number between the left or right rotation of the steering wheel and the first moment; and
and controlling the steering wheel to rotate left or right according to the second pulse number until the steering wheel returns to the starting position. In this embodiment, the steering wheel may be returned to the starting point position of the rotation of the steering wheel by the recorded second pulse number, and the deviation of the starting rotation of the steering wheel may be obtained by calculating the distance between the starting point position and the origin point position.
Referring to fig. 3, fig. 3 is a block diagram of an apparatus for controlling a steering wheel to return to an origin using a single photo sensor according to an embodiment of the present invention. In an embodiment of the present invention, the apparatus for controlling a steering wheel to return to an origin using a single photosensor includes:
the acquisition module 10 is used for acquiring the working state of a single photoelectric sensor when the system is powered on;
the determining module 20 is used for indicating that the rotation starting point of the steering wheel is positioned on the right side when the photoelectric sensor is in a normally open state; when the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side;
the first recording module 31 is used for recording a first moment when the photoelectric sensor suddenly changes from a normally open state to a normally closed state in the leftward rotation process of the steering wheel, and recording a second moment when the steering wheel continuously rotates leftward for a certain displacement and then stops;
a first feedback module 41, configured to calculate and feed back a number of pulses between the first time and the second time;
the first control module 51 is used for controlling the steering wheel to rotate rightwards according to the pulse number and continuously controlling the steering wheel to rotate rightwards until the steering wheel returns to the original point position;
the second recording module 32 is used for recording a first moment when the photoelectric sensor suddenly changes from a normally closed state to an open state in the process of rightward rotation of the steering wheel, and recording a second moment when the steering wheel continuously rotates rightward for a period of displacement and then stops;
a second feedback module 42, configured to calculate and feed back the number of pulses between the first time and the second time;
and the second control module 52 is used for controlling the steering wheel to rotate leftwards according to the pulse number and continuously controlling the steering wheel to rotate leftwards until the steering wheel returns to the original point position.
In this embodiment, the working state of a single photoelectric sensor can be acquired by the acquisition module 10, and when the steering wheel rotates, the determination module 20 is used to determine that the rotation starting point of the steering wheel is located on the right side when the photoelectric sensor is in a normally open state; when the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is determined to be positioned on the left side, so that the subsequent direction control for searching the origin of the steering wheel is facilitated. When the steering wheel rotates to the position of the state mutation of the photoelectric sensor, the first time can be recorded according to the first recording module 31, and the second time is recorded when the steering wheel continues to move to stop. The feedback module can calculate the pulse number between the first time and the second time, the pulse number can be fed back to the processor, and the rotation displacement of the first time and the second time can be obtained through calculation of the processor. The first control module 51 can find the origin of the steering wheel according to the rotating direction and the pulse number; when the photoelectric sensor is determined to be in a normally closed state, the rotation starting point of the steering wheel is determined to be located on the right side, and therefore the subsequent direction control for finding the origin of the steering wheel is facilitated. When the steering wheel rotates to the position of the state mutation of the photoelectric sensor, the first time can be recorded by the second recording module 32, and the second time is recorded when the steering wheel continues to move to stop. The number of pulses between the first time and the second time can be calculated by the second feedback module 42, and the number of pulses can be fed back to the processor, and the rotational displacement between the first time and the second time can be obtained through the calculation of the processor. The second control module 52 can find the origin of the steering wheel according to the rotation direction and the pulse number to facilitate the accurate control of the rotation angle of the steering wheel. It can be understood that the first recording module 31 and the second recording module 32 can be integrated to form a recording module, the first feedback module 41 and the second feedback module can be integrated to form a feedback module, and the first control module 51 and the second control module 52 can be integrated to form a control module, so as to improve the centralization degree of the modules, facilitate the miniaturization design, and reduce the cost.
Referring to fig. 4, fig. 4 is an internal structure diagram of a computer device according to an embodiment of the present invention. In one embodiment, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of controlling a steering wheel to return to an origin using a single photosensor.
Those skilled in the art will appreciate that the architecture shown in fig. 4 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above respective method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (9)

1. A method for controlling a steering wheel to return to an origin point by using a single photoelectric sensor, the method comprising:
when a system is powered on, the working state of a single photoelectric sensor is acquired;
if the photoelectric sensor is in a normally open state, the rotation starting point of the steering wheel is located on the right side;
if the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side;
in the process of leftward rotation of the steering wheel, when the photoelectric sensor suddenly changes from a normally open state to a normally closed state, recording the time as a first moment, and after the steering wheel continuously rotates leftward for a section of displacement, stopping and recording the time as a second moment;
calculating and feeding back the pulse number between the first time and the second time;
controlling the steering wheel to rotate rightwards according to the pulse number, and continuously controlling the steering wheel to rotate rightwards until the steering wheel returns to the original point position;
in the process of rightward rotation of the steering wheel, when the photoelectric sensor suddenly changes from a normally closed state to a normally open state, recording the time as a first moment, and after the steering wheel continuously rotates rightwards for a period of displacement, stopping and recording the time as a second moment;
calculating and feeding back the pulse number between the first time and the second time;
and controlling the steering wheel to rotate leftwards according to the pulse number, and continuously controlling the steering wheel to rotate leftwards until the steering wheel returns to the original point position.
2. The method for controlling a steering wheel to return to an original point by using a single photosensor according to claim 1, wherein when the photosensor is in a normally open state, a steering angle of the steering wheel rotating to the left is negative, and a normally open state of the photosensor is provided on a right side of the steering wheel.
3. The method for controlling a steering wheel to return to an original point by using a single photo sensor as claimed in claim 1, wherein when the photo sensor is in a normally closed state, a steering angle of the steering wheel rotating to the right is positive, and a left side of the steering wheel is in a normally closed state of the photo sensor.
4. The method for controlling a steering wheel to return to an origin point by using a single photoelectric sensor as claimed in claim 1, wherein before acquiring the operation state of the single photoelectric sensor, the method further comprises: the position which is in contact with the photoelectric sensor or is close to the edge of the steering wheel is preset as the original point position of the steering wheel.
5. The method for controlling a steering wheel to return to an origin using a single photosensor according to claim 1, wherein the speed of the steering wheel rotating left or right is a preset rotation speed.
6. The method for controlling a steering wheel to return to an origin using a single photosensor according to claim 5, wherein the calculating and feeding back the number of pulses between the first time and the second time further comprises: calculating and feeding back a second pulse number between the left or right rotation of the steering wheel and the first moment; and controlling the steering wheel to rotate left or right according to the second pulse number until the steering wheel returns to the starting point position.
7. An apparatus for controlling a steering wheel to return to an original point using a single photosensor, comprising:
the acquisition module is used for acquiring the working state of a single photoelectric sensor when the system is powered on;
the determination module is used for indicating that the rotation starting point of the steering wheel is positioned on the right side when the photoelectric sensor is in a normally open state;
when the photoelectric sensor is in a normally closed state, the rotation starting point of the steering wheel is positioned on the left side;
the first recording module is used for recording a first moment when the photoelectric sensor suddenly changes from a normally open state to a normally closed state in the leftward rotation process of the steering wheel, and recording a second moment when the steering wheel continuously rotates leftward for a period of displacement and then stops;
the first feedback module is used for calculating and feeding back the pulse number between the first time and the second time;
the first control module is used for controlling the steering wheel to rotate rightwards according to the pulse number and continuously controlling the steering wheel to rotate rightwards until the steering wheel returns to the original point position;
the second recording module is used for recording a first moment when the photoelectric sensor suddenly changes from a normally closed state to a normally open state in the process of rightward rotation of the steering wheel, and recording a second moment when the steering wheel continuously rotates rightwards for a period of displacement and then stops;
the second feedback module is used for calculating and feeding back the pulse number between the first moment and the second moment;
and the second control module is used for controlling the steering wheel to rotate leftwards according to the pulse number and continuously controlling the steering wheel to rotate leftwards until the steering wheel returns to the original point position.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 6 are implemented when the computer program is executed by the processor.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201811190257.2A 2018-10-12 2018-10-12 Method and device for controlling steering wheel to return to original point by using single photoelectric sensor Active CN109375620B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811190257.2A CN109375620B (en) 2018-10-12 2018-10-12 Method and device for controlling steering wheel to return to original point by using single photoelectric sensor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811190257.2A CN109375620B (en) 2018-10-12 2018-10-12 Method and device for controlling steering wheel to return to original point by using single photoelectric sensor

Publications (2)

Publication Number Publication Date
CN109375620A CN109375620A (en) 2019-02-22
CN109375620B true CN109375620B (en) 2020-06-02

Family

ID=65397548

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811190257.2A Active CN109375620B (en) 2018-10-12 2018-10-12 Method and device for controlling steering wheel to return to original point by using single photoelectric sensor

Country Status (1)

Country Link
CN (1) CN109375620B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113665776B (en) * 2021-08-03 2022-10-11 珠海云洲智能科技股份有限公司 Rudder angle control method, rudder angle control device and rudder angle control box

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101145035A (en) * 2006-09-15 2008-03-19 鸿富锦精密工业(深圳)有限公司 Machine platform movement control system and method
JP2008242908A (en) * 2007-03-28 2008-10-09 Matsushita Electric Ind Co Ltd Autonomous driving device and program for making the device function
CN103383213B (en) * 2013-06-11 2015-03-18 魏伯卿 Self-return direction control instrument for changing curvilinear flight of timekeeper rotating pointer
FR3016849B1 (en) * 2014-01-30 2016-02-19 Jtekt Europe Sas DETERMINING AN ANGULAR STEERING REFERENCE POSITION ASSISTED FROM FRONTS AMOUNTING AND DESCENDING FROM AN INDEX SIGNAL
KR101611194B1 (en) * 2014-04-04 2016-04-11 주식회사 와이즈오토모티브 Apparatus and method for peripheral image generation of vehicle
CN204380253U (en) * 2014-12-24 2015-06-10 宁波市鄞州杰特电子有限公司 A kind of perambulator turns to automatic return system
CN105320147A (en) * 2015-08-24 2016-02-10 铜陵学院 Single-wheel dual-core low-speed fire extinguishing robot servo control system
US10265859B2 (en) * 2016-02-09 2019-04-23 Cobalt Robotics Inc. Mobile robot with removable fabric panels
CN107441726B (en) * 2016-05-31 2020-02-07 北京小米移动软件有限公司 Method, device and system for controlling electric toy car
CN106125782B (en) * 2016-08-31 2018-12-04 合肥金星机电科技发展有限公司 Motor positioning correction method
US20180143634A1 (en) * 2016-11-22 2018-05-24 Left Hand Robotics, Inc. Autonomous path treatment systems and methods
CN107272694B (en) * 2017-07-18 2020-07-28 北京星航机电装备有限公司 Omnidirectional vehicle control system based on Mecanum wheel autonomous navigation
CN107482963B (en) * 2017-09-13 2019-12-03 北京立迈胜控制技术有限责任公司 A kind of zero position and restoration methods of motor swing offset

Also Published As

Publication number Publication date
CN109375620A (en) 2019-02-22

Similar Documents

Publication Publication Date Title
CA1067985A (en) Velocity command signal generating apparatus
US11662736B2 (en) Method and apparatus for controlling movement of autonomous mobile machine, machine, and storage medium
US10627805B2 (en) Method, device, and terminal device for servo movement smoothing
US11247336B2 (en) Point stabilization control method and apparatus for a mobile robot
WO2021004218A1 (en) Method and apparatus for controlling movement trajectory of machine tool, storage medium and processor
US20160279794A1 (en) Robot controller capable of performing fault diagnosis of robot
CN109703616B (en) Automatic driving angle control method, electronic device, and storage medium
CN110341786B (en) Disturbance feedforward compensation for position control in steering system
US11340614B2 (en) Robot and method and apparatus of controlling movement of transport robot
CN109375620B (en) Method and device for controlling steering wheel to return to original point by using single photoelectric sensor
CN109514041B (en) Vehicle body tracking method and crawling welding robot
JP2016097873A (en) Control device, control system, and control unit
CN111168688A (en) Robot action playback method and device
CN107065559A (en) A kind of industrial robot increment self-adaptation control method
CN107947495B (en) A kind of servo motor repositioning method
CN106773651B (en) Steering engine critical point locking method and device
CN109634273B (en) Following control method and device for movable equipment
CN114852171B (en) Vehicle, steering control method and device thereof, storage medium and terminal
CN209614191U (en) Die sinking position control assembly and die casting machine, injection molding machine with it
CN114772136B (en) AGV rotating tray goods correction method and device, AGV and storage medium
CN104702842A (en) Method for controlling rotating camera component for rotating and mobile terminal
CN115257730A (en) Vehicle control method, device, equipment and medium
CN109213109A (en) encoder resolution detection method
CN116353688A (en) Control method and device for active positive-feedback electric power steering system
CN113126604B (en) Robot obstacle avoidance method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant