Publish Laser Scan
Hello all,
I have a node that generates a point cloud. How do I take the data and output a laser scan? The pointcloud_to_laserscan node isn't working for me... I guess I need to convert the data to polar and publish it. The math I can do, but could you help me with publishing the laser scan?
Thanks, -Hunter A.
Here is the launch file. The topic "scan" is not publishing when I use this launch file and start my node [If you guys could help start the node from this launch file, that would be cool too].
<launch>
<!-- throttling -->
<node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager" respawn="true">
<param name="max_rate" value="20.0"/>
<remap from="cloud_in" to="/laser_ReadOut/cloud_pcl"/>
<remap from="cloud_out" to="cloud_throttled"/>
</node>
<!-- Fake Laser -->
<node pkg="nodelet" type="nodelet" name="laserOut" args="load pointcloud_to_laserscan/CloudToScan openni_manager" respawn="true">
<param name="output_frame_id" value="laser"/>
<!-- heights are in the (optical?) frame of the kinect -->
<param name="min_height" value="-0.15"/>
<param name="max_height" value="0.15"/>
<remap from="cloud" to="/cloud_throttled"/>
</node>
<!-- Fake Laser (narrow one, for localization -->
<node pkg="nodelet" type="nodelet" name="kinect_laser_narrow" args="load pointcloud_to_laserscan/CloudToScan openni_manager" respawn="true">
<param name="output_frame_id" value="/camera_depth_frame"/>
<!-- heights are in the (optical?) frame of the kinect -->
<param name="min_height" value="-0.025"/>
<param name="max_height" value="0.025"/>
<remap from="cloud" to="/cloud_throttled"/>
<remap from="scan" to="/narrow_scan"/>
</node>
</launch>
Here's an rxgraph:
I see now (thank you @lindzey) that the topics are not connected. How do I connect them properly?
I have edited my answer below.
I have edited my answer below.
I'm not sure what you want me to do with that answer.... Would you mind explaining it and how to apply it?
Maybe it's not actually a node I'm creating... It's a binary that I execute with "rosrun". I don't have a launch file for it. Is this why I am having trouble with pointcloud_to_laserscan?
Now (as usual), new problems are found. It is working, but only one beam is being projected...