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

There is another package pointcloud_to_laserscan which converts the 3D point cloud data to 2D laser scan data. It is in the turtlebot stack which can be installed using the following command (for fuerte and groovy): sudo apt-get install ros-<distro>-turtlebot

Then create a launch file as follows:

    <launch>
  <!-- kinect nodes -->
  <include file="$(find openni_launch)/launch/openni.launch"/>

  <!-- openni_manager -->
  <node pkg="nodelet" type="nodelet" name="openni_manager" output="screen" respawn="true" args="manager"/>

  <!-- throttling -->
  <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager">
    <param name="max_rate" value="2"/>
    <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 pointcloud_to_laserscan/CloudToScan openni_manager">
  <!--Setting the parameters for obtaining scan data within desired ranges-->
    <param name="max_height" value="0.30"/>
    <param name="min_height" value="-0.15"/>
    <param name="angle_min" value="-0.5233"/>
    <param name="angle_max" value="0.5233"/>
    <param name="range_min" value="0.50"/>
    <param name="range_max" value="6.0"/>
    <param name="output_frame_id" value="/camera_depth_frame"/>
    <remap from="cloud" to="cloud_throttled"/>
  </node>

The laser scan data is a linear array and is published as the topic /scan.