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

ajax33's profile - activity

2023-03-02 00:44:14 -0500 received badge  Famous Question (source)
2017-12-20 00:01:48 -0500 received badge  Notable Question (source)
2017-12-20 00:01:48 -0500 received badge  Popular Question (source)
2015-04-20 04:06:00 -0500 asked a question Converting pointcloud2 data to ros image

I have created a node that publishes fake pointcloud2 data. However, I am not getting an image unless I use an organised point cloud. I arbitrarily set the height and width parameters to 100 each, and also gave arbitrary rgb values to the points and I got a 100x100 image. However, I do not understand how the image is a representation of my pointcloud2 data. ie. what has happened to the x,y,z values I supplied.


//generating fake pointcloud data
for(i=0;i<100;i++)
  {
     for(j=0;j<100;j++)
     {
         cloud->at(i,j).x=1.0+j; 
         cloud->at(i,j).y=2.0+j;
         cloud->at(i,j).z=3.0+j;
         cloud->at(i,j).r=(40+j)%255;
     }
  }
 
2015-03-13 09:35:29 -0500 received badge  Supporter (source)