2 motors on robot -- how can I save the movement history?

AI Thread Summary
To save the movement history of a car robot with two motors that follows a black line, one approach is to record the speed of each motor every 100 milliseconds. By calculating the distance each wheel has moved using the formula Δdistance = velocity * Δtime, it is possible to estimate the robot's trajectory, including turns. However, this method may lead to significant cumulative errors over time, potentially resulting in inaccuracies of up to 200mm after 20 seconds. Utilizing tools like Excel for data processing and curve fitting can help improve the accuracy of the plotted track. Overall, while the proposed method can provide a basic estimate, careful consideration of error accumulation is essential for precise tracking.
Barhemo
Messages
3
Reaction score
0
hello,
I have a car robot with 2 motors which follows a black line.
I want to save the track which the car follows.
I can get the speed of each motor every.
I thought about saving the 2 motor speeds every 100msec and then figure from this the track.
Any ideas how I can do it?
 
Last edited:
Physics news on Phys.org
Velocity = Δdistance/Δtime
so
Δdistance = velocity * Δtime

So you can work out how far each wheel (d1 and d2) has moved in Δtime=100mS.

Using that information you can estimate the radius and angle of any turn. See diagram..

Radius.jpg


More calculations are needed to work out the new position relative to the old position.

This will not give very accurate results because any error will be compounded.
 
  • Like
Likes Barhemo
Correction: Sin(angle) = 0.5 (d1-d2)/S
 
  • Like
Likes Barhemo
Thank you its a very nice idea.
 
Beware what I said..

CWatters said:
This will not give very accurate results because any error will be compounded.

Expect very large errors. If each 100mS step has a 1mm error then after 10 seconds the position could be out by 100mm. 20 seconds = 200mm etc.
 
I think it should be possible to use Excel to process the data and do curve fitting to plot the track.
 
I found more accurate solution
@CWatters
upload_2015-6-23_20-35-0.png
 
Back
Top