Is it possible to remap /clock?
I'm running a launch file with grouped gazebo instances. So far I've been able to successfully separate each group into its own container, however, the \clock
topic is still being shared among the groups. I've inserted a <remap from="clock" to="groupX_clock"/>
following the conventions in http://wiki.ros.org/roslaunch/XML/remap . After launching, it appears that the clock is not being remapped correctly and the different Gazebo nodes use the same clock topic, leading to collisions in messages and errors mentioning that the simulation has moved back in time.
Is there an undocumented restriction on remapping certain topics? Or perhaps (most likely) I have just missed a critical piece of information.
Thanks!
Edit 1
After the comments posted in dornhege's answer, I've tried quite a few variations and investigated using rostopic list
, rostopic info
, and gz topic -l
. It appears that the clock topic is remapped correctly in all but the Gazebo node. Something appears to be hindering the remapping there, but I'm am currently unsure how to get it to work correctly.
Edit 2
I've created a simplified set of launch and world files to try and isolate where I might be running into a problem. Here is my gazebo_only.launch
file:
<launch>
<!-- ********************* Begin Gazebo Defaults ******************************** -->
<arg name="args" default="--verbose -r -e ode"/>
<arg name="world" value="$(find basicbot_gazebo)/worlds/empty.world"/>
<!-- set use_sim_time flag -->
<!--<param name="/use_sim_time" value="true" />-->
<!-- ********************* End Gazebo Defaults ******************************** -->
<!-- start gazebo server-->
<!--<env name="GAZEBO_MASTER_URI" value="http://localhost:11345"/>-->
<node name="gazebo" pkg="gazebo_ros" type="gzserver" args="$(arg world) $(arg args)" respawn="false" output="screen">
<remap from="rosout" to="rosout_remapped" />
<remap from="clock" to="clock_remapped" />
</node>
</launch>
Here is my world file:
<?xml version="1.0" ?>
<sdf version="1.5">
<world name="default">
<physics type="ode">
<max_step_size>0.025</max_step_size>
<real_time_update_rate>30</real_time_update_rate>
</physics>
<include>
<uri>model://ground_plane</uri>
</include>
</world>
</sdf>
I've tried launching this on both my remote system, and my local Ubuntu VM both running Kinectic and Gazebo7. The remapping of both topics in the gazebo node still appears to fail. Does it work on your system?
Edit 3
Opened a github issue in the gazebo_ros_pkgs
repository ( https://github.com/ros-simulation/gaz... ) after considering Stefan's post. Verified myself that the code works in Indigo/Gazebo2 but not Kinectic/Gazebo7.