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

Click For Summary

Discussion Overview

The discussion revolves around the problem of saving the movement history of a car robot with two motors that follows a black line. Participants explore methods to estimate the robot's track based on motor speeds and time intervals.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning

Main Points Raised

  • One participant suggests saving the speeds of the two motors every 100 milliseconds to estimate the track followed by the robot.
  • Another participant provides a formula for calculating distance traveled by each wheel based on velocity and time, indicating that this can help estimate the radius and angle of turns.
  • A correction is made regarding the calculation of the sine of the angle related to the difference in distances traveled by the two wheels.
  • Concerns are raised about the accuracy of the method, noting that compounded errors could lead to significant inaccuracies over time.
  • One participant proposes using Excel for data processing and curve fitting to improve the accuracy of the track plotting.
  • A later reply mentions finding a more accurate solution but does not elaborate on the details.

Areas of Agreement / Disagreement

Participants express varying levels of confidence in the accuracy of the proposed methods, with some acknowledging the potential for large errors while others suggest alternative approaches for improvement. No consensus on a definitive solution is reached.

Contextual Notes

Limitations include potential inaccuracies due to compounded errors over time and the need for further calculations to determine new positions relative to old positions.

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   Reactions: Barhemo
Correction: Sin(angle) = 0.5 (d1-d2)/S
 
  • Like
Likes   Reactions: 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
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
  • · Replies 19 ·
Replies
19
Views
4K
  • · Replies 5 ·
Replies
5
Views
6K
  • · Replies 12 ·
Replies
12
Views
11K
Replies
18
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 15 ·
Replies
15
Views
2K