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
How to get the past path length when robot runinng at 10s?
Re: How to get the past path length when robot runinng at 10s?
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.
Hence, the robot, at t=5s could be anywhere between A and B. It depends on how fast you do execute the motion.
Re: How to get the past path length when robot runinng at 10s?
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
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
Re: How to get the past path length when robot runinng at 10s?
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.
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.