Making Gazebo sensor topics visible in ROS
I'm using Gazebo 2.3 and ROS Indigo but I can also use Gazebo 7 if that will help me with my problem.
I would like to model a swarm of identical robots, each with a laser scanner and depth camera. I am spawning each robot from within a Python script and I'd like to use the same SDF model for each robot. At first this appears to work well since when I view the topics in Gazebo using the "Topic Visualization" menu item, each robot gets a unique sensor topic name for its lidar and camera. The problem is that these topics are not visible in ROS. In other words, when I run 'rostopic list', the simulated robot sensor topics do not appear. If I add a topic name to the sensor plugins in the robot SDF, then all robots get the same sensor topic names in ROS.
So does anyone know how I can get unique sensor topic names in ROS without cloning the SDF file multiple times, each one with a different set of topic names? As far as I can tell, I cannot programmatically pass a topic name when I spawn each robot model. I'd be happy with a Gazebo plugin or C++ node that republishes the Gazebo topics to ROS. Or perhaps there is a hack to the Gazebo source itself I could implement to make all Gazebo topics available to ROS?
Thanks,
patrick