[ros-users] Remapping confusion

Patrick Bouffard bouffard at eecs.berkeley.edu
Tue Jan 25 00:24:48 UTC 2011


I'm trying to remap the ~input topic for a pcl/SACSegmentation nodelet
so that it is mapped to the topic /scene_pointcloud2. I've done this
successfully before in a roslaunch file:

<launch>   <!-- Run a SACSegmentation filter to find the points lying
on the floor -->
  <arg name="flyer_machine" default="local"/>
  <machine name="local" address="localhost"/>
  <node pkg="nodelet" type="nodelet" name="find_plane" args="load
pcl/SACSegmentation kinect_manager" output="screen" machine="$(arg
flyer_machine)">
    <remap from="~input" to="kinect/points2"/>
    <remap from="~inliers" to="kinect/plane_indices"/>
  </node>
</launch>

.. but in this case I just want to use rosrun for a quick one-off
test. The commandline I've tried is:

rosrun nodelet nodelet load pcl/SACSegmentation pcl_manager
input:=scene_pointcloud2 _model_type:=0 _distance_threshold:=0.05
_max_iterations:=100 _optimize_coefficients:=true

and I see in the output:

[ INFO] [1295909522.740405959]: /input -> /scene_pointcloud2

.. and from rxgraph and other indications it's clear that my intended
remapping didn't work.

Looking at the documentation [1], I couldn't see how it should be
done, then I finally tried

~input:=scene_pointcloud2

which did the trick. It seems obvious in retrospect but nowhere in [1]
does it even mention the '~' character in relation to topics.

I'd make some changes to that page but there are also some cryptic
statements in there that I'm not sure about. Eg. ".. whereas before
the remappings only applied to a specific string".. before what?
Later: "The one exception to this is when using searchParam, which
keeps the old behavior". What old behavior? I assume this is probably
ancient history by now and perhaps it should be removed as it only
confuses users like me. But then again I'm clearly not an expert on
this remapping stuff so I don't want to confuse anyone even worse! :)

Thanks,

Pat

[1] http://www.ros.org/wiki/Remapping%20Arguments



More information about the ros-users mailing list