ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I think the problem is that gazebo is in an entirely different namespace than the rest of your nodes (particularly robot_state_publisher). Try setting them all to use the same namespace and see if that helps.

I think the problem is that gazebo is in an entirely different namespace than the rest of your nodes (particularly robot_state_publisher). Try setting them all to use the same namespace and see if that helps.

EDIT: When I'm launching multiple objects at the same time, I like to use xacro to define the objects that I want to create. So instead of the urdf containing link names, I can parameterize all of the link names so that I can launch as many as I want simultaneously. For example, instead of using:

<link name="dummy_link" />

I would use:

<link name="${name}_dummy_link" />

so that to add a new object, I just need to pass it a unique "name" variable.

Xacro might be the solution you're looking for. If it isn't, I might be interpreting your problem incorrectly and I can amend my answer.

I think the problem is that gazebo is in an entirely different namespace than the rest of your nodes (particularly robot_state_publisher). Try setting them all to use the same namespace and see if that helps.

EDIT: When I'm launching multiple objects at the same time, I like to use xacro to define the objects that I want to create. So instead of the urdf containing link names, I can parameterize all of the link names so that I can launch as many as I want simultaneously. For example, instead of using:

<link name="dummy_link" />

I would use:

<link name="${name}_dummy_link" />

so that to add a new object, I just need to pass it a unique "name" variable.

Xacro might be the solution you're looking for. If it isn't, I might be interpreting your problem incorrectly and I can amend my answer.

EDIT: For multiple objects, you will end up with separate tf trees. The way to get around this is to make sure that all objects share one (and only one) tf frame. (I use the "/world" frame).