Multi robot simulation in ROS
Hello everybody,
I have a problem with multi-robot simulation.
I have a launch file that launches two xacro files
<param name="quad_urdf"
command="$(find xacro)/xacro.py
'$(find package)/models/quadrotorWithCamera.xacro'"
/>
<node name="spawn_quad0"
pkg="gazebo" type="spawn_model"
args="-urdf -param quad_urdf -model quad0 -x 0 -y 0 -z 3"
respawn="false" output="screen">
</node>
<node name="spawn_quad1"
pkg="gazebo" type="spawn_model"
args="-urdf -param quad_urdf -model quad1 -x 1 -y 1 -z 3"
respawn="false" output="screen">
</node>
The file quadrotorWithCamera.xacro loads a camera that publishes on /ptz/camera_info (as example of a topic).
Obviously, both quadrotors will publish on this topic and that's wrong. I see two solutions:
1) rename topic with remap. But it doesn't work. I set <remap from="ptz/camera_info" to="ptz/camera_info2"/> in both node but if I run rostopic list /ptz/camera_info is still on while /ptz/camera_info2 has no topic published on it.
2) Try to give as input to xacro file the robot name but it seems no input is available.
Any suggestion?
Thanks for any reply,
Neostek
Can you share your simulation configuration files?
What version of simulator gazebo are you running? ROS topic remapping is broken in simulator_gazebo 1.6.10 and before (see http://ros.org/wiki/simulator_gazebo/ChangeList/1.6), fixes are in 1.6.11, but the debian for that is being generated right now (http://www.ros.org/debbuild/fuerte.html).