Skip to content
This repository was archived by the owner on Jul 10, 2025. It is now read-only.

Remapping topics in gazebo nodes #486

@jaredmoore

Description

@jaredmoore

I'm currently troubleshooting a problem with remapping the clock topic in a gazebo node. A detailed explanation of the problem is here: http://answers.ros.org/question/242656/is-it-possible-to-remap-clock/

A synopsis is the following. Ros Kinectic/Gazebo7. Using <remap> either at launch file level, or within the <node> tags launching gzserver is failing. Running it on a Ros Indigo/Gazebo2 VM allows the code to work. Has there been a change to the remapping policy, solely within the gazebo nodes for this package?

gazebo_only.launch:

<launch>

<!-- ********************* Begin Gazebo Defaults ******************************** -->

  <!-- these are the arguments you can pass this launch file, for example paused:=true -->
  <arg name="args" default="--verbose -r -e ode"/>
  <arg name="world" value="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>

Test with:

  1. roslaunch gazebo_only.launch
  2. Open another terminal
  3. source devel/setup.sh
  4. rostopic list

Expected output:

/clock should be remapped to /clock_remapped and /rosout should be remapped to /rosout_remapped.

On my Kinectic/Gazebo7 VM this does not work correctly, but on an Indigo/Gazebo2 VM it does properly remap the topics. Adding other nodes in either version gives them the remapped topics, but Gazebo still remains mapped to the /clock topic.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions