Gazebo | Ignition | Community
Ask Your Question

Finding the shortest distance between two robots

asked 2013-10-23 09:01:30 -0600

Ben B gravatar image

updated 2013-10-23 09:40:51 -0600

I'm looking for a method of finding the shortest distance between two robotic arms (each modeled by an SDF referencing STL meshes) as each of them moves through a trajectory.

Ideally this would be an omniscient sort of thing -- so I don't have to worry about carefully placing and aligning tons of sensors on the robots.

I'd like to use Gazebo since I already have SDFs of the robots and plugins written to control their movement. Though, I'm open to other ideas.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-10-23 17:17:02 -0600

nkoenig gravatar image

If you have a plugin for your model, you can get the location of each link (arm) and compute the distance between the two.

Here is how you can get a link from a model

Here is how to get the global pose of a link

edit flag offensive delete link more


Thanks, Nate. Though, it doesn't quite solve the problem. This allows me to use Gazebo's forward kinematics, but I still need information on the geometry of the model. I assume the global pose is the position of either the start of the link or the middle point of the link. If I have to manually program in the thickness and shape of the STL at every point I'm checking, as well as every point I'm checking against, having the model as an SDF and STLs doesn't save much time.

Ben B gravatar imageBen B ( 2013-10-24 08:40:12 -0600 )edit

I see. You could check every link (the pose of which is the center of the link). If you want a finer grain answer, then you'll have to check each geometry. This will be slow.

nkoenig gravatar imagenkoenig ( 2013-11-07 17:10:15 -0600 )edit
Login/Signup to Answer

Question Tools


Asked: 2013-10-23 09:01:30 -0600

Seen: 346 times

Last updated: Oct 23 '13