Distance from a path

Typically: "How do I... ", "How can I... " questions
Post Reply
macomber
Posts: 1
Joined: 27 Mar 2017, 10:10

Distance from a path

Post by macomber »

Hello,
is there a way to get the distance from a robot (or a graph object) to a path?
I would like to get the distance from the graph to the closest point on the path.
The problem I get is that the path is not measurable and it cannot be made so.

I'm trying to compare some line following control algorithms and this would be a really useful metric.

Thanks

coppelia
Site Admin
Posts: 10366
Joined: 14 Dec 2012, 00:25

Re: Distance from a path

Post by coppelia »

Hello,

unfortunately you can't do that. One option you have would be to measure the distance between a collection (e.g. your robot) and a dummy. The dummy would be a point on your path. You will however have to move that dummy along the path with the desired precision if you want to get a somewhat precise answer.

Another option would be to generate a point cloud from your path points. Then measure the distance between that point cloud and the collection, which is much faster than the first option mentioned above.

Cheers

Post Reply