Our team was working on autonomous mode yesterday and we are trying to make the robot track the trailer. We can detect left/right and fwd/rev movement of the image and we can turn the robot left/right and move it fwd/rev to track the image. Sounds like we are done, right?
Well, here is where we are having trouble “conceptualizing” how you move both l/r and f/r at the same time. BTW, we are testing with two motors driving two rear wheels.
For example, let’s say we have acquired the target image. Then it moves away and to the right. We will detect both the l/r movement and the f/r movement. Currently we track l/r until we center the target into the deadband, then we track f/r until we center the target into the deadband. Once both axis are in the deadband, we have the target where we want it.
The question, is there a way to combine both the l/r tracking and the f/r tracking to accomplish both at the same time?
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?
One thing to note is that the robot speed will be the average speed of the two sides. The relative difference between the speeds of the two sides will determine the turning radius and direction. See if you can use this information to help solve your problem.
For some types of robots, you can compute the forward vector to get the range, and the steer vector for lining up, and simply combine them together. Add the lefts together and the rights.
Specifically, for skid steered robots, this will get you pretty close.
I understand your problem… and THINK I have the general idea for a solution. If its to the left of your deadband and far away then it would set the motors to:
We develop one method for the robot integrate F-R and L-R in 2006.
Here on Brazil, we calls by Curva.c .
The method is basic, but you need a Gyro and Encoder to make this.
The concept is that for your bot go FWD and REV, the velocity of both sides of the robot have be the same.
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.
I thought about this but was concerned about the loss of accuarcy as you approach full speed in one direction due to the clipping. Maybe it’s not that big of a deal, something for our programmers to test today ;>
Sloteera:
I hope that you can understood me. Is complicated explain algorithm in english
Excellent job of explaining the algorithm, I totally understood what you were saying. I would hate to see how I would have done trying to explain something in your language I appreciate your time and effort!