Buggy RVIZ in topic 6


I am stuck at unit 6 where the step is to turn on rviz to see the point cloud data generated.

Is it correct for me to launch unit 5’s launch file?

But upon launching and adding “Pointcloud 2”, no 3d point cloud appears and robot suddenly becomes jerky.

Best Regards

Hi @zulqarnain.abdul.halil ,

You should not just add a PointCloud2 display element, but you should also setup the correct topic for data acquisition.
The best thing to do is use the “By Topic” tab and not the “By display type” when you are adding a sensor data.
That way it is easier to choose which topic has data feed and choose it correctly.

If your robot becomes “jerky”, then just restart the simulation and relaunch all the related programs. That should fix the issue.



I did what you recommended, by going to the “By Topic” tab instead of the “By display type” tab. It works if I run rviz first, then followed by:

rostopic echo /basic_grasping_perception/find_objects/result

and then:

rostopic pub /basic_grasping_perception/find_objects/goal grasping_msgs/FindGraspableObjectsActionGoal “header:
seq: 0
secs: 0
nsecs: 0
frame_id: ‘base_link’
secs: 0
nsecs: 0
id: ‘’
plan_grasps: false”

If I execute the 2 commands first before rviz, no 3d point clouds will be displayed.

Best Regards

Hi Zulqarnain,
the reason why you can see the point cloud if you open first rviz is because the command that you launch afterwards is the one generating the point cloud. But it generates the point cloud only once. If you are not “watching” when the point cloud is generated (that means, you don’t have rviz opened) then you will not see the point cloud later.

How does this work:

  1. You have a system that detects objects. The object detector is an action server named /basic_grasping_perception/find_objects
  2. Whenever you call that action server, it will get a full point cloud from the RGBD camera analyze it, and, if there is an object in it, it will publish a point cloud with the cloud that represents the object
  3. This publication of the point cloud object is done in the /basic_grasping_perception/object_cloud topic
  4. This publication is not constantly published because that will require a lot of CPU in the robot all the time. So that cloud is only published when somebody calls the action server
  5. If you call the action server using the rostopic pub /basic_grasping_perception/find_objects/goal command that you posted above, then it will generate a point cloud
  6. If rviz is not watching when the point cloud is generated, it will not be able to capture it later because the message is gone. This is because that topic is not a latched topic to save resources

Let me know if it is clear

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.