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

RGB colour

asked 2011-10-19 01:29:35 -0500

youga gravatar image

updated 2011-10-19 04:33:04 -0500

David Lu gravatar image

Hi all-

I know pcl::PointClouds carry color data packed as a float and it can be subscribe using sensor msg in ros. but What happens when this is saved in a binary .pcd file, and then converted to ascii? Any chance that the color data is still valid if I later read that ascii number in as a float?

Is there currently any good way to save the r, g, b, color info as separate values?

Thanks :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2011-10-20 03:40:34 -0500

Mac gravatar image

Reading the ASCII is as a float is almost certainly going to Do Something Completely Terrible; it would need to read it in bitwise-identical, and (unless you're printing to a great many significant figures, and can accurately predict how your parsing routine is going to work), this is unlikely to happen.

As for .pcd files, have you tried it? Run the experiment...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2011-10-19 01:29:35 -0500

Seen: 545 times

Last updated: Oct 20 '11