Gazebo | Ignition | Community
Ask Your Question

Best way to link models together

asked 2016-07-13 10:49:49 -0600

Hans-Joachim Krauch gravatar image


I have a robot with multiple tools that can be hot-swapped during operation. Now I want to implement this tool changing also in gazebo (gazebo >= 6) but I'm not really sure what the best way is to achieve this.

Both robot and tool model are spawned individually based on a URDF description. When the tool shall be changed, I will probably delete the tool model, spawn the new tool model and then link tool and robot together. These are the approaches that I have stumbled upon so far:

  • Link the two models by joining them with a fixed joint
    • tool model needs to have exact pose before doing this
  • Attach the tool as static model via physics::Model::AttachStaticModel() to the robot model
    • tool model has only fixed joints, but if spawned as URDF it is not shown as static in gazebo
  • Add the tool model as sub model to the robot model (nested models)
    • possible on the fly? If so, how to specify the pose?
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-07-13 11:55:39 -0600

chapulina gravatar image
  1. It shouldn't be necessary to delete and respawn the tool for joint creation purposes.

  2. The fixed joint method seems to me the most appropriate one. And you're correct, the relative pose which the tool has with respect to the robot the moment the joint is created will be maintained. You can calculate the pose you want and move the tool to that pose before attaching the joint.

  3. Static models don't respond to physics, so I'm not sure this is what you would want here.

  4. Note that nested models are not necessarily fixed to each other. Just like links in a model, they'd need a joint to hold them together. So using a nested model might help organizing things, but you'll still need to create a fixed joint.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2016-07-13 10:49:49 -0600

Seen: 4,278 times

Last updated: Jul 13 '16