coordinates of a car given its trajectory.
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
I have some straight and curve pieces that I use to build tracks for a car (robot), so every time the shape of the track where the car will move is known but I don't have its equation (I think getting it will help, but I don't know how).
Every $delta$ seconds I get the linear velocity of the car $v(t)$ via a sensor (I have no information about the heading and the angular velocity). If we suppose that the car doesn't change the lane, can we compute the position of the car in real time $(x(t),y(t))$ in a Cartesian or any other coordinate system?
I tried Runge–Kutta methods but the results were not that good, I'm looking for a method which can take advantage of the fact that the shape of the track is known.
I thought about using a velocity motion model, but without the angular velocity, it's not going to work.
I was told that I can use a Kalman filter but I don't see how.
coordinate-systems simulation
 |Â
show 4 more comments
up vote
-1
down vote
favorite
I have some straight and curve pieces that I use to build tracks for a car (robot), so every time the shape of the track where the car will move is known but I don't have its equation (I think getting it will help, but I don't know how).
Every $delta$ seconds I get the linear velocity of the car $v(t)$ via a sensor (I have no information about the heading and the angular velocity). If we suppose that the car doesn't change the lane, can we compute the position of the car in real time $(x(t),y(t))$ in a Cartesian or any other coordinate system?
I tried Runge–Kutta methods but the results were not that good, I'm looking for a method which can take advantage of the fact that the shape of the track is known.
I thought about using a velocity motion model, but without the angular velocity, it's not going to work.
I was told that I can use a Kalman filter but I don't see how.
coordinate-systems simulation
You integrate $mathbfv(t)$ to get $(x(t), y(t)).$
– Adrian Keister
Jul 18 at 18:27
$v(t)$ are just values given by a sensor, I don't have the formula.
– Tor Tor
Jul 18 at 18:29
You can integrate numerically, but your answer is likely to drift. That's the only way you can get position.
– Adrian Keister
Jul 18 at 18:30
You mean my car is likely to drift, yes but it doesn't change the lane, I tried Runge–Kutta methods but the results are not that good because the method doesn't use the shape of the track, I am looking for a solution which uses the fact that the car's trajectory is known.
– Tor Tor
Jul 18 at 18:54
How is the car's trajectory known? Did you mean to write "a car track with the equation which defines it"?
– David K
Jul 18 at 18:57
 |Â
show 4 more comments
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
I have some straight and curve pieces that I use to build tracks for a car (robot), so every time the shape of the track where the car will move is known but I don't have its equation (I think getting it will help, but I don't know how).
Every $delta$ seconds I get the linear velocity of the car $v(t)$ via a sensor (I have no information about the heading and the angular velocity). If we suppose that the car doesn't change the lane, can we compute the position of the car in real time $(x(t),y(t))$ in a Cartesian or any other coordinate system?
I tried Runge–Kutta methods but the results were not that good, I'm looking for a method which can take advantage of the fact that the shape of the track is known.
I thought about using a velocity motion model, but without the angular velocity, it's not going to work.
I was told that I can use a Kalman filter but I don't see how.
coordinate-systems simulation
I have some straight and curve pieces that I use to build tracks for a car (robot), so every time the shape of the track where the car will move is known but I don't have its equation (I think getting it will help, but I don't know how).
Every $delta$ seconds I get the linear velocity of the car $v(t)$ via a sensor (I have no information about the heading and the angular velocity). If we suppose that the car doesn't change the lane, can we compute the position of the car in real time $(x(t),y(t))$ in a Cartesian or any other coordinate system?
I tried Runge–Kutta methods but the results were not that good, I'm looking for a method which can take advantage of the fact that the shape of the track is known.
I thought about using a velocity motion model, but without the angular velocity, it's not going to work.
I was told that I can use a Kalman filter but I don't see how.
coordinate-systems simulation
edited Jul 19 at 15:25
asked Jul 18 at 18:25


Tor Tor
111
111
You integrate $mathbfv(t)$ to get $(x(t), y(t)).$
– Adrian Keister
Jul 18 at 18:27
$v(t)$ are just values given by a sensor, I don't have the formula.
– Tor Tor
Jul 18 at 18:29
You can integrate numerically, but your answer is likely to drift. That's the only way you can get position.
– Adrian Keister
Jul 18 at 18:30
You mean my car is likely to drift, yes but it doesn't change the lane, I tried Runge–Kutta methods but the results are not that good because the method doesn't use the shape of the track, I am looking for a solution which uses the fact that the car's trajectory is known.
– Tor Tor
Jul 18 at 18:54
How is the car's trajectory known? Did you mean to write "a car track with the equation which defines it"?
– David K
Jul 18 at 18:57
 |Â
show 4 more comments
You integrate $mathbfv(t)$ to get $(x(t), y(t)).$
– Adrian Keister
Jul 18 at 18:27
$v(t)$ are just values given by a sensor, I don't have the formula.
– Tor Tor
Jul 18 at 18:29
You can integrate numerically, but your answer is likely to drift. That's the only way you can get position.
– Adrian Keister
Jul 18 at 18:30
You mean my car is likely to drift, yes but it doesn't change the lane, I tried Runge–Kutta methods but the results are not that good because the method doesn't use the shape of the track, I am looking for a solution which uses the fact that the car's trajectory is known.
– Tor Tor
Jul 18 at 18:54
How is the car's trajectory known? Did you mean to write "a car track with the equation which defines it"?
– David K
Jul 18 at 18:57
You integrate $mathbfv(t)$ to get $(x(t), y(t)).$
– Adrian Keister
Jul 18 at 18:27
You integrate $mathbfv(t)$ to get $(x(t), y(t)).$
– Adrian Keister
Jul 18 at 18:27
$v(t)$ are just values given by a sensor, I don't have the formula.
– Tor Tor
Jul 18 at 18:29
$v(t)$ are just values given by a sensor, I don't have the formula.
– Tor Tor
Jul 18 at 18:29
You can integrate numerically, but your answer is likely to drift. That's the only way you can get position.
– Adrian Keister
Jul 18 at 18:30
You can integrate numerically, but your answer is likely to drift. That's the only way you can get position.
– Adrian Keister
Jul 18 at 18:30
You mean my car is likely to drift, yes but it doesn't change the lane, I tried Runge–Kutta methods but the results are not that good because the method doesn't use the shape of the track, I am looking for a solution which uses the fact that the car's trajectory is known.
– Tor Tor
Jul 18 at 18:54
You mean my car is likely to drift, yes but it doesn't change the lane, I tried Runge–Kutta methods but the results are not that good because the method doesn't use the shape of the track, I am looking for a solution which uses the fact that the car's trajectory is known.
– Tor Tor
Jul 18 at 18:54
How is the car's trajectory known? Did you mean to write "a car track with the equation which defines it"?
– David K
Jul 18 at 18:57
How is the car's trajectory known? Did you mean to write "a car track with the equation which defines it"?
– David K
Jul 18 at 18:57
 |Â
show 4 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
Naively you would just integrate the velocity to get the position. The numerical integrators assume you can get the velocity at arbitrarily small time steps, which is not the case. If you are using a velocity sensor it may have drift, where zero velocity is reported as (on average) some small nonzero value. As you integrate over long times this will build up. As you have data at discrete time steps about the best you can do is average the values at neighboring time steps and assume the velocity is constant at that value throughout the time between. You could be a bit more clever because of the known radius of the curves, but I suspect it is not worth while.
As you say, you want to use the knowledge of the shape of the track. I would try to identify the time the car enters and exits each curve. For a first cut, that is when the velocity is nonzero in both axes. You may want to adjust it a bit. If we take the top straight as an example and imagine the car moving from left to right. Find the time the transverse velocity goes to zero and take that as leaving the upper left curve. You know exactly where the car is at that moment. Also find the time the transverse velocity leaves zero, which is when it enters the upper right turn. Again you know where it is. Now integrate the velocity between those points and see if the distance covered matches the known length of the straight. If the computed distance is too short you have to add some time, so move the exit time earlier and the entry time later. You can compute the time change needed by the length error divided by the velocity. Work your way around the track, finding times where you enter and exit each curve.
With this set of known points and times you are set. To get position as a function of time along the top straight I would integrate the velocity from the exit from the top left curve. If it still doesn't come out quite right, add or subtract a bit from all the velocities to make the distance covered along the straight match the known length.
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Naively you would just integrate the velocity to get the position. The numerical integrators assume you can get the velocity at arbitrarily small time steps, which is not the case. If you are using a velocity sensor it may have drift, where zero velocity is reported as (on average) some small nonzero value. As you integrate over long times this will build up. As you have data at discrete time steps about the best you can do is average the values at neighboring time steps and assume the velocity is constant at that value throughout the time between. You could be a bit more clever because of the known radius of the curves, but I suspect it is not worth while.
As you say, you want to use the knowledge of the shape of the track. I would try to identify the time the car enters and exits each curve. For a first cut, that is when the velocity is nonzero in both axes. You may want to adjust it a bit. If we take the top straight as an example and imagine the car moving from left to right. Find the time the transverse velocity goes to zero and take that as leaving the upper left curve. You know exactly where the car is at that moment. Also find the time the transverse velocity leaves zero, which is when it enters the upper right turn. Again you know where it is. Now integrate the velocity between those points and see if the distance covered matches the known length of the straight. If the computed distance is too short you have to add some time, so move the exit time earlier and the entry time later. You can compute the time change needed by the length error divided by the velocity. Work your way around the track, finding times where you enter and exit each curve.
With this set of known points and times you are set. To get position as a function of time along the top straight I would integrate the velocity from the exit from the top left curve. If it still doesn't come out quite right, add or subtract a bit from all the velocities to make the distance covered along the straight match the known length.
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
add a comment |Â
up vote
0
down vote
Naively you would just integrate the velocity to get the position. The numerical integrators assume you can get the velocity at arbitrarily small time steps, which is not the case. If you are using a velocity sensor it may have drift, where zero velocity is reported as (on average) some small nonzero value. As you integrate over long times this will build up. As you have data at discrete time steps about the best you can do is average the values at neighboring time steps and assume the velocity is constant at that value throughout the time between. You could be a bit more clever because of the known radius of the curves, but I suspect it is not worth while.
As you say, you want to use the knowledge of the shape of the track. I would try to identify the time the car enters and exits each curve. For a first cut, that is when the velocity is nonzero in both axes. You may want to adjust it a bit. If we take the top straight as an example and imagine the car moving from left to right. Find the time the transverse velocity goes to zero and take that as leaving the upper left curve. You know exactly where the car is at that moment. Also find the time the transverse velocity leaves zero, which is when it enters the upper right turn. Again you know where it is. Now integrate the velocity between those points and see if the distance covered matches the known length of the straight. If the computed distance is too short you have to add some time, so move the exit time earlier and the entry time later. You can compute the time change needed by the length error divided by the velocity. Work your way around the track, finding times where you enter and exit each curve.
With this set of known points and times you are set. To get position as a function of time along the top straight I would integrate the velocity from the exit from the top left curve. If it still doesn't come out quite right, add or subtract a bit from all the velocities to make the distance covered along the straight match the known length.
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Naively you would just integrate the velocity to get the position. The numerical integrators assume you can get the velocity at arbitrarily small time steps, which is not the case. If you are using a velocity sensor it may have drift, where zero velocity is reported as (on average) some small nonzero value. As you integrate over long times this will build up. As you have data at discrete time steps about the best you can do is average the values at neighboring time steps and assume the velocity is constant at that value throughout the time between. You could be a bit more clever because of the known radius of the curves, but I suspect it is not worth while.
As you say, you want to use the knowledge of the shape of the track. I would try to identify the time the car enters and exits each curve. For a first cut, that is when the velocity is nonzero in both axes. You may want to adjust it a bit. If we take the top straight as an example and imagine the car moving from left to right. Find the time the transverse velocity goes to zero and take that as leaving the upper left curve. You know exactly where the car is at that moment. Also find the time the transverse velocity leaves zero, which is when it enters the upper right turn. Again you know where it is. Now integrate the velocity between those points and see if the distance covered matches the known length of the straight. If the computed distance is too short you have to add some time, so move the exit time earlier and the entry time later. You can compute the time change needed by the length error divided by the velocity. Work your way around the track, finding times where you enter and exit each curve.
With this set of known points and times you are set. To get position as a function of time along the top straight I would integrate the velocity from the exit from the top left curve. If it still doesn't come out quite right, add or subtract a bit from all the velocities to make the distance covered along the straight match the known length.
Naively you would just integrate the velocity to get the position. The numerical integrators assume you can get the velocity at arbitrarily small time steps, which is not the case. If you are using a velocity sensor it may have drift, where zero velocity is reported as (on average) some small nonzero value. As you integrate over long times this will build up. As you have data at discrete time steps about the best you can do is average the values at neighboring time steps and assume the velocity is constant at that value throughout the time between. You could be a bit more clever because of the known radius of the curves, but I suspect it is not worth while.
As you say, you want to use the knowledge of the shape of the track. I would try to identify the time the car enters and exits each curve. For a first cut, that is when the velocity is nonzero in both axes. You may want to adjust it a bit. If we take the top straight as an example and imagine the car moving from left to right. Find the time the transverse velocity goes to zero and take that as leaving the upper left curve. You know exactly where the car is at that moment. Also find the time the transverse velocity leaves zero, which is when it enters the upper right turn. Again you know where it is. Now integrate the velocity between those points and see if the distance covered matches the known length of the straight. If the computed distance is too short you have to add some time, so move the exit time earlier and the entry time later. You can compute the time change needed by the length error divided by the velocity. Work your way around the track, finding times where you enter and exit each curve.
With this set of known points and times you are set. To get position as a function of time along the top straight I would integrate the velocity from the exit from the top left curve. If it still doesn't come out quite right, add or subtract a bit from all the velocities to make the distance covered along the straight match the known length.
answered Jul 19 at 15:20


Ross Millikan
276k21186352
276k21186352
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
add a comment |Â
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
thanks for your answer, but the problem is that I don't have the transverse or the radial velocity of the car, I only have the norm of the sum of them (linear velocity), also knowing the time when the car is in a specific position is not possible because of the sensor measurements delays.
– Tor Tor
Jul 20 at 11:51
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
If you had perfect information you could integrate it to get distance and use that with the starting location to get the position on the track. You would still have the drift problem. If you also know the finishing time you can use that to estimate the drift. I think the simple integrator I suggested is about the best you can do.
– Ross Millikan
Jul 20 at 14:02
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2855865%2fcoordinates-of-a-car-given-its-trajectory%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You integrate $mathbfv(t)$ to get $(x(t), y(t)).$
– Adrian Keister
Jul 18 at 18:27
$v(t)$ are just values given by a sensor, I don't have the formula.
– Tor Tor
Jul 18 at 18:29
You can integrate numerically, but your answer is likely to drift. That's the only way you can get position.
– Adrian Keister
Jul 18 at 18:30
You mean my car is likely to drift, yes but it doesn't change the lane, I tried Runge–Kutta methods but the results are not that good because the method doesn't use the shape of the track, I am looking for a solution which uses the fact that the car's trajectory is known.
– Tor Tor
Jul 18 at 18:54
How is the car's trajectory known? Did you mean to write "a car track with the equation which defines it"?
– David K
Jul 18 at 18:57