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

How do I use pcl_to_scan to convert PointCloud into LaserScan?

asked 2013-07-24 01:34:11 -0500

mozcelikors gravatar image

updated 2013-11-14 11:13:29 -0500

tfoote gravatar image

Hello,

I need to use PointCloud library and convert the point cloud information into LaserScan so that it acts as laser scanner. I found pcl_to_scan (google it) package, But don't know how to use it? Can anybody explain to me its usage? Any answers will be much appreciated.

edit retag flag offensive close merge delete

Comments

Please mention your ros distro.

Hemu gravatar image Hemu  ( 2013-07-24 11:25:38 -0500 )edit

Sorry about that. I'm using groovy

mozcelikors gravatar image mozcelikors  ( 2013-07-31 10:34:57 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-07-24 11:23:44 -0500

Hemu gravatar image

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.

edit flag offensive delete link more

Comments

I'm trying that, but I use a model with kinect, there is no openni yet. So, I need to manipulate this in order to use with the model with kinect. First thing that has came to mind was to disabling openni_manager, but that didn't work. Can you help me?

mozcelikors gravatar image mozcelikors  ( 2013-07-31 10:36:38 -0500 )edit

Please refer to my new question: /70360/using-pcl_to_scan-without-openni-to-convert-pointcloud-into-laserscan/

mozcelikors gravatar image mozcelikors  ( 2013-08-01 02:06:57 -0500 )edit
1

Nevertheless, close enough.

mozcelikors gravatar image mozcelikors  ( 2013-08-23 12:00:13 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2013-07-24 01:34:11 -0500

Seen: 1,724 times

Last updated: Jul 24 '13