I pulled the following from a 2004 thread:
"The method you are after is the same as that used by robots for obstacle avoidance. It is called "vector forces". Draw your robot's outline on a peice of paper and consider the forces that your motor/wheels apply individually. Draw these as vectors. Then do the same for your controller.
It now becomes a case of trigonometry. (it's that funny stuff that didn't make sense at school involving triangles and degrees). You will then end up with a set of equations that involve trig functions and numbers between 0 & 1.
The poor old PICAXE can't do any of that, so back to the drawing board.
Start building up a set of values in a grid as you have already suggested.
You only actually need 3 or 4 steps for good control.
Break each stick position into areas that contribute an amount of demand for each motor. For example, pushing the stick 1/4 to the right (no forward or back component) needs to add 1/4 drive to the left motor and subtract 1/4 drive from the right. Robot turns right on the spot at 1/4 speed. Then move the stick half way forward as well as the 1/4 right. Forward/backward movements adds equal amounts to each motor so now add half demand to each motor. This results in the left motor having +1/4 from the left right stick plus +1/2 from the forward/back stick = +3/4. The right motor has -1/4 from the left/right stick plus +1/2 from the forward/back stick = +1/4. Net result is move forward whilst turning to the right.
Now you know what to do with respect to motor speed demand for each stick position it is a question of converting to PICAXE code.
Be aware that positions such as FULL forward and FULL left can result in more than 100% demand. You need to put limits on the calculations.
The method I have used is to have a seperate PICAXE for each drive. Both channels receive the radio signal and present the resultant demand as a pulsout to a regular RC speed controller. This allows me to include sensor inputs as well so that I can switch between RC and fully automomous or even combinations."
I made a spreadsheet of the upper right quadrant of the stick movement and got the values below. My interpretation of the above indicates a problem with my spreadsheet values. Can someone clarify my understanding please
L=left mtr R=right mtr
F/W STICK POSITION
1.00 | L+1.25 R+.75 | L+1.5 R+.5 | L+1.75 R+.25 | L+2 R0
0.75 | L+1 R+.5 | L+1.25 R+.25 | L+1.5 R0 | L+1.75 R-.25
0.50 | L+.75 R+.25 | L+1 R0 | L+1.25 R-.25 | L+1.5 R-.5
0.25 | L+.5 R0 | L+.75 R-.25 | L+1 R-.5 | L+1.25 R-.75
0.00 0.25 | 0.5 | 0.75 | 1.00 L/R STICK POSITION
| L+.25 R-.25 | L+.5 R-.5 | L+.75 R-.75 | L+1 R-1 TURNS IN PLACE RIGHT
Sorry about the primitive text usage, I don't really know what would have been more appropriate here and probably don't know how to "create" that
"The method you are after is the same as that used by robots for obstacle avoidance. It is called "vector forces". Draw your robot's outline on a peice of paper and consider the forces that your motor/wheels apply individually. Draw these as vectors. Then do the same for your controller.
It now becomes a case of trigonometry. (it's that funny stuff that didn't make sense at school involving triangles and degrees). You will then end up with a set of equations that involve trig functions and numbers between 0 & 1.
The poor old PICAXE can't do any of that, so back to the drawing board.
Start building up a set of values in a grid as you have already suggested.
You only actually need 3 or 4 steps for good control.
Break each stick position into areas that contribute an amount of demand for each motor. For example, pushing the stick 1/4 to the right (no forward or back component) needs to add 1/4 drive to the left motor and subtract 1/4 drive from the right. Robot turns right on the spot at 1/4 speed. Then move the stick half way forward as well as the 1/4 right. Forward/backward movements adds equal amounts to each motor so now add half demand to each motor. This results in the left motor having +1/4 from the left right stick plus +1/2 from the forward/back stick = +3/4. The right motor has -1/4 from the left/right stick plus +1/2 from the forward/back stick = +1/4. Net result is move forward whilst turning to the right.
Now you know what to do with respect to motor speed demand for each stick position it is a question of converting to PICAXE code.
Be aware that positions such as FULL forward and FULL left can result in more than 100% demand. You need to put limits on the calculations.
The method I have used is to have a seperate PICAXE for each drive. Both channels receive the radio signal and present the resultant demand as a pulsout to a regular RC speed controller. This allows me to include sensor inputs as well so that I can switch between RC and fully automomous or even combinations."
I made a spreadsheet of the upper right quadrant of the stick movement and got the values below. My interpretation of the above indicates a problem with my spreadsheet values. Can someone clarify my understanding please
L=left mtr R=right mtr
F/W STICK POSITION
1.00 | L+1.25 R+.75 | L+1.5 R+.5 | L+1.75 R+.25 | L+2 R0
0.75 | L+1 R+.5 | L+1.25 R+.25 | L+1.5 R0 | L+1.75 R-.25
0.50 | L+.75 R+.25 | L+1 R0 | L+1.25 R-.25 | L+1.5 R-.5
0.25 | L+.5 R0 | L+.75 R-.25 | L+1 R-.5 | L+1.25 R-.75
0.00 0.25 | 0.5 | 0.75 | 1.00 L/R STICK POSITION
| L+.25 R-.25 | L+.5 R-.5 | L+.75 R-.75 | L+1 R-1 TURNS IN PLACE RIGHT
Sorry about the primitive text usage, I don't really know what would have been more appropriate here and probably don't know how to "create" that