Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remapping topics in gazebo nodes #486

Closed
jaredmoore opened this issue Aug 31, 2016 · 8 comments
Closed

Remapping topics in gazebo nodes #486

jaredmoore opened this issue Aug 31, 2016 · 8 comments
Labels
bug

Comments

@jaredmoore
Copy link

@jaredmoore jaredmoore commented Aug 31, 2016

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.

@anthonyjclark
Copy link

@anthonyjclark anthonyjclark commented Sep 22, 2016

I've experienced the same issue, and I've not found a way around it yet. Anyone track down the change that causes this failure?

@j-rivero j-rivero added the bug label Sep 23, 2016
@j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Sep 23, 2016

Umm interesting. Have you tried to do the same with any other node different that Gazebo? Is that working?

@jaredmoore
Copy link
Author

@jaredmoore jaredmoore commented Sep 23, 2016

Yes, strangely enough if I spool up many different nodes, it is only the Gazebo node that fails to remap. I can provide more code or a different example if needed.

@jonbinney
Copy link
Contributor

@jonbinney jonbinney commented Nov 30, 2016

This commit in the kinetic-devel branch looks suspicious: a90e609

@jonbinney
Copy link
Contributor

@jonbinney jonbinney commented Nov 30, 2016

Here's the corresponding PR: #387

Sounds like remappings were intentionally removed; @scpeters @peci1

Seems to me that when run through roslaunch/rosrun, remappings should be used.

@j-rivero
Copy link
Contributor

@j-rivero j-rivero commented Dec 1, 2016

Thanks John for the commenting here. @jaredmoore the fix is now if the kinetic-devel branch, could you please check if that fixes your problem?

@jaredmoore
Copy link
Author

@jaredmoore jaredmoore commented Dec 1, 2016

Sure thing, it might be a week or two as I'm in the middle of finals, but I will try and set some time aside. Thanks for the digging on this!

@jaredmoore
Copy link
Author

@jaredmoore jaredmoore commented Dec 2, 2016

I tested this on my installation after removing the apt-get acquired ros-gazebo-pkgs and building from the source on the devel branch. The fix appears to work correctly and I am now able to remap the Gazebo topic. It will be a few weeks before I can test it on my larger instance, but for now I am confident that this addresses the issue. Thank you all for your help!

@jaredmoore jaredmoore closed this Dec 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.