Summary of the invention
Because the above-mentioned defect of prior art, technical problem to be solved by this invention is to provide one can optimize robot ride ride comfort, improves robot wheel leg system to the control method of the leg-wheel robot of complicated landform surface respond.
For achieving the above object, the invention provides a kind of control method of leg-wheel robot, leg-wheel robot control system comprises central control chip, bottom controller, be arranged on robot car 3-axis acceleration sensor with it, be arranged on the pressure sensor of wheel-end, joint motor driving governor, wheel electrical machine driving governor, joint angles sensor and host computer, described pressure sensor is used for carrying out wheel end pressure to wheel and detects, described 3-axis acceleration sensor is for detecting car body obliqueness and exporting car body obliqueness feedback signal, described joint angles sensor is for detecting the inclination angle in each joint, the relative angle angle value in each joint and the body gravity of robot, described central control chip is bi-directionally connected by CAN and bottom controller, first output of described bottom controller connects the input of described joint motor driving governor, second output of described bottom controller connects the input of described wheel electrical machine driving governor, the first input end of described bottom controller connects the output of described pressure sensor, second input of described bottom controller connects the output of described joint angles sensor, and the input of described central control chip is connected with the output of described 3-axis acceleration sensor, described host computer has been bi-directionally connected the first radio receiving transmitting module, and described central control chip has been bi-directionally connected the second radio receiving transmitting module, carries out data interaction between described first radio receiving transmitting module and described second radio receiving transmitting module by wireless signal, it is characterized in that comprising the following steps:
Step one, central control chip initialize, setting car body obliqueness threshold value θ
0, wheel end pressure threshold value F
0with body gravity threshold value H
0;
Step 2, model selection; Entering pure rolling control program when selecting pure rolling pattern, performing step 3 when selecting restructural rolling mode;
Step 3, central control chip (1) gather car body obliqueness value θ and wheel side pressure force value F;
Step 4, judge whether car body obliqueness value θ is greater than car body obliqueness threshold value θ
0, as θ > θ
0time, perform next step, otherwise perform step 3;
Step 5, calculate current vehicle body weight center value H judge tilting of car body direction;
Setting vehicle body cross dip value is θ
y, vertical inclination angle of bodywork value is θ
x, work as θ
x-θ
yduring <0, car body is lateral inclination, performs step 5; Work as θ
x-θ
yduring >0, car body is fore-and-aft tilt, performs step 6;
Step 6, work as θ
yduring <0, car body is left-leaning, and setting robot off-front wheel side pressure force value is F
rf, off hind wheel side pressure force value is F
rh, right-hand wheel end pressure difference is | F
1|, | F
1|=F
rf-F
rh, when | F
1| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls right side wheels to be reduced; Work as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls left side wheel and raises; When | F
1| >F
0time, judge F
1positive and negative, work as F
1during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls off-front wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls off hind wheel to be reduced; Work as F
1during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls off hind wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls off-front wheel to be reduced;
Work as θ
yduring >0, car body is Right deviation, and setting robot the near front wheel side pressure force value is F
lf, left rear wheel side pressure force value is F
lh, left side wheels end pressure difference is | F
2|, | F
2|=F
lf-F
lh, when | F
2| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls left side wheel to be reduced; Work as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls right side wheels and raises; When | F
2| >F
0time, judge F
2positive and negative, work as F
2during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls the near front wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls left rear wheel to be reduced; Work as F
2during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls left rear wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls the near front wheel to be reduced;
Step 7, work as θ
xduring <0, car body is for leaning forward, and setting robot off hind wheel side pressure force value is F
rh, left rear wheel side pressure force value is F
lh, rear side is taken turns end pressure difference and is | F
3|, | F
3|=F
rh-F
lh, when | F
3| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls rear side wheel and raises; Work as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls front side wheel to be reduced; When | F
3| >F
0time, judge F
3positive and negative, work as F
3during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls off hind wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls off-front wheel to be reduced; Work as F
3during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls left rear wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls the near front wheel to be reduced;
Work as θ
xduring >0, car body is hypsokinesis, and setting robot off-front wheel side pressure force value is F
rf, the near front wheel side pressure force value is F
lf, front side is taken turns end pressure difference and is | F
4|, when | F
4| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls front side wheel and raises; Work as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls rear side wheel to be reduced; When | F
4| >F
0time, judge F
4positive and negative, work as F
4during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls off-front wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls off hind wheel to be reduced; Work as F
4during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip sends instruction to bottom controller, and bottom controller controls the near front wheel and raises, and works as H-H
0during <0, central control chip sends instruction to bottom controller, and bottom controller controls left rear wheel to be reduced.
Further, the step of described pure rolling control program is as follows:
Host computer transmission speed and steering order are to central control chip, central control chip sends instruction to bottom controller, bottom controller sends a signal to described joint motor driving governor and wheel electrical machine driving governor, and described joint motor driving governor and wheel electrical machine driving governor control corresponding motor action according to the signal received.
The invention has the beneficial effects as follows: the present invention detects car body obliqueness by the 3-axis acceleration sensor be arranged on vehicle body, export car body obliqueness feedback signal, center control chip controls leg exercise by the feedback signal received, make vehicle body recovery level, the present invention can allow wheel pressure be tending towards average, each load torque of taking turns is uniformly distributed, can to guarantee on rough ground all wheels can with earth surface, significantly lifting vehicle riding stability.
Detailed description of the invention
Below in conjunction with drawings and Examples, the invention will be further described:
As shown in Figure 1, a kind of leg-wheel robot control system, comprise central control chip 1, bottom controller 2, be arranged on robot car 3-axis acceleration sensor 3 with it, be arranged on the pressure sensor 4 of wheel-end, joint motor driving governor 5, wheel electrical machine driving governor 6, joint angles sensor 7 and host computer 8, described pressure sensor 4 detects for carrying out wheel end pressure to wheel, described 3-axis acceleration sensor 3 is for detecting car body obliqueness and exporting car body obliqueness feedback signal, described joint angles sensor 7 is for detecting the inclination angle in each joint, the relative angle angle value in each joint and the body gravity of robot, described central control chip 1 is bi-directionally connected by CAN and bottom controller 2, first output of described bottom controller 2 connects the input of described joint motor driving governor 5, second output of described bottom controller 2 connects the input of described wheel electrical machine driving governor 6, the first input end of described bottom controller 2 connects the output of described pressure sensor 4, second input of described bottom controller 2 connects the output of described joint angles sensor 7, and the input of described central control chip 1 is connected with the output of described 3-axis acceleration sensor 3, described host computer 8 has been bi-directionally connected the first radio receiving transmitting module 9, described central control chip 1 has been bi-directionally connected the second radio receiving transmitting module 10, carries out data interaction between described first radio receiving transmitting module 9 and described second radio receiving transmitting module 10 by wireless signal.
The present invention proposes modularity control mode by different level, modularity control controls four bottom controllers by a central control chip by external bus by different level, realize the coordinated movement of various economic factors of 4 wheel legs, be connected by CAN between central control chip with bottom controller and communicate, well solve the limited contradiction with high speed real-time response of Single Controller hardware resource, also greatly simplify the design of control circuit, the high reliability fault-tolerant communications mechanism of CAN also ensure that the high-stability requirement of system simultaneously.
In the present embodiment, central control chip 1 adopts the STM32VET6 type processor of ST company.STM32 microcontroller be based on one support real-time simulation and Embedded Trace 32 ARMv7CPU, and with the high speed flash storage that 32kB, 64kB, 128kB, 256kB and 512kB embed.Memory interface and unique accelerating structure of 128 bit widths enable 32 codes run under maximum clock speed.Have the strict application controlled can use 16 Thumb patterns that code size is decreased beyond 30% to code size, and property loss of energy is very little.Due to the built-in serial communication interface of wide region and the on-chip SRAM of 8/16/32kB, they are also very suitable for communication gate, protocol converter, software modem, speech recognition, low side imaging, for these application provide large-scale buffering area and powerful processing capacity.The external interrupt of the ADC on multiple 32 bit timing devices, 2 12 16 tunnels, 12 DAC, PWM passages, integrated CAN communication interface, 80 GPIO and nearly 9 edges or level triggers makes them be specially adapted to Industry Control Application and medical system.
As shown in Figure 2, a kind of control method of leg-wheel robot, comprises the following steps:
Step one, central control chip 1 initialize, setting car body obliqueness threshold value θ
0, wheel end pressure threshold value F
0with body gravity threshold value H
0;
Step 2, model selection; Performing step 3 when selecting pure rolling pattern, performing step 4 when selecting restructural rolling mode;
Step 3, host computer 8 transmission speed and steering order are to central control chip 1, central control chip 1 sends instruction to bottom controller 2, bottom controller 2 sends a signal to described joint motor driving governor 5 and wheel electrical machine driving governor 6, and described joint motor driving governor 5 and wheel electrical machine driving governor 6 control corresponding motor action according to the signal received;
Step 4, central control chip 1 gather car body obliqueness value θ and wheel side pressure force value F;
Step 5, judge whether car body obliqueness value θ is greater than car body obliqueness threshold value θ
0, as θ > θ
0time, perform next step, otherwise perform step 4;
Step 6, calculate current vehicle body weight center value H judge tilting of car body direction;
Setting vehicle body cross dip value is θ
y, vertical inclination angle of bodywork value is θ
x, work as θ
x-θ
yduring <0, car body is lateral inclination, performs step 7; Work as θ
x-θ
yduring >0, car body is fore-and-aft tilt, performs step 8;
Step 7, work as θ
yduring <0, car body is left-leaning, and setting robot off-front wheel side pressure force value is F
rf, off hind wheel side pressure force value is F
rh, right-hand wheel end pressure difference is | F
1|, | F
1|=F
rf-F
rh, when | F
1| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, bottom controller 2 sends a signal to corresponding joint motor driving governor 5 and wheel electrical machine driving governor 6, and these motor drive controller drive motors reduce to control right side wheels, then terminate; Work as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, bottom controller 2 sends a signal to corresponding joint motor driving governor 5 and wheel electrical machine driving governor 6, and these motor drive controller drive motors are raised to control left side wheel, then terminate; When | F
1| >F
0time, judge F
1positive and negative, work as F
1during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off-front wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off hind wheel to be reduced, and then terminates; Work as F
1during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off hind wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off-front wheel to be reduced, and then terminates.
Work as θ
yduring >0, car body is Right deviation, and setting robot the near front wheel side pressure force value is F
lf, left rear wheel side pressure force value is F
lh, left side wheels end pressure difference is | F
2|, | F
2|=F
lf-F
lh, when | F
2| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls left side wheel to be reduced, and then terminates; Work as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, bottom controller 2 sends a signal to corresponding joint motor driving governor 5 and wheel electrical machine driving governor 6, and these motor drive controller drive motors are raised to control right side wheels, then terminate; When | F
2| >F
0time, judge F
2positive and negative, work as F
2during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls the near front wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls left rear wheel to be reduced, and then terminates; Work as F
2during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls left rear wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls the near front wheel to be reduced, and then terminates;
Step 8, work as θ
xduring <0, car body is for leaning forward, and setting robot off hind wheel side pressure force value is F
rh, left rear wheel side pressure force value is F
lh, rear side is taken turns end pressure difference and is | F
3|, | F
3|=F
rh-F
lh, when | F
3| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls rear side wheel and raises, and then terminates; Work as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls front side wheel to be reduced, and then terminates; When | F
3| >F
0time, judge F
3positive and negative, work as F
3during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off hind wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off-front wheel to be reduced, and then terminates; Work as F
3during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls left rear wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls the near front wheel to be reduced, and then terminates;
Work as θ
xduring >0, car body is hypsokinesis, and setting robot off-front wheel side pressure force value is F
rf, the near front wheel side pressure force value is F
lf, front side is taken turns end pressure difference and is | F
4|, when | F
4| <F
0time, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls front side wheel and raises, and then terminates; Work as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls rear side wheel to be reduced, and then terminates; When | F
4| >F
0time, judge F
4positive and negative, work as F
4during >0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off-front wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls off hind wheel to be reduced, and then terminates; Work as F
4during <0, judge H-H
0whether be greater than 0, work as H-H
0during >0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls the near front wheel and raises, and then terminates, works as H-H
0during <0, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 controls left rear wheel to be reduced, and then terminates.
More than describe preferred embodiment of the present invention in detail.Should be appreciated that those of ordinary skill in the art just design according to the present invention can make many modifications and variations without the need to creative work.Therefore, all technical staff in the art, all should by the determined protection domain of claims under this invention's idea on the basis of existing technology by the available technical scheme of logical analysis, reasoning, or a limited experiment.