Ask Your Question
0

adding rgb data into a point cloud?

asked 2012-09-18 06:24:16 -0600

thornsap gravatar image

updated 2012-09-18 23:47:44 -0600

Hi, i'm currently working on a single line ladar which we've managed to transform into a point cloud via rviz so now i want to add some rgb data from a camera onto this point cloud.

assuming i have worked out which pixel to add to which point cloud point, is it possible to do this?

thanks

*edit:

im using pointcloud and not pointcloud2 at the moment

edit retag flag offensive close merge delete

Comments

thanks for the answer, but we're currently using pointcloud 1, is it still possible to do this?

thornsap gravatar imagethornsap ( 2012-09-18 23:36:39 -0600 )edit
1

Yes, by using the channels, but I'd recommed switching to pointcoud2, if possible.

dornhege gravatar imagedornhege ( 2012-09-19 00:50:18 -0600 )edit

thanks, i'll do that in that case

thornsap gravatar imagethornsap ( 2012-09-19 00:57:53 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2012-09-18 10:06:12 -0600

yes it is possible and quit common. Just check this link and you will find a description of the data type PointCloud2.

edit flag offensive delete link more
2

answered 2012-09-20 12:31:24 -0600

dejanpan gravatar image

I think that PointCloud2 type is not that super easy to use. I'd suggest you to go over the pcl::PointCloud<pcl::pointxyzrgb> cloud and then convert pcl point cloud back to PointCloud2 using pcl::toROSMsg() method as suggested here: http://www.pcl-users.org/Combine-sensor-msgs-PointCloud2-msg-rgb-sensor-msgs-Image-into-a-properly-colored-PointCloud2-td2814133.html.

edit flag offensive delete link more

Comments

Also if it is true that sensor_msg::PointCloud is easier to understand, it is still not any longer standard. PointCloud2 is the current standard in ROS. To use the PCL is of course an option, but it takes more load and computational power if you need to convert a lot in between ROS and PCL.

tlinder gravatar imagetlinder ( 2012-09-21 00:13:17 -0600 )edit

I was not alluding to sensor_msg::PointCloud at all and fully agree with what you are saying.

dejanpan gravatar imagedejanpan ( 2012-09-21 14:42:54 -0600 )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

Stats

Asked: 2012-09-18 06:24:16 -0600

Seen: 4,283 times

Last updated: Sep 20 '12