Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I was able to solve this issue this morning. I did not end up needing the robotName or robotNamespace tags as suggested. Instead, my issue was due to the fact that gazebo was launching as /ga1/gazebo, forcing the services it offered to be changed from /gazebo/<service> to /ga1/gazebo/<service>. The launch file was still however looking for /gazebo/<service>, especially in the case of the urdf_spawn node. Accordingly, I changed

<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
    args="-urdf -model basicbot -param robot_description"/>

to

<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
    args="-urdf -model basicbot -param robot_description -gazebo_namespace /ga1/gazebo"/>

by adding the -gazebo_namespace /ga1/gazebo attribute at the end of the call. Be sure also to make changes to any scripts that use rospy and wait_for_service or ServiceProxy as you will need to prepend the namespace to those as well by calling rospy.get_namespace().