0

I have an RPLidar and I installed the necessary packages. Right now, the laser data is published to the /scan topic and I can see the output from Rviz.

I have another project and I should use this implementation for that: https://github.com/praveen-palanisamy/multiple-object-tracking-lidar

Now, the problem is: I should publish the scan data to the filtered_cloud rostopic but I could not figure out how.

I have read about remapping but the problem is:

The src folder and rplidar.launch files are ReadOnly.

The rplidar.launch is:

<launch>
  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"         type="string" value="/dev/ttyUSB0"/>
  <param name="serial_baudrate"     type="int"    value="115200"/><!--A1/A2 -->
  <!--param name="serial_baudrate"     type="int"    value="256000"--><!--A3 -->
  <param name="frame_id"            type="string" value="laser"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   value="true"/>
  </node>
</launch>

This file and the folder in it are ReadOnly how am I going to remap the /scan points to the filtered_cloud? Can you please give detailed instructions for that?

noob123
  • 59
  • 1
  • 6

1 Answers1

0

You really have two options here. First, you can create your own launch file with the correct remappings. This would probably be the preferred method if you're expecting to have more nodes launched for your project. Second, you can use the topic_tools package that includes a relay node. This will subscribe to one topic and publish out on another. In your example it would look like this:

rosrun topic_tools relay scan filtered_cloud
BTables
  • 4,413
  • 2
  • 11
  • 30