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.
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
rostopic pub /basic_grasping_perception/find_objects/goal grasping_msgs/FindGraspableObjectsActionGoal “header:
If I execute the 2 commands first before rviz, no 3d point clouds will be displayed.
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:
- You have a system that detects objects. The object detector is an action server named
- 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
- This publication of the point cloud object is done in the
- 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
- 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
- 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.