Ask Your Question
0

how can I force my lidar to publish pointcloud on specified rostopic

asked 2019-09-25 12:36:10 -0600

sab3rclaw gravatar image

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

I want it to publish on /filtered_cloud instead

How can I do that? Any help please

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2019-09-25 13:08:40 -0600

gvdhoorn gravatar image

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.

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

Stats

Asked: 2019-09-25 12:36:10 -0600

Seen: 24 times

Last updated: Sep 25