ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Right now my lidar is publishing pointclould on /Sensor/points

I want it to publish on /filtered_cloud instead

How can I do that?

Using remapping. You'll want to read up on it, as it's a very valuable piece of functionality when working with ROS. A previous Q&A about it: #q303611.

In your case -- and assuming you're using roslaunch -- something like this should work:

<launch>
  <!-- this is where you start your lidar driver -->
  <node name=".." type=".." pkg="..">
    <!-- here we map the original topic the driver is programmed to use,
         to whatever we want it to use -->
    <remap from="/Sensor/points" to="/filtered_cloud" />
  </node>
</launch>

Note that the exact names used in from and to depend on how things are setup wrt namespaces and presence/absence of leading slashes, so you may need to change something there. This is just the basic idea.