Method and device for controlling vehicle movement based on rocker
Through the vehicle motion control method based on the rocker, the horizontal and vertical axis positions of the rocker are used to determine the acceleration and turning radius of the vehicle, which solves the complex problem of vehicle motion control in the existing technology and realizes simple and convenient vehicle operation.
Patent Information
- Application Number
- CN202410991978.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-23
- Publication Date
- 2024-10-01
AI Technical Summary
Existing vehicle motion control methods are complex and difficult to master, especially for novice drivers.
The rocker-based control method is used to determine the vehicle's acceleration and turning radius by determining the horizontal and vertical axis positions of the rocker in the set plane, thereby controlling the vehicle's movement direction and speed.
It simplifies the control method of vehicle movement, allowing the direction and speed of the vehicle to be determined no matter how the rocker swings, improving the driver's convenience and driving experience.
Smart Images

Figure CN118722652A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of vehicle control technology, and in particular to a method and device for controlling vehicle motion based on a joystick. Background Art
[0002] At present, the main ways to control the motion of a vehicle are the steering wheel, accelerator pedal and brake pedal. With the development of vehicle electronic control systems and new energy vehicles, new energy vehicles basically use wire-controlled accelerator pedals and electronic shifters. In addition, with the development of autonomous driving systems, wire-controlled braking and wire-controlled steering have also emerged. These vehicle motion control methods are relatively complex, and it is difficult for novices to control the vehicle. Summary of the invention
[0003] The present application provides a method and device for controlling vehicle motion based on a joystick to solve the problem of complex vehicle motion control methods.
[0004] In a first aspect, the present application provides a method for controlling vehicle motion based on a joystick, the method comprising:
[0005] When the rocker is swung in any direction, determining the horizontal axis position and the vertical axis position of the rocker in a set plane;
[0006] Determining the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and determining the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick, wherein the acceleration is used to indicate the forward and backward traveling direction and the magnitude of the acceleration of the vehicle, and the turning radius is used to indicate the left and right turning direction and the magnitude of the turning radius of the vehicle;
[0007] The vehicle motion is controlled based on the acceleration and the turning radius.
[0008] Optionally, the joystick is a dual-axis joystick, and when the joystick swings in any direction, determining the horizontal axis position and the vertical axis position of the joystick in a set plane includes:
[0009] Taking the bottom end of the dual-axis rocker as the origin, a two-dimensional rectangular coordinate system is established according to the horizontal axis and the vertical axis in a set plane perpendicular to the dual-axis rocker;
[0010] When the dual-axis joystick swings in any direction, a potentiometer is used to determine a first voltage in the horizontal axis direction and a second voltage in the vertical axis direction in the two-dimensional rectangular coordinate system;
[0011] The horizontal axis position of the dual-axis joystick in the setting plane is determined according to the first voltage, and the vertical axis position of the dual-axis joystick in the setting plane is determined according to the second voltage.
[0012] Optionally, determining the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the rocker, and determining the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the rocker comprises:
[0013] Acquire a first curve relationship and a second curve relationship, wherein, in the first curve relationship, the positive and negative position and magnitude of the longitudinal axis position of the joystick affect the positive and negative acceleration and magnitude of the acceleration of the vehicle respectively, and the positive and negative acceleration is used to indicate the forward and backward moving direction of the vehicle, and in the second curve relationship, the positive and negative position and magnitude of the transverse axis position of the joystick affect the positive and negative turning radius and magnitude of the turning radius respectively, and the positive and negative turning radius is used to indicate the left and right turning direction of the vehicle;
[0014] Determining the acceleration of the vehicle and the magnitude of the acceleration according to the first curve relationship and the longitudinal axis position of the rocker;
[0015] The positive and negative turning radius and the turning radius size of the vehicle are determined according to the second curve relationship and the horizontal axis position of the rocker.
[0016] Optionally, in the first curve relationship, when the joystick moves from the origin to the positive half axis of the longitudinal axis, the acceleration is positive and the value increases. The positive acceleration is used to indicate that the vehicle moves forward. When the joystick moves from the origin to the negative half axis of the longitudinal axis, the acceleration is negative and the value increases. The negative acceleration is used to indicate that the vehicle moves backward.
[0017] Optionally, if the longitudinal axis position of the joystick is within a first preset range around the origin, the acceleration remains zero.
[0018] Optionally, in the second curve relationship, when the joystick moves from the origin to the positive half axis of the horizontal axis, the turning radius is a positive value and the value increases. The positive turning radius is used to indicate that the vehicle turns right. When the joystick moves from the origin to the negative half axis of the horizontal axis, the turning radius is a negative value and the value increases. The negative turning radius is used to indicate that the vehicle turns left.
[0019] Optionally, if the horizontal axis position of the joystick is within a second preset range around the origin, the turning radius remains zero.
[0020] Optionally, controlling the vehicle movement according to the acceleration and the turning radius includes:
[0021] Analyzing the acceleration by a driving control system and a braking control system to determine a traction torque when the vehicle moves forward or backward;
[0022] Analyzing the turning radius through a steering control system to determine a turning angle when the vehicle turns left or right;
[0023] The movement of the vehicle is controlled according to the forward and backward moving direction, left and right turning direction, traction torque and turning angle of the vehicle.
[0024] Optionally, the method further includes: controlling the vehicle to enter a start-up state and switching vehicle gears according to operations of different buttons in a vehicle control panel.
[0025] In a second aspect, the present application provides a device for controlling vehicle motion based on a joystick, the device comprising:
[0026] A first determination module, used for determining the horizontal axis position and the vertical axis position of the rocker in a set plane when the rocker is swung in any direction;
[0027] a second determination module, configured to determine the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and to determine the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick, wherein the acceleration is used to indicate the forward and backward traveling direction and the magnitude of the acceleration of the vehicle, and the turning radius is used to indicate the left and right turning direction and the magnitude of the turning radius of the vehicle;
[0028] A control module is used to control the movement of the vehicle according to the acceleration and the turning radius.
[0029] In a third aspect, the present application provides an electronic device comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus.
[0030] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the method for controlling vehicle motion based on a joystick as described in any one of the above items of the present application.
[0031] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0032] When the joystick is swung in any direction, the forward and backward moving direction and acceleration of the vehicle can be determined according to one of the longitudinal axis position and the transverse axis position of the joystick, and the left and right turning direction and turning radius of the vehicle can be determined according to the other of the longitudinal axis position and the transverse axis position of the joystick. In this way, no matter how the joystick is swung, the movement direction and speed of the vehicle can be determined, thereby realizing the control of vehicle movement by using a simple joystick and simplifying the control method of vehicle movement. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0035] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.
[0036] Figure 1 A flow chart of a method for controlling vehicle motion based on a joystick provided in an embodiment of the present application;
[0037] Figure 2 A schematic top view of a joystick device provided in an embodiment of the present application;
[0038] Figure 3 A schematic diagram of a first curve relationship provided in an embodiment of the present application;
[0039] Figure 4 A schematic diagram of a second curve relationship provided in an embodiment of the present application;
[0040] Figure 5 A schematic diagram of a process of controlling a vehicle with a joystick provided in an embodiment of the present application;
[0041] Figure 6 A schematic diagram of a control panel provided in an embodiment of the present application;
[0042] Figure 7 A schematic diagram of the structure of a device for controlling vehicle movement based on a joystick provided in an embodiment of the present application;
[0043] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will describe the implementation methods of the present application with reference to the accompanying drawings and preferred embodiments. Those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific implementation methods, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be understood that the preferred embodiments are only for illustrating the present application, not for limiting the scope of protection of the present application.
[0045] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present application, and thus the drawings only show components related to the present application rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed at will, and the component layout may also be more complicated.
[0046] For ease of description, spatial relative terms may be used in the text to describe the relative position or movement of an element or feature as shown in the figure relative to another element or feature, such as "inside", "outside", "inner side", "outer side", "below", "below", "above", "above", "front", "back", etc. Such spatial relative terms are intended to include different orientations of the device in use or operation in addition to the orientation depicted in the figure. For example, if the device in the figure undergoes a position flip or a change in posture or a change in motion state, then these directional indications will also change accordingly, for example: an element described as "below other elements or features" or "below other elements or features" will subsequently be oriented as "above other elements or features" or "above other elements or features". Therefore, the example term "below..." can include both upper and lower orientations. The device can be oriented otherwise (rotated 90 degrees or in other directions) and the spatial relative descriptors used in the text are interpreted accordingly.
[0047] In order to solve the technical problem of complex vehicle motion control methods in the prior art, the present application embodiment provides a method for controlling vehicle motion based on a joystick, such as Figure 1 As shown, applied to a vehicle controller, the method comprises the following steps:
[0048] Step 101: When the joystick is swung in any direction, the horizontal axis position and the vertical axis position of the joystick in the set plane are determined.
[0049] Step 102: Determine the acceleration of the vehicle based on one of the longitudinal axis position and the lateral axis position of the joystick, and determine the turning radius of the vehicle based on the other of the longitudinal axis position and the lateral axis position of the joystick, wherein the acceleration is used to indicate the forward and backward travel direction of the vehicle and the magnitude of the acceleration, and the turning radius is used to indicate the left and right turning direction of the vehicle and the magnitude of the turning radius.
[0050] Step 103: Control the vehicle movement according to the acceleration and the turning radius.
[0051] The bottom end of the joystick is rotatably connected to the fixing base, and the joystick itself can swing 360 degrees, for example, to the front, rear, left front, right rear, etc.
[0052] Figure 2 is a top view of the joystick device, such as Figure 2 As shown, a two-dimensional rectangular coordinate system is set in the set plane, the horizontal axis position of the joystick can be displayed in the left and right direction, and the vertical axis position of the joystick can be displayed in the front and back direction. The position of the joystick can be represented by the horizontal axis position and the vertical axis position. The joystick can be swung in any direction to change its horizontal axis position and vertical axis position in the set plane.
[0053] The present application can determine the vehicle acceleration according to the longitudinal axis position of the joystick, and determine the vehicle turning radius according to the transverse axis position of the joystick, or determine the vehicle acceleration according to the transverse axis position of the joystick, and determine the vehicle turning radius according to the longitudinal axis position of the joystick. Both methods are acceptable. The embodiment of the present application selects the former for specific description, as follows.
[0054] The longitudinal axis position of the rocker is related to the acceleration of the vehicle. Acceleration is a vector with direction and magnitude. When the direction of the acceleration is the same as the direction of the force acting on the vehicle, the vehicle is in a forward state. When the direction of the acceleration is opposite to the direction of the force acting on the vehicle, the vehicle is in a backward state, and the speed of the vehicle is determined according to the magnitude of the acceleration. When the rocker changes its position on the longitudinal axis, at least one of the direction of the acceleration and the magnitude of the acceleration will also change accordingly. The direction of the acceleration is determined according to positive and negative in the embodiment of the present application. A positive value of the acceleration indicates that the direction of the acceleration is the same as the direction of the force acting on the vehicle, and a negative value of the acceleration indicates that the direction of the acceleration is opposite to the direction of the force acting on the vehicle.
[0055] The horizontal axis position of the joystick is related to the turning radius of the vehicle. The turning radius can indicate the turning direction and the turning radius size. The turning direction refers to whether the vehicle turns left or right, and the turning radius size is actually the turning angle of the front wheels of the vehicle. When the joystick changes its position on the horizontal axis, at least one of the turning direction and the turning radius size will also change accordingly.
[0056] The vehicle controller analyzes the acceleration and turning radius to determine the vehicle's forward and backward movement direction, left and right turning direction, acceleration magnitude and turning radius, thereby controlling the vehicle's movement.
[0057] In the present application, when the joystick is swung in any direction, the forward and backward movement direction and acceleration of the vehicle can be determined according to one of the longitudinal axis position and the transverse axis position of the joystick, and the left and right turning direction and turning radius of the vehicle can be determined according to the other of the longitudinal axis position and the transverse axis position of the joystick. In this way, no matter how the joystick is swung, the movement direction and speed of the vehicle can be determined, thereby realizing the control of the vehicle movement by using a simple joystick and simplifying the control method of the vehicle movement.
[0058] As an optional implementation, the joystick is a dual-axis joystick, and when the joystick swings in any direction, determining the horizontal axis position and the vertical axis position of the joystick in the set plane includes the following steps:
[0059] Step S11: taking the bottom end of the dual-axis joystick as the origin, establishing a two-dimensional rectangular coordinate system according to the horizontal axis and the vertical axis in a set plane perpendicular to the dual-axis joystick;
[0060] Step S12: when the dual-axis joystick swings in any direction, a potentiometer is used to determine a first voltage in the horizontal axis direction and a second voltage in the vertical axis direction in the two-dimensional rectangular coordinate system;
[0061] Step S13: determining the horizontal axis position of the dual-axis joystick in the set plane according to the first voltage, and determining the vertical axis position of the dual-axis joystick in the set plane according to the second voltage.
[0062] like Figure 2 As shown, the small circle part indicates the position of the bottom end of the joystick. The controller takes this position as the origin and establishes a two-dimensional rectangular coordinate system based on the horizontal and vertical axes in the plane perpendicular to the joystick itself. For example, if the joystick is set perpendicular to the ground, the two-dimensional rectangular coordinate system is located in the horizontal plane. If the joystick is set parallel to the ground, the two-dimensional rectangular coordinate system is located in the vertical plane. In the embodiment of the present application, the joystick is set perpendicular to the ground. The endpoints of the two-dimensional rectangular coordinate system are the farthest positions that the joystick can reach. Multiple endpoints constitute Figure 2 The joystick can swing to any position within the large circle.
[0063] The joystick in the embodiment of the present application is a dual-axis joystick, in which one axis represents the horizontal axis and the other axis represents the vertical axis. During the swinging process of the dual-axis joystick, as the resistance of the sliding rheostat in the horizontal and vertical directions changes, the potentiometer outputs a first voltage in the horizontal direction and a second voltage in the vertical direction respectively. Then, the horizontal axis position of the current joystick can be determined based on the correspondence between the preset first voltage and the horizontal axis position, and the vertical axis position of the current joystick can be determined based on the correspondence between the preset second voltage and the vertical axis position.
[0064] The sensor module of the dual-axis joystick is made of two potentiometers. One potentiometer detects the resistance change in the horizontal axis direction during the sliding of the joystick, and determines the output of the first voltage based on the resistance change. The range of the first voltage is 0 to 5v. The first voltage has a linear correspondence with the horizontal axis position. 0v and 5v represent the two farthest points on the horizontal axis, and 2.5v represents the origin on the horizontal axis. The principle of the other potentiometer is similar. The potentiometer detects the resistance change in the vertical axis direction during the sliding of the joystick, and determines the output of the second voltage based on the resistance change. The range of the second voltage is 0 to 5v. The second voltage has a linear correspondence with the vertical axis position. 0v and 5v represent the two farthest points on the vertical axis, and 2.5v represents the origin on the vertical axis.
[0065] After establishing a two-dimensional rectangular coordinate system, the present application uses a potentiometer in a dual-axis joystick to determine the voltage when the joystick swings in any direction, and determines the horizontal axis position and vertical axis position in the dual-axis joystick based on the corresponding relationship between voltage and position.
[0066] As an optional implementation, determining the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and determining the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick comprises the following steps:
[0067] Step S21: obtaining a first curve relationship and a second curve relationship, wherein in the first curve relationship, the positive and negative position and size of the longitudinal axis position of the joystick affect the positive and negative acceleration and the magnitude of the acceleration of the vehicle respectively, and the positive and negative acceleration is used to indicate the forward and backward moving direction of the vehicle; in the second curve relationship, the positive and negative position and size of the transverse axis position of the joystick affect the positive and negative turning radius and the magnitude of the turning radius respectively, and the positive and negative turning radius is used to indicate the left and right turning direction of the vehicle;
[0068] Step S22: determining the positive and negative acceleration and magnitude of the vehicle according to the first curve relationship and the longitudinal axis position of the rocker.
[0069] Step S23: determining the positive and negative turning radius and the size of the turning radius of the vehicle according to the second curve relationship and the horizontal axis position of the joystick.
[0070] The database pre-stores a first curve relationship related to the vertical axis position and a second curve relationship related to the horizontal axis position.
[0071] Figure 3 is a schematic diagram of the first curve relationship, in which the coordinate axes are the longitudinal axis position of the joystick and the acceleration. It can be seen that when the joystick moves from the origin to the positive semi-axis of the longitudinal axis, the acceleration is positive and the value increases. The positive acceleration is used to indicate that the vehicle moves forward, indicating that the vehicle moves forward when the joystick is pushed forward, and as the joystick push position continues to increase, the acceleration gradually increases. When the joystick push position reaches the maximum value, the vehicle will obtain the maximum acceleration, and when the joystick push position is at the minimum value, the vehicle will correspondingly obtain the minimum acceleration.
[0072] On the contrary, when the joystick moves from the origin to the negative half axis of the longitudinal axis, the acceleration is negative and the value increases. The negative acceleration is used to indicate that the vehicle moves backward, indicating that the vehicle moves backward when the joystick is pushed backward, and as the joystick push position continues to increase, the acceleration gradually increases. When the joystick push position reaches the maximum value, the vehicle will obtain the maximum acceleration, and when the joystick push position is at the minimum value, the vehicle will correspondingly obtain the minimum acceleration.
[0073] Since acceleration and longitudinal position are positively correlated, the above is reflected in Figure 3 In the figure, the positive or negative position of the joystick's longitudinal axis position affects the forward and backward travel direction of the vehicle, and the size of the joystick's longitudinal axis position affects the size of the vehicle's acceleration. Specifically, the positive direction of the longitudinal axis is set as the joystick's propulsion direction, and the negative direction of the longitudinal axis is set as the joystick's backward push direction. When the joystick moves in the positive direction of the longitudinal axis, the vehicle moves forward, and when the joystick moves in the negative direction of the longitudinal axis, the vehicle moves backward. The closer the joystick is to the origin, the smaller the acceleration, and the farther the joystick is from the origin, the greater the acceleration.
[0074] When the user is controlling the vehicle, if he wants the vehicle to move forward, he pushes the joystick forward. As the joystick is pushed forward, the vehicle speed increases continuously. If he wants to maintain a certain speed, he keeps the joystick in that position. If the user wants the vehicle to move backward, he pushes the joystick backward. The shorter the distance the joystick is pushed backward, the slower the vehicle moves backward.
[0075] Figure 4is a schematic diagram of the second curve relationship, in which the coordinate axes are the joystick horizontal axis position and the turning radius. It can be seen that when the joystick moves from the origin to the positive half axis of the horizontal axis, the turning radius is positive and the value increases. The positive turning radius is used to indicate that the vehicle turns right, indicating that the vehicle turns right when the joystick is pushed to the right, and as the joystick push position increases, the turning radius gradually increases. When the joystick push position reaches the maximum value, the vehicle will obtain the maximum turning radius, and when the joystick push position is at the minimum value, the vehicle will correspondingly obtain the minimum turning radius.
[0076] On the contrary, when the joystick moves from the origin to the negative half axis of the horizontal axis, the turning radius is negative and the value increases. The negative turning radius is used to indicate that the vehicle turns left, which means that the vehicle turns left when the joystick is pushed to the left, and the turning radius gradually increases as the joystick push position increases. When the joystick push position reaches the maximum value, the vehicle will obtain the maximum turning radius, and when the joystick push position is at the minimum value, the vehicle will correspondingly obtain the minimum turning radius.
[0077] Since the turning radius and the longitudinal axis position are positively correlated, the above content is reflected in Figure 4 In the figure, the positive and negative position of the joystick's horizontal axis position affects the vehicle's front, back, left, and right turning direction, and the size of the joystick's horizontal axis position affects the size of the vehicle's turning radius. Specifically, the positive direction of the horizontal axis is set to the direction in which the joystick pushes to the right, and the negative direction of the horizontal axis is set to the direction in which the joystick pushes to the left. If the joystick moves in the positive direction of the horizontal axis, the vehicle turns right, and if the joystick moves in the negative direction of the horizontal axis, the vehicle turns left. The closer the joystick is to the origin, the smaller the turning radius, and the farther the joystick is from the origin, the larger the turning radius.
[0078] When the user is controlling the vehicle, if he wants the vehicle to turn right, he pushes the joystick to the right. As the joystick is continuously pushed to the right, the vehicle's turning radius continues to increase. If he wants to maintain a certain turning radius, he keeps the joystick in that position. If the user wants the vehicle to turn left, he pushes the joystick to the left. The shorter the distance the joystick is pushed to the left, the smaller the radius of the vehicle's left turn.
[0079] In the first curve relationship and the second curve relationship, it can be a linear mapping or a curve graph. The diagram given in the embodiment of the present application is a linear mapping, but it is not limited to this. In addition, the corresponding curve relationship can also be determined according to different driving modes.
[0080] In this application, when the joystick changes position on the horizontal axis, the vehicle steering will be controlled; when the joystick changes position on the vertical axis, the vehicle acceleration and braking will be controlled. When decelerating and turning during driving, we only need to place the joystick to the left rear or right rear according to the size of the turning radius and the size of the acceleration, so that we can perform deceleration operation while achieving steering operation. Similarly, when the joystick is in the left front or right front, steering and acceleration operation can be achieved at the same time.
[0081] Furthermore, if the longitudinal axis position of the joystick is within a first preset range around the origin, the acceleration remains at zero; if the transverse axis position of the joystick is within a second preset range around the origin, the turning radius remains at zero. This can prevent the vehicle from moving when the user accidentally touches the joystick. Generally speaking, if the user accidentally touches the joystick with a light force, the joystick will shake slightly. By setting a limit value at the origin position, the corresponding acceleration signal and turning radius signal will only be issued when the movement stroke of the joystick reaches a certain value.
[0082] As an optional embodiment, controlling the vehicle movement according to the acceleration and turning radius includes: analyzing the acceleration through the drive control system and the braking control system to determine the traction torque when the vehicle moves forward or backward; analyzing the turning radius through the steering control system to determine the turning angle when the vehicle turns left or right; and controlling the vehicle movement according to the vehicle's forward and backward moving direction, left and right turning direction, traction torque and turning angle.
[0083] The present application adopts acceleration and turning radius as parameters for controlling the longitudinal motion and lateral motion of the vehicle respectively.
[0084] The acceleration is transmitted to the vehicle's drive control system and brake control system, which use relevant control algorithms to process the acceleration, determine whether the vehicle is in a forward or backward state based on the positive or negative value of the acceleration, and calculate the traction torque based on the magnitude of the acceleration. The method for calculating the traction torque is: calculate the magnitude of the force required for the current acceleration based on the magnitude of the acceleration and the weight of the vehicle, and then calculate the magnitude of the final force required based on the current wind resistance coefficient, tire friction coefficient, slope and other parameters, and finally calculate how much traction torque the drive control system needs to output in order to control the vehicle to perform corresponding acceleration or deceleration movements.
[0085] The turning radius is input into the vehicle's steering control system, which processes the turning radius according to relevant algorithms, determines whether the vehicle is turning east or west based on the positive or negative value of the turning radius, and uses the Ackerman angle calculation formula to calculate the size of the turning radius to obtain the turning angle of the front wheel. The vehicle is then controlled to turn based on the turning angle to achieve the vehicle's steering operation.
[0086] Figure 5 This is a flow chart of the joystick control of the vehicle in this application. When the joystick swings in any direction, the horizontal axis position and the vertical axis position of the joystick in the set plane are determined, the acceleration of the vehicle is determined according to the vertical axis position of the joystick, and the turning radius of the vehicle is determined according to the horizontal axis position of the joystick. The acceleration is input into the drive control system and the brake control system, and the acceleration is used for the longitudinal control of the vehicle, thereby determining the forward and backward travel direction and traction torque of the vehicle; the turning radius is input into the steering control system, and the turning radius is used for the lateral control of the vehicle, thereby determining the left and right turning direction and turning angle of the vehicle. This application uses a joystick driving device to control the motion of the vehicle, which can give full play to the advantages of the current wire control technology, and at the same time can enrich the way of driving the vehicle and increase the driver's driving experience and driving pleasure.
[0087] The vehicle control finally achieved by the embodiment of the present application includes:
[0088] Push the joystick forward and the vehicle moves forward. Push the joystick backward and the vehicle moves backward. As the joystick pushes farther, the vehicle moves faster.
[0089] When the joystick is placed at the right front, the vehicle turns to the right front. When the joystick is placed at the left front, the vehicle turns to the left front. When the vehicle is moving forward and turning, the turning angle can be determined according to the position of the joystick, and whether to accelerate or decelerate can be determined.
[0090] When the joystick is placed at the left rear, the vehicle turns to the left rear. When the joystick is placed at the right rear, the vehicle turns to the right rear. The vehicle generally needs to slow down when moving backward and turning, but it can also accelerate according to the actual situation.
[0091] As an optional implementation, the method further includes: a plurality of buttons are provided in the vehicle control panel, and the vehicle can be controlled to enter the starting state and realize the switching of the vehicle gear according to the operation of different buttons, such as Figure 6 As shown, the control panel includes a gear switch F (front, forward gear), N (neutral, neutral gear), R (reverse, reverse gear) button, two click buttons (button A, button B) and an enable button, and the control method includes the following contents.
[0092] After the vehicle is powered on with high voltage, press and hold the enable button, then tap button A three times to activate the joystick device, and long press button B to start the car successfully.
[0093] When the car enters F gear, the absolute value of the vehicle speed needs to be less than or equal to 5km / h, and then press the F gear switch while long pressing the enable button.
[0094] When the car enters R gear, the absolute value of the vehicle speed needs to be less than or equal to 5km / h, and then press the R gear switch while long pressing the enable button.
[0095] When the car enters N gear, the absolute value of the vehicle speed needs to be less than or equal to 5km / h, and then press the N gear switch while long pressing the enable button.
[0096] When the car enters P gear, when the absolute value of the vehicle speed is less than or equal to 5km / h, just press and hold button A.
[0097] Based on the same technical concept, the present application provides a device for controlling vehicle movement based on a rocker, such as Figure 7 As shown, the device comprises:
[0098] The first determination module 701 is used to determine the horizontal axis position and the vertical axis position of the joystick in a set plane when the joystick is swung in any direction;
[0099] A second determination module 702 is used to determine the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and to determine the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick, wherein the acceleration is used to indicate the forward and backward moving direction of the vehicle and the magnitude of the acceleration, and the turning radius is used to indicate the left and right turning direction of the vehicle and the magnitude of the turning radius;
[0100] The control module 703 is used to control the vehicle movement according to the acceleration and the turning radius.
[0101] Optionally, the joystick is a dual-axis joystick, and the first determining module 701 is used for:
[0102] Taking the bottom end of the dual-axis joystick as the origin, a two-dimensional rectangular coordinate system is established according to the horizontal axis and the vertical axis in a set plane perpendicular to the dual-axis joystick;
[0103] When the dual-axis joystick swings in any direction, a potentiometer is used to determine a first voltage in the horizontal axis direction and a second voltage in the vertical axis direction in a two-dimensional rectangular coordinate system;
[0104] The horizontal axis position of the dual-axis joystick in the set plane is determined according to the first voltage, and the vertical axis position of the dual-axis joystick in the set plane is determined according to the second voltage.
[0105] Optionally, the second determining module 702 is used to:
[0106] Obtaining a first curve relationship and a second curve relationship, wherein in the first curve relationship, the positive and negative position and magnitude of the longitudinal axis position of the joystick affect the positive and negative acceleration and magnitude of the acceleration of the vehicle respectively, and the positive and negative acceleration is used to indicate the forward and backward moving direction of the vehicle; in the second curve relationship, the positive and negative position and magnitude of the transverse axis position of the joystick affect the positive and negative turning radius and magnitude of the turning radius respectively, and the positive and negative turning radius is used to indicate the left and right turning direction of the vehicle;
[0107] Determining the positive and negative acceleration and the magnitude of the acceleration of the vehicle according to the first curve relationship and the longitudinal axis position of the rocker;
[0108] The positive and negative turning radius and the size of the turning radius of the vehicle are determined according to the second curve relationship and the horizontal axis position of the joystick.
[0109] Optionally, in the first curve relationship, when the joystick moves from the origin to the positive half axis of the longitudinal axis, the acceleration is positive and the value increases. The positive acceleration is used to indicate that the vehicle moves forward. When the joystick moves from the origin to the negative half axis of the longitudinal axis, the acceleration is negative and the value increases. The negative acceleration is used to indicate that the vehicle moves backward.
[0110] Optionally, if the longitudinal axis position of the joystick is within a first preset range around the origin, the acceleration remains zero.
[0111] Optionally, in the second curve relationship, when the joystick moves from the origin to the positive half axis of the horizontal axis, the turning radius is positive and the value increases. The positive turning radius is used to indicate that the vehicle turns right. When the joystick moves from the origin to the negative half axis of the horizontal axis, the turning radius is negative and the value increases. The negative turning radius is used to indicate that the vehicle turns left.
[0112] Optionally, if the horizontal axis position of the joystick is within a second preset range around the origin, the turning radius remains zero.
[0113] Optionally, the control module 703 is used to:
[0114] The acceleration is analyzed by the drive control system and the brake control system to determine the traction torque when the vehicle moves forward or backward;
[0115] The turning radius is analyzed by the steering control system to determine the turning angle of the vehicle when turning left or right;
[0116] The vehicle movement is controlled according to the vehicle's forward and backward movement direction, left and right turning direction, traction torque and turning angle.
[0117] Optionally, the device is also used to control the vehicle to enter a starting state and switch vehicle gears according to the operation of different buttons in the vehicle control panel.
[0118] like Figure 8 As shown, an embodiment of the present application provides an electronic device, including a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0119] The memory 803 is used to store computer programs.
[0120] In one embodiment of the present application, the processor 801 is used to execute the program stored in the memory 803 to implement the method for controlling vehicle motion based on a joystick provided by any of the above method embodiments, including the following contents:
[0121] When the joystick is swung in any direction, the horizontal axis position and the vertical axis position of the joystick in the set plane are determined;
[0122] Determine the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and determine the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick, wherein the acceleration is used to indicate the forward and backward traveling direction and the magnitude of the acceleration of the vehicle, and the turning radius is used to indicate the left and right turning direction and the magnitude of the turning radius of the vehicle;
[0123] Control vehicle motion based on acceleration and turning radius.
[0124] Optionally, the joystick is a dual-axis joystick, and when the joystick swings in any direction, determining the horizontal axis position and the vertical axis position of the joystick in a set plane includes:
[0125] Taking the bottom end of the dual-axis joystick as the origin, a two-dimensional rectangular coordinate system is established according to the horizontal axis and the vertical axis in a set plane perpendicular to the dual-axis joystick;
[0126] When the dual-axis joystick swings in any direction, a potentiometer is used to determine a first voltage in the horizontal axis direction and a second voltage in the vertical axis direction in a two-dimensional rectangular coordinate system;
[0127] The horizontal axis position of the dual-axis joystick in the set plane is determined according to the first voltage, and the vertical axis position of the dual-axis joystick in the set plane is determined according to the second voltage.
[0128] Optionally, determining the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and determining the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick comprises:
[0129] Obtaining a first curve relationship and a second curve relationship, wherein in the first curve relationship, the positive and negative position and magnitude of the longitudinal axis position of the joystick affect the positive and negative acceleration and magnitude of the acceleration of the vehicle respectively, and the positive and negative acceleration is used to indicate the forward and backward moving direction of the vehicle; in the second curve relationship, the positive and negative position and magnitude of the transverse axis position of the joystick affect the positive and negative turning radius and magnitude of the turning radius respectively, and the positive and negative turning radius is used to indicate the left and right turning direction of the vehicle;
[0130] Determining the positive and negative acceleration and the magnitude of the acceleration of the vehicle according to the first curve relationship and the longitudinal axis position of the rocker;
[0131] The positive and negative turning radius and the size of the turning radius of the vehicle are determined according to the second curve relationship and the horizontal axis position of the joystick.
[0132] Optionally, in the first curve relationship, when the joystick moves from the origin to the positive half axis of the longitudinal axis, the acceleration is positive and the value increases. The positive acceleration is used to indicate that the vehicle moves forward. When the joystick moves from the origin to the negative half axis of the longitudinal axis, the acceleration is negative and the value increases. The negative acceleration is used to indicate that the vehicle moves backward.
[0133] Optionally, if the longitudinal axis position of the joystick is within a first preset range around the origin, the acceleration remains zero.
[0134] Optionally, in the second curve relationship, when the joystick moves from the origin to the positive half axis of the horizontal axis, the turning radius is positive and the value increases. The positive turning radius is used to indicate that the vehicle turns right. When the joystick moves from the origin to the negative half axis of the horizontal axis, the turning radius is negative and the value increases. The negative turning radius is used to indicate that the vehicle turns left.
[0135] Optionally, if the horizontal axis position of the joystick is within a second preset range around the origin, the turning radius remains zero.
[0136] Optionally, controlling the vehicle movement according to the acceleration and the turning radius includes:
[0137] The acceleration is analyzed by the drive control system and the brake control system to determine the traction torque when the vehicle moves forward or backward;
[0138] The turning radius is analyzed by the steering control system to determine the turning angle of the vehicle when turning left or right;
[0139] The vehicle movement is controlled according to the vehicle's forward and backward movement direction, left and right turning direction, traction torque and turning angle.
[0140] Optionally, the method further includes: controlling the vehicle to enter a start-up state and switching vehicle gears according to operations of different buttons in a vehicle control panel.
[0141] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for controlling vehicle motion based on a joystick as provided in any of the aforementioned method embodiments are implemented.
[0142] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0143] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0144] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive and therefore specify the presence of stated features, steps, operations, elements and / or parts, but do not exclude the presence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0145] The above is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features applied herein.
Claims
1. A method for controlling vehicle motion based on a joystick, characterized in that: The method comprises: When the rocker is swung in any direction, determining the horizontal axis position and the vertical axis position of the rocker in a set plane; Determining the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and determining the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick, wherein the acceleration is used to indicate the forward and backward traveling direction and the magnitude of the acceleration of the vehicle, and the turning radius is used to indicate the left and right turning direction and the magnitude of the turning radius of the vehicle; The vehicle motion is controlled based on the acceleration and the turning radius.
2. The method according to claim 1, characterized in that The joystick is a dual-axis joystick. When the joystick swings in any direction, determining the horizontal axis position and the vertical axis position of the joystick in a set plane includes: Taking the bottom end of the dual-axis rocker as the origin, a two-dimensional rectangular coordinate system is established according to the horizontal axis and the vertical axis in a set plane perpendicular to the dual-axis rocker; When the dual-axis joystick swings in any direction, a potentiometer is used to determine a first voltage in the horizontal axis direction and a second voltage in the vertical axis direction in the two-dimensional rectangular coordinate system; The horizontal axis position of the dual-axis joystick in the setting plane is determined according to the first voltage, and the vertical axis position of the dual-axis joystick in the setting plane is determined according to the second voltage.
3. The method according to claim 1, characterized in that Determining the acceleration of the vehicle according to one of the longitudinal axis position and the lateral axis position of the rocker, and determining the turning radius of the vehicle according to the other of the longitudinal axis position and the lateral axis position of the rocker comprises: Acquire a first curve relationship and a second curve relationship, wherein, in the first curve relationship, the positive and negative position and magnitude of the longitudinal axis position of the joystick affect the positive and negative acceleration and magnitude of the acceleration of the vehicle respectively, and the positive and negative acceleration is used to indicate the forward and backward moving direction of the vehicle, and in the second curve relationship, the positive and negative position and magnitude of the transverse axis position of the joystick affect the positive and negative turning radius and magnitude of the turning radius respectively, and the positive and negative turning radius is used to indicate the left and right turning direction of the vehicle; Determining the acceleration of the vehicle and the magnitude of the acceleration according to the first curve relationship and the longitudinal axis position of the rocker; The positive and negative turning radius and the turning radius size of the vehicle are determined according to the second curve relationship and the horizontal axis position of the rocker.
4. The method according to claim 3, characterized in that In the first curve relationship, when the joystick moves from the origin to the positive half axis of the longitudinal axis, the acceleration is positive and the value increases. The positive acceleration is used to indicate that the vehicle moves forward. When the joystick moves from the origin to the negative half axis of the longitudinal axis, the acceleration is negative and the value increases. The negative acceleration is used to indicate that the vehicle moves backward.
5. The method according to claim 4, characterized in that If the longitudinal axis position of the joystick is within a first preset range around the origin, the acceleration remains zero.
6. The method according to claim 3, characterized in that In the second curve relationship, when the joystick moves from the origin to the positive half axis of the horizontal axis, the turning radius is a positive value and the value increases. The positive turning radius is used to indicate that the vehicle turns right. When the joystick moves from the origin to the negative half axis of the horizontal axis, the turning radius is a negative value and the value increases. The negative turning radius is used to indicate that the vehicle turns left.
7. The method according to claim 6, characterized in that If the horizontal axis position of the joystick is within a second preset range around the origin, the turning radius remains zero.
8. The method according to claim 1, characterized in that Controlling the vehicle motion according to the acceleration and the turning radius includes: Analyzing the acceleration by a driving control system and a braking control system to determine a traction torque when the vehicle moves forward or backward; Analyzing the turning radius through a steering control system to determine a turning angle when the vehicle turns left or right; The movement of the vehicle is controlled according to the forward and backward moving direction, left and right turning direction, traction torque and turning angle of the vehicle.
9. The method according to claim 1, characterized in that: The method further includes: controlling the vehicle to enter a start state and switching the vehicle gear positions according to the operation of different buttons in the vehicle control panel.
10. A device for controlling vehicle movement based on a joystick, characterized in that: The device comprises: A first determination module, used for determining the horizontal axis position and the vertical axis position of the rocker in a set plane when the rocker is swung in any direction; a second determination module, configured to determine the acceleration of the vehicle according to one of the longitudinal axis position and the transverse axis position of the joystick, and to determine the turning radius of the vehicle according to the other of the longitudinal axis position and the transverse axis position of the joystick, wherein the acceleration is used to indicate the forward and backward traveling direction and the magnitude of the acceleration of the vehicle, and the turning radius is used to indicate the left and right turning direction and the magnitude of the turning radius of the vehicle; A control module is used to control the movement of the vehicle according to the acceleration and the turning radius.
11. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-9 when executing a program stored in a memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
