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

Point cloud not visible in Rviz [closed]

asked 2019-07-18 04:46:00 -0600

DFFHTW gravatar image

updated 2019-07-22 02:34:24 -0600

Hi,

I am publishing the topics left/image_raw and right/image_raw via stereo_image_proc 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

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by DFFHTW
close date 2019-08-21 02:26:59.388835

Comments

try "rostopic echo /points2 --noarr" to check the point cloud message reference frame!

schizzz8 gravatar image schizzz8  ( 2019-07-18 05:11:04 -0600 )edit
1

output:

 header: 
  seq: 61402
  stamp: 
    secs: 1563446713
    nsecs:  34766490
  frame_id: "webcam"
height: 480
width: 640
fields: "<array type: sensor_msgs/PointField, length: 4>"
is_bigendian: False
point_step: 32
row_step: 20480
data: "<array type: uint8, length: 9830400>"
is_dense: False
DFFHTW gravatar image DFFHTW  ( 2019-07-18 05:46:01 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2019-07-18 06:06:23 -0600

updated 2019-07-18 06:27:15 -0600

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.

edit flag offensive delete link more

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

DFFHTW gravatar image DFFHTW  ( 2019-07-18 06:16:21 -0600 )edit

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.

DFFHTW gravatar image DFFHTW  ( 2019-07-18 06:36:07 -0600 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-18 06:58:10 -0600 )edit

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.

DFFHTW gravatar image DFFHTW  ( 2019-07-22 02:29:47 -0600 )edit

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.

DFFHTW gravatar image DFFHTW  ( 2019-07-24 02:40:05 -0600 )edit

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.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-07-24 06:25:27 -0600 )edit
0

answered 2019-07-24 06:48:17 -0600

DFFHTW gravatar image

updated 2019-07-24 08:07:36 -0600

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.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2019-07-18 04:46:00 -0600

Seen: 6,354 times

Last updated: Jul 24 '19