Quote:
Originally Posted by rsisk
Our image tracking algorithim gives us two outputs, how much the image is off of center and how much larger/smaller the image is.
For example
So when the image moves slightly to the right, we would send a +.2 to both motors to make it move slightly to the right.
If the image becomes smaller (moving slightly away) we would send a +.2 to one motor and a -.2 to another motor to move the robot towards the target.
My question, if the robot move slightly to the right and slightly further away in one motion, what signal would we send to the motors to move the robot both forward and to the right in one motion?
And, how do I calculate that mathematically.
|
The simple answer is "just add the two values together for each side".
In your example this will send .4 to one motor and 0 to the other, which will give to a rotation with forward motion.
You may need to clip the final sums to prevent them from exceeding 1.0, but it really is that easy.
__________________
Phil Malone
Garrett Engineering And Robotics Society (GEARS) founder.
http://www.GEARSinc.org
FRC1629 Mentor, FTC2818 Coach, FTC4240 Mentor, FLL NeXTGEN Mentor