0
$\begingroup$

Rosanswers logo

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


Originally posted by thornsap on ROS Answers with karma: 13 on 2012-09-18

Post score: 1


Original comments

Comment by thornsap on 2012-09-18:
thanks for the answer, but we're currently using pointcloud 1, is it still possible to do this?

Comment by dornhege on 2012-09-19:
Yes, by using the channels, but I'd recommed switching to pointcoud2, if possible.

Comment by thornsap on 2012-09-19:
thanks, i'll do that in that case

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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


Originally posted by tlinder with karma: 663 on 2012-09-18

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$
0
$\begingroup$

Rosanswers logo

I think that PointCloud2 type is not that super easy to use. I'd suggest you to go over the pcl::PointCloudpcl::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.


Originally posted by dejanpan with karma: 1420 on 2012-09-20

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by tlinder on 2012-09-21:
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.

Comment by dejanpan on 2012-09-21:
I was not alluding to sensor_msg::PointCloud at all and fully agree with what you are saying.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.