Clarification on RGB and Depth image has input from Stereo camera

classic Classic list List threaded Threaded
28 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

FeKl
Hi Mathieu,

thanks again for your feedback.

After updating RTAB-Map on version 0.17.7, the resulting 3D map is better. But it seems that there are still some problems. To be precise, we found out that using rviz (instead of rtabmapviz) the 3D cloud map has a better depiction. With rviz you can zoom in without any problems.

Using rtabmapviz, it seems that there are still problems (maybe with our disparity map?). If your are zooming in the 3D map, the point cloud and also the odometry line disappear. Can you tell us something about this phenomenon?

To get a better impression, I attached two videos (correct: rviz.mkv, incorrect: rtabmapviz.mkv) of this problem.

Kind regards,

Felix

PS: If we use left and right image as the input, the problem with the zoom in rtabmapviz does not occur.
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

matlabbe
Administrator
This is just a rendering problem when the opengl close/far planes are set incorrectly. In general, it is because there are points very far in the view. Try setting a maximum depth in Preferences->3D rendering to filter those points.
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

FeKl
Hi Mathieu,

thanks for your answer.

To set maximum depth in Preferences->3D rendering (e.g. 5m) works quite well so far. The noise in the far distance disappears.

By the way, from where does the noise come from?

Maybe its a topic for another thread but I've another question: Is it possible without using rtabmapviz to filter the noise in the far distance in order to use the filtered map data during runtime?

Or is it possible to set at the beginning of rtabmap_ros some parameters in order to filter the noise far away (without using rtabmapviz) and get a noisefree pointcloud?

Kind regards,

Felix

Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

matlabbe
Administrator
If you are using the depth image as input, you can filter the depth image for far depth values. Like in your code converting the disparity to depth, you may set to 0 values over a fixed depth. For the generated cloud_map output, normally those points are already filtered (default Grid/RangeMax is 5 meters).

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

FeKl
Hi Mathieu,

thanks for your answer.

If I'm using rviz and subscribing to the topic /voxel_cloud in the PointCloud2, then the parameter "--Grid/RangeMax" has no effect on the 3D map. There is still a lot of noise...

But when I'm subscribing to /cloud_map in the PointCloud2, then everything is fine.

So I have two questions concerning this problem:
1) What is the difference in the 2 topics /voxel_cloud and /cloud_map?
2) And what kind of noise do we have in the "/voxel_cloud" map?

Kind regards,

Felix
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

matlabbe
Administrator
Hi Felix,

"--Grid/RangeMax" has an effect only /cloud_map, which is an output of rtabmap node. /voxel_cloud is used only for visualization with rviz, which is published by point_cloud_xyzrgb node in the rtabmap.launch file (it just projects the depth image to a cloud, so if there is noise, it is coming from the depth image). If you want to limit the range of /voxel_cloud, set "max_depth" parameter under that node.

cheers,
Mathieu
Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

FeKl
This post was updated on .
Hi Mathieu,

thanks for the answer.

Is it also possible to set the maximum depth for rtabmapviz as a parameter in a launch file (not just in the GUI via Preferences->3D rendering)?

I didn't find any solution to that, and "--Grid/RangeMax" does not seem to work with rtabmapviz. Does rtabmapviz subribe to /cloud_map at all?

Kind regards,

Felix

Reply | Threaded
Open this post in threaded view
|

Re: Clarification on RGB and Depth image has input from Stereo camera

matlabbe
Administrator
Hi Felix,

rtabmapviz doesn't subscribe to /cloud_map. It subscribes to /mapData and reconstruct the cloud incrementally on its side using parameters of Preferences->3D Rendering. It does the same as MapCloud display in RVIZ. The Grid parameters won't affect those clouds. To set parameters of rtabmapviz on start, you can set a default config file as arguments (like rviz):
<node pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d my_config.ini">
   ...
</node>

By default, the config file in "~/.ros/rtabmapGUI.ini" is created/loaded when launching rtabmapviz. You may modify the parameters in Preferences->3D Rendering, then save the config and copy "~/.ros/rtabmapGUI.ini" to "my_config.ini" so you can use it afterwards like above.

For example, you can see demo_robot_mapping.launch where we feed a custom config file.

cheers,
Mathieu
12