Home | Tutorials | Wiki | Issues
Ask Your Question
0

How to get the distance between two objects (meshes)

asked 2014-04-28 01:39:54 -0500

dmeltz gravatar image

updated 2014-10-28 09:43:40 -0500

Hello all

I am interesting in wright a plugin that calculates the distance between my robot and the objects around it. My intention is to use this measure in order to grade the performance of obstacle avoidance algorithms. Therefore, i am looking for some kind of unambiguous world state data, and not a sensor simulation.

My question: is there a function in the Gazebo API that performs these kind of calculations, that i can use it in my plugin ?

thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2014-05-08 23:02:47 -0500

peshala gravatar image

Hi

One way of doing is writing a plugin similar to p3d (LINK) and iterating through all the models in the simulation world and getting the relative position between your robot and all those models.

Hope it helps!

edit flag offensive delete link more

Comments

I understand that i need to iterate between all objects in the scenario but the thing that i looking for is a function that will sit inside my iteration loop and be able to calculate minimal distance once it is given two objects positions and meshes. I sure that some variation of this function is used to calculate collisions between objects.

dmeltz gravatar imagedmeltz ( 2014-07-14 10:09:04 -0500 )edit

Maybe [FCL](https://github.com/flexible-collision-library/fcl) is what you're looking for?

scpeters gravatar imagescpeters ( 2014-10-28 23:45:13 -0500 )edit
Login/Signup to Answer

Question Tools

Stats

Asked: 2014-04-28 01:39:54 -0500

Seen: 1,457 times

Last updated: Oct 28 '14