Does sensor_msgs/PointCloud2 data type also contains the rgb value of the image?
Currentely i'm using below code, and when i publish the converted pcl type, it also shows rgb values, how is that possible?
void
cloud_cb (const sensor_msgs::PointCloud2ConstPtr& input)
{
pcl::PointCloud output;
pcl::fromROSMsg(*input,output);
cout< ("input", 1, cloud_cb);
marker_pub = nh.advertise ("visualization_marker",1);
// Spin
ros::spin ();
}
as i can see in the sensor_msgs/pointcloud2 documentations it shows below values:
std_msgs/Header header
uint32 height
uint32 width
sensor_msgs/PointField[] fields
bool is_bigendian
uint32 point_step
uint32 row_step
uint8[] data
bool is_dense
where data should be representing only the depth of the voxels. how is it returning rgb values when converted to pcl data type? i'm little confused, cas i didn't used this code for year.
↧