Robotics StackExchange | Archived questions

Meaning of the data passed by PointCloud2 message

I know that the first 4 numbers in the data set correspond to the x coordinate, the next 4 to the y and so on, but I was wondering how the first 4 numbers are turned into a distance in meters. Also why does the row_step and width change with each message sent? Thanks

Asked by dlandry3 on 2018-06-21 13:22:29 UTC

Comments

Hello, how do you get a PointCloud2 message? Which sensor are you using?

Asked by dljubic on 2018-06-21 23:22:43 UTC

We are using the sweep lidar sensor from scance.

Asked by dlandry3 on 2018-06-22 00:08:28 UTC

Answers

For a pointcloud2 msg http://docs.ros.org/api/sensor_msgs/html/msg/PointCloud2.html the x,y,z values are stored in http://docs.ros.org/api/sensor_msgs/html/msg/PointField.html . You can refer to https://answers.ros.org/question/240491/point_cloud2read_points-and-then/ Also there is field is_dense in the pointcloud2 msg. If that is true it skips the invalid points so that makes it change the width i guess.

Asked by PratNag on 2018-06-22 05:34:20 UTC

Comments