Hi all,
I tried to run this program in rivz.
------------------------------- _Start_Program_---------------------------------
sensor_msgs::PointCloud cloud;
cloud.header.stamp = ros::Time::now();
cloud.header.frame_id = "sensor_frame";
cloud.set_point_size(NUM_POINT);
//we'll also add an intensity channel to the cloud
cloud.set_channels_size(1);
cloud.channels[0].name = "intensities";
cloud.channels[0].set_values_size(NUM_POINT);
for(unsigned int i =0; i<num_points; ++i){
cloud.points[i].x = 1 + count;
cloud.points[i].y = 2 + count;
cloud.points[i].z = 3 + count;
cloud.channels[0].values[i] = 10
cloud_pub.publish(cloud);
++count;
-------------------------------------_End_program_-----------------------------------------------
Although there is display on the RIVZ, the old data is always removed by the new data. What is the setting required to retain the data?
With thanks,
Zhiping