Ask Your Question

Topic remapping using <remap> not working

asked 2018-04-16 03:34:39 -0500

anonymous user


updated 2018-04-16 04:24:55 -0500

ROS Kinetic - Ubuntu 16.04


An app I can't control outputs data on the /point_cloud topic.

A Laser_scan_matcher node can accept pointcloud data on the /cloud topic, and can output /PoseStamped topic.

What I'm doing

I made a launch file which contains:


   <remap from="tango/point_cloud" to="cloud"/>

   <node pkg="laser_scan_matcher" type="laser_scan_matcher_node" 
    <param name="use_cloud_input" value="true"/>
    <param name="publish_pose_stamped" value="true"/>
    <param name="use_imu" value="false"/>
    <param name="use_vel" value="false"/>
    <param name="use_odom" value="false"/>

(This is for live output - not bagfiles.)

Normally, rqt_graph looks something like:

(app) --> [/cloud] --> (laser_scan_matcher_node) --> [/PoseStamped]

What I'm getting

Instead it looks like this:

image description

What am I missing?

edit retag flag offensive close merge delete


I'm not sure about it but maybe you should write <remap from="cloud" to="tango/point_cloud"/> if you do the remapping in this launch file or write <remap from="tango/point_cloud" to="cloud"/> in the launch file that launch your app.

Delb gravatar image Delb  ( 2018-04-16 04:44:34 -0500 )edit

@Delb remapping from "cloud" to "tango/point_cloud" worked, funnily enough! Instead of the node using the /cloud input, it started using /point_cloud as input. Thanks!

anonymous userAnonymous ( 2018-04-16 04:52:23 -0500 )edit

When you do <remap from="x" to="y"/> you ask a node to change its input/output topic x to a topic y so when you had your issue you were asking the node to change an unknown input topic which is why it didn't worked. (So I think my other solution would have worked too)

Delb gravatar image Delb  ( 2018-04-16 05:22:19 -0500 )edit

@Delb But as I said, I can't control the source node. I can't specify that it has to output to /cloud. I can only edit the launch file of the Laser Scan Matcher node.

anonymous userAnonymous ( 2018-04-16 05:29:24 -0500 )edit

Oh yes I ommited that sorry. (You should now mark your question as closed since the problem is solved)

Delb gravatar image Delb  ( 2018-04-16 06:09:37 -0500 )edit

You should now mark your question as closed since the problem is solved

Please don't do that.

@OperationCrossbow: please post what you ended up using that solved your question as an answer. Then accept your own answer.

We tend to not close questions here on ROS Answers. We mark them answered.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-16 09:09:32 -0500 )edit

@gvdhoorn It says "You should now mark your question as closed since the problem is solved" above your comment. I'm getting conflicting information here. Also, ROS Answers tells me I have insufficient points to accept my own answer.

anonymous userAnonymous ( 2018-04-18 03:46:38 -0500 )edit

@OperationCrossbow: @Delb may not be aware of this 'policy'. I did not make this up myself, I'm just passing along what I've observed over the past 5 years (yes, that is a logical fallacy) and has worked well.

An answered question is clearly visible as such: it gets a checkmark. A closed ..

gvdhoorn gravatar image gvdhoorn  ( 2018-04-18 03:51:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-04-18 03:48:33 -0500

anonymous user


I ended up using <remap from="cloud" to="tango/point_cloud"/> instead.

Instead of /point_cloud changing into /cloud and the node accepting this as input, it changed the node to accept /point_cloud directly. It serves me in my goal, so this work-around is good enough.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-04-16 03:34:39 -0500

Seen: 3,522 times

Last updated: Apr 18 '18