Summary of the invention
Because the above-mentioned defective of prior art, technical problem to be solved by this invention provides a kind ofly can optimize the robot ride ride comfort, improves the control method based on wheel leg type robot control system of wheel leg system of robot to the complex-terrain surface respond.
For achieving the above object, the invention provides a kind of wheel leg type ROBOT CONTROL method, the wheel leg type robot control system comprises central control chip, bottom controller, be installed in the 3-axis acceleration sensor on the robot automobile body, be installed in the pressure sensor of wheel end, the joint motor driving governor, wheel electrical machine driving governor and joint angles sensor, described pressure sensor is used for that wheel is taken turns end pressure and detects, described 3-axis acceleration sensor is used to detect car body obliqueness and exports the car body obliqueness feedback signal, and described joint angles sensor is used to detect the inclination angle in each joint, the relative angle value in each joint and the body gravity of robot; Described central control chip is connected with bottom controller is two-way by the CAN bus; 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; It is characterized in that may further comprise the steps:
Car body obliqueness threshold value θ is set in step 1, central control chip initialization
0, wheel end pressure threshold value F
0With body gravity threshold value H
0
Step 2, central control chip are gathered car body obliqueness value θ and wheel end pressure value F;
Step 3, judge that whether car body obliqueness value θ is greater than car body obliqueness threshold value θ
0, work as θ〉and θ
0The time, carry out next procedure, otherwise repeated execution of steps three;
Step 4, the current body gravity value H of calculating also judge the tilting of car body direction;
Setting vehicle body cross dip value is θ
y, the vertical inclination angle of bodywork value is θ
x, work as θ
x-θ
y<0 o'clock, car body was a lateral inclination, execution in step five; work as θ
x-θ
y0 o'clock, car body is fore-and-aft tilt, execution in step six;
Step 5, work as θ
y<0 o'clock, car body was left-leaning, and setting robot off-front wheel end pressure value is F
Rf, off hind wheel end pressure value is F
Rh, right-hand wheel end pressure difference is | F
1|, | F
1|=F
Rf-F
Rh, when | F
1|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control right side wheels reduces; Work as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control left side wheel is raised; when | F
1| F
0The time, judge F
1Positive and negative, work as F
10 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control off-front wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control off hind wheel reduces; work as F
1, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control off hind wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control off-front wheel reduces;
Work as θ
y0 o'clock, car body is a Right deviation, setting robot the near front wheel end pressure value is F
Lf, left rear wheel end pressure value is F
Lh, left side wheel end pressure difference is | F
2|, | F
2|=F
Lf-F
Lh, when | F
2|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control left side wheel reduces; Work as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control right side wheels is raised; when | F
2| F
0The time, judge F
2Positive and negative, work as F
20 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control the near front wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control left rear wheel reduces; work as F
2, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control left rear wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control the near front wheel reduces;
Step 6, work as θ
x<0 o'clock, car body was for leaning forward, and setting robot off hind wheel end pressure value is F
Rh, left rear wheel end pressure value is F
Lh, back side wheel end pressure difference is | F
3|, | F
3|=F
Rh-F
Lh, when | F
3|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control rear side wheel is raised; Work as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control front side wheel reduces; when | F
3| F
0The time, judge F
3Positive and negative, work as F
30 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control off hind wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control off-front wheel reduces; work as F
3, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control left rear wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control the near front wheel reduces;
Work as θ
x0 o'clock, car body is hypsokinesis, setting robot off-front wheel end pressure value is F
Rf, the near front wheel end pressure value is F
Lf, preceding side wheel end pressure difference is | F
4|, when | F
4|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control front side wheel is raised; Work as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control rear side wheel reduces; when | F
4| F
0The time, judge F
4Positive and negative, work as F
40 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control off-front wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control off hind wheel reduces; work as F
4, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip sends instruction to bottom controller, and bottom controller control the near front wheel is raised, and works as H-H
0<0 o'clock, central control chip sent instruction to bottom controller, and bottom controller control left rear wheel reduces.
Further, described wheel leg type robot control system also comprises host computer, two-way first radio receiving transmitting module that is connected with of described host computer, two-way second radio receiving transmitting module that is connected with of described central control chip carries out data interaction by wireless signal between described first radio receiving transmitting module and described second radio receiving transmitting module;
Described control method also comprises the step by PC control wheel leg type robot motion;
Host computer transmission speed and steering order are given central control chip, central authorities' 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 are according to the corresponding motor action of signal controlling that receives.
The invention has the beneficial effects as follows: the present invention detects car body obliqueness by the 3-axis acceleration sensor that is installed on the vehicle body, output car body obliqueness feedback signal, the feedback signal control leg exercise of center control chip by receiving, make vehicle body recovery level, the present invention can allow the wheel pressure be tending towards average, make and respectively take turns load torque and evenly distribute, can guarantee that all wheels can both contact with ground on rugged road surface, promote vehicle run stability significantly.
The specific embodiment
The invention will be further described below in conjunction with drawings and Examples:
As shown in Figure 1, a kind of wheel leg type robot control system, comprise central control chip 1, bottom controller 2, be installed in the 3-axis acceleration sensor 3 on the robot automobile body, be installed in 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 is used for that wheel is taken turns end pressure and detects, described 3-axis acceleration sensor 3 is used to detect car body obliqueness and exports the car body obliqueness feedback signal, and described joint angles sensor 7 is used to detect the inclination angle in each joint, the relative angle value in each joint and the body gravity of robot; Described central control chip 1 is by CAN bus and 2 two-way connections of bottom controller; 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 two-way first radio receiving transmitting modules 9 that are connected with, described central control chip 1 two-way second radio receiving transmitting module 10 that is connected with carries out data interaction by wireless signal between described first radio receiving transmitting module 9 and described second radio receiving transmitting module 10.
The present invention proposes modularization control mode by different level, modularization control is controlled 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 the CAN bus between central authorities control chip and the bottom controller and communicate by letter, well solved the contradiction of single controller hardware resource-constrained and high-speed real-time response, also simplified simultaneously the design of control circuit greatly, the high reliability fault-tolerant communications mechanism of CAN bus has also guaranteed the high-stability requirement of system.
In the present embodiment, central control chip 1 adopts the STM32 VET6 type processor of ST company.The STM32 microcontroller be based on one support real-time simulation and embedded tracking 32 ARMv7 CPU, and have the high speed Flash memory that 32kB, 64kB, 128kB, 256kB and 512kB embed.The memory interface of 128 bit widths and unique accelerating structure can move 32 codes under maximum clock speed.Have the application of strict control can use 16 Thumb patterns that code size is reduced to code size and surpass 30%, and the loss of performance is very little.Because the serial communication interface of built-in wide region and the on-chip SRAM of 8/16/32kB, they also are 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.A plurality of 32 bit timing devices, 2 12 16 tunnel ADC, 12 DAC, PWM passage, integrated CAN communication interface, 80 GPIO and nearly the external interrupt of 9 edges or level triggers make them be specially adapted to Industry Control Application and medical system.
As shown in Figure 2, a kind of wheel leg type ROBOT CONTROL method may further comprise the steps:
Car body obliqueness threshold value θ is set in step 1,1 initialization of central control chip
0, wheel end pressure threshold value F
0With body gravity threshold value H
0
Step 2, model selection; Execution in step three when selecting the pure rolling pattern, execution in step four when selecting the restructural rolling mode;
Step 3, host computer 8 transmission speeds and steering order are given central control chip 1, central authorities' 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 are according to the corresponding motor action of signal controlling that receives;
Step 4, central control chip 1 are gathered car body obliqueness value θ and wheel end pressure value F;
Step 5, judge that whether car body obliqueness value θ is greater than car body obliqueness threshold value θ
0, work as θ〉and θ
0The time, carry out next procedure, otherwise repeated execution of steps five;
Step 6, the current body gravity value H of calculating also judge the tilting of car body direction;
Setting vehicle body cross dip value is θ
y, the vertical inclination angle of bodywork value is θ
x, work as θ
x-θ
y<0 o'clock, car body was a lateral inclination, execution in step seven; work as θ
x-θ
y0 o'clock, car body is fore-and-aft tilt, execution in step eight;
Step 7, work as θ
y<0 o'clock, car body was left-leaning, and setting robot off-front wheel end pressure value is F
Rf, off hind wheel end pressure value is F
Rh, right-hand wheel end pressure difference is | F
1|, | F
1|=F
Rf-F
Rh, when | F
1|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central authorities' 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 with the control right side wheels, finish then; Work as H-H
0<0 o'clock; central authorities' 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 with the control left side wheel, finish then; when | F
1| F
0The time, judge F
1Positive and negative, work as F
10 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control off-front wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control off hind wheels reduce, and finish then; work as F
1, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control off hind wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control off-front wheels reduce, and finish then.
Work as θ
y0 o'clock, car body is a Right deviation, setting robot the near front wheel end pressure value is F
Lf, left rear wheel end pressure value is F
Lh, left side wheel end pressure difference is | F
2|, | F
2|=F
Lf-F
Lh, when | F
2|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control left side wheel reduce, and finish then; Work as H-H
0<0 o'clock; central authorities' 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 with the control right side wheels, finish then; when | F
2| F
0The time, judge F
2Positive and negative, work as F
20 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control the near front wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control left rear wheels reduce, and finish then; work as F
2, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control left rear wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control the near front wheels reduce, and finish then;
Step 8, work as θ
x<0 o'clock, car body was for leaning forward, and setting robot off hind wheel end pressure value is F
Rh, left rear wheel end pressure value is F
Lh, back side wheel end pressure difference is | F
3|, | F
3|=F
Rh-F
Lh, when | F
3|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control rear side wheels are raised, and finish then; Work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control front side wheels reduce, and finish then; when | F
3| F
0The time, judge F
3Positive and negative, work as F
30 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control off hind wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control off-front wheels reduce, and finish then; work as F
3, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control left rear wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control the near front wheels reduce, and finish then;
Work as θ
x0 o'clock, car body is hypsokinesis, setting robot off-front wheel end pressure value is F
Rf, the near front wheel end pressure value is F
Lf, preceding side wheel end pressure difference is | F
4|, when | F
4|<F
0The time, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control front side wheels are raised, and finish then; Work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control rear side wheels reduce, and finish then; when | F
4| F
0The time, judge F
4Positive and negative, work as F
40 o'clock, judge H-H
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control off-front wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control off hind wheels reduce, and finish then; work as F
4, judge H-H at<0 o'clock
0Whether, work as H-H greater than 0
00 o'clock, central control chip 1 sends instruction to bottom controller 2, and bottom controller 2 control the near front wheels are raised, and finish then, work as H-H
0<0 o'clock, central control chip 1 sent instruction to bottom controller 2, and bottom controller 2 control left rear wheels reduce, and finish then.
More than describe preferred embodiment of the present invention in detail.Should be appreciated that those of ordinary skill in the art need not creative work and just can design according to the present invention make many modifications and variations.Therefore, all technical staff in the art all should be in the determined protection domain by 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.