Point cloud not visible in Rviz
Hi,
I am publishing the topics left/imageraw and right/imageraw via stereoimageproc and I can see the disparity image.
In Rviz under PointCloud2 I can see that the topic "/points2" is publishing because it says "# messages received", but I am not seeing anything on the map.
The Global Status warning states: "No tf data. Actual error: Fixed Frame [webcam] does not exist"
How can I fix this?
I would upload an image but I don't have enough Ros-answers-points..........
OS info: ROS melodic / Ubuntu Mate 18.04
Asked by DFFHTW on 2019-07-18 04:46:00 UTC
Answers
The point cloud is not being shown in RVIZ because the RVIZ fixed frame is different to the frame of your point cloud and there are Transformations available that allow RVIZ to convert between the two. The latter is causing the No tf data
error message.
To fix this you need to set the RVIZ fixed frame to webcam
then not Transformations are needed because the RVIZ fixed frame is the same as that of your point cloud. In the top-left of the RVIZ window is the displays
tree open Global Options and click on the Fixed Frame item. Here you need to type in webcam
.
Hope this helps.
Update
It's more accurate to say it's not the only problem here. You definitely need to set the fixed frame to webcam
for this to work as well as some others. If you see the message count increasing then you know that RVIZ is rendering the point clouds. If you can't see anything there are several possibilities 1, the points are all NANs 2, the points are outside the FOV of RVIZ
Try setting the point size in RVIZ to something huge like 50m and zooming out and see if anything appears.
Asked by PeteBlackerThe3rd on 2019-07-18 06:06:23 UTC
Comments
thank you for your reply, but I already did this from the beginning. Fixed frame is set to webcam
and after that, I get an increasing numer of messages received
under PointCloud2 --> Status --> Topic.
If I don't set the Fixed Frame to webcam
, I don't get ## messages received
.
I think that is not the problem here
Asked by DFFHTW on 2019-07-18 06:16:21 UTC
okay, fixed frame is set to webcam
.
I increased the point size to up to 500m, but nothing is visible.
Could you please explain more about possibility 1 - I'm quite new to ROS and don't know exactly what you mean by that.
Asked by DFFHTW on 2019-07-18 06:36:07 UTC
Depending on the source of the point-cloud some or all of the points cloud be NaN (not a number) values. This usually represents missing data such as out of range lidar samples or areas where no disparity could be found in stereo image processing. It's possible to publish a cloud with 200 points all of which are null (NaNs) resulting in nothing being displayed in RVIZ. I'd recommend writing a simple not that prints out the first 10 points to the terminal each time a point-cloud message is received, this will give you a good idea if they're valid and where exactly those points are if they are valid.
Asked by PeteBlackerThe3rd on 2019-07-18 06:58:10 UTC
I looked at rostopic echo /points2
and it is mostly 192, 127, a lot of zeros and some other random numbers. If I change the style of the PointCloud2 to "Points" in Rviz, the only thing I can see is a black dot in the origin of the plane.
Asked by DFFHTW on 2019-07-22 02:29:47 UTC
I re-calibrated the cameras now several times with different checkerboard sizes, different environments (near/far background) but nothing seems to work. rostopic echo /points2
is posting the same thing. I am receiving messages in Rviz, but all points are at 0,0,0.
Asked by DFFHTW on 2019-07-24 02:40:05 UTC
Now that we have identified the problem is in the stereo image processing not the visualisation in RVIZ it would be best to open a new question asking about the problem with stereo image proc specifically.
Asked by PeteBlackerThe3rd on 2019-07-24 06:25:27 UTC
I figured it out. As I am a beginner with ROS and computer vision, the tutorial on stereo calibration is not sufficient. The tutorial states, that the calibration gets uploaded to the cameras by clicking the upload/commit button in the calibration tool - that was not the case for me. I had to manually extract the calibrationdata.tar file in /tmp and refer to the left/right.yaml files in the camera launch scripts.
Asked by DFFHTW on 2019-07-24 06:48:17 UTC
Comments
try "rostopic echo /points2 --noarr" to check the point cloud message reference frame!
Asked by schizzz8 on 2019-07-18 05:11:04 UTC
output:
Asked by DFFHTW on 2019-07-18 05:46:01 UTC