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

Revision history [back]

I made a modified version of pointcloud_to_laserscan to do this. It can be found at:

http://bazaar.launchpad.net/~fuzzgun/grok2/trunk/files/head:/fakelaser/

It seems better to do the transform at the throttling stage, so that the resulting point cloud can be visualised using X, Y or Z color filters within Rviz.

Some example launch file entries:

<!-- throttling: limit the point cloud data update rate to produce a fake laser scan -->
<node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load fakelaser/CloudThrottle openni_manager" respawn="true">
    <param name="max_rate" value="$(arg fake_laser_frequency)"/>
    <param name="frame_id" value="base_link"/>
    <remap from="cloud_in" to="/camera/depth/points"/>
    <remap from="cloud_out" to="cloud_throttled"/>
</node>

<!-- Fake Laser -->
<node pkg="nodelet" type="nodelet" name="kinect_laser" args="load fakelaser/CloudToScan openni_manager" respawn="true">
    <param name="output_frame_id" value="/kinect_fake_laser"/>
    <remap from="cloud" to="/cloud_throttled"/>
    <param name="min_height" value="0.2"/>
    <param name="max_height" value="2.0"/>
</node>