Ask Your Question
0

sensor_msgs::LaserScan to PCLPointCloud2 in Indigo

asked 2015-01-27 12:14:02 -0500

Pototo gravatar image

updated 2015-01-27 12:15:33 -0500

Hi folks,

I want to know how can I convert an sensor_msgs::LaserScan::ConstPtr& to an pcl::PCLPointCloud2 object?

Specifically, what libraries (e.g., "pcl/conver.h" or something like that), what functions (e.g., pcl::fromLasertoPoinCloud() or something like that), and intermediary conversion variables, if any (e.g., from laser-->laserToCloud_holder-->PCLPointCloud).

PS: giving me the direct answer right here is 10x more useful than sending me to a "Migration" website, etc. (because I am also reading some of them already). Sample code/projects is also useful!

Thanks in advanced.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-01-27 12:58:48 -0500

tfoote gravatar image

The laser_geometry package has a library for projecting laser scans into point clouds: http://wiki.ros.org/laser_geometry

edit flag offensive delete link more

Comments

Hi, Yes, I saw that, but I'm trying to change from pcl::PCLPointCloud2, and not from sensor_msgs::PointCloud2.

Pototo gravatar image Pototo  ( 2015-01-27 13:09:57 -0500 )edit

Do you think there is an extra step that I would have to follow to get to PCLPointCloud2 form the conversion from laser to sensor_msgs::PointCloud to convert that data to PCLPointCloud2? Thanks

Pototo gravatar image Pototo  ( 2015-01-27 13:10:58 -0500 )edit

Yes, but those methods are in the PCL library and not in ROS. ROS will take you as far as pcl::PointCloud http://wiki.ros.org/pcl/Overview

paulbovbel gravatar image paulbovbel  ( 2015-01-27 13:21:19 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-01-27 12:14:02 -0500

Seen: 1,613 times

Last updated: Jan 27 '15