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

Converting a PointCloud topic into LaserScan topic

asked 2013-08-04 13:27:38 -0500

mozcelikors gravatar image

updated 2013-11-14 11:28:48 -0500

tfoote gravatar image


I'm working on a project that uses Kinect for robot navigation. We use ROS Groovy as distro and Gazebo for simulation, and have sensor and model plugins for the robot model. We have manipulated kinect model using the .sdf file and added file as plugin. So now, whenever we launch the robot model in Gazebo, it publishes topics like these: /cam3d/depth/image_raw, /cam3d/depth/points, /cam3d/rgb/image_raw ...

Our model.sdf contains this part for the kinect model:

<plugin name="kinect" filename="" >

Every package that ROS offers are used with launch files and is included with openni. Since we intend to use only robot model to achieve this, I have to find a way to write a script or manipulate the existing script, just to convert a PointCloud topic (comes from model plugin) to LaserScan topic (output). Is something like that possible? I found pointcloud_to_laserscan package which has source files like cloud_to_scan.cpp cloud_throttle.cpp, but they also use openni and needed to be called from launch file. Any help regarding this issue, or any other easier methods to deal with this situation will be greately appreciated. Thanks in advance.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-08-04 18:42:37 -0500

Hey you can use the pointcloud_to_laserscan package without including openni package. You can edit the launch file that come with the package and change the input pointcloud name according to your needs, Just make sure tf is defined correctly for pointcloud.

edit flag offensive delete link more


I've been trying it for almost a week and still got nothing. When I disable the openni parts on the launch file, The /kinect_laser node is published but there is not any topics. Could you please help me manipulate the launch file?

mozcelikors gravatar image mozcelikors  ( 2013-08-04 23:51:38 -0500 )edit

Question Tools

1 follower


Asked: 2013-08-04 13:27:38 -0500

Seen: 533 times

Last updated: Aug 04 '13