How to get the past path length when robot runinng at 10s?

Typically: "How do I... ", "How can I... " questions
Post Reply
Jacky
Posts: 14
Joined: 29 Jan 2019, 23:14

How to get the past path length when robot runinng at 10s?

Post by Jacky »

Hi, Dear coppelia and fferia:

Sorry for bothering, I met another issues that is, when robot path planning from A to goal B, I wish to know the past length robot already walked, like, when time is 5 seconds, how far the robot running far away from the start point A, when time is 10 seconds, how far the robot running far away from start point A?

Again, thanks a lot for your time! Looking forward yours help! Have a good day!

Yours Sincerely

Jack

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: How to get the past path length when robot runinng at 10s?

Post by fferri »

Motion planning gives you a path, not a trajectory.

Hence, the robot, at t=5s could be anywhere between A and B. It depends on how fast you do execute the motion.

Jacky
Posts: 14
Joined: 29 Jan 2019, 23:14

Re: How to get the past path length when robot runinng at 10s?

Post by Jacky »

Hi, Dear fferri:

Thanks for your reply, and answer speed.

Oh, I forgot to say, I wish to get the length at a exact time, the robot running follow with the path we generated by OMPL function.

I am using a pionner robot to follow the path we generated, but the wheel speed is always changing when it following the path. Is there any function can solve this problem?

Here is my ttt documents: https://drive.google.com/open?id=1nVG5- ... 8SIN_WY7Jm

Again, thanks a lot. Looking forward help!

Yours Sincerely
Jacky

fferri
Posts: 1193
Joined: 09 Sep 2013, 19:28

Re: How to get the past path length when robot runinng at 10s?

Post by fferri »

So you want to predict where the robot will be when using some trajectory tracker to follow a path? I'm afraid that is quite difficult, and mostly depends on the specific trajectory tracker.

What you can do instead is to compute the percentage (in terms of Euclidean distance) of a path state with respect to the total path.

Let the total path be X = <x(1), x(2), x(3), ..., x(n)>. For computing the Euclidean distance between two consecutive path states x(i) and x(i+1) you have to compute the Euclidean distance || p(i) - p(I+1) || where p(i) and p(I+1) are the Euclidean position extracted from each state (if applicable; the way you do this depends on how the state space is set up, because it may contain more -or less- information than the euclidean position of a body).
Then you can sum up the individual lengths of each path segment to compute the length of a subpath (e.g. from state 1 to j), or also the length of the total path. The ratio of those lengths will give you the percentage -in terms of Euclidean distance- a state x(j) is, with respect to the total path.

The OMPL plugin (or the OMPL library) cannot do this on its own, because the concept of "default projection" is abstract. The state projection can project into a ℝ¹, ℝ² or ℝ³ space, but this space has no concept of distance defined onto.

Post Reply