How to remove wrong MapCloud

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

How to remove wrong MapCloud

IvanB
Hello,

I am simulating the work of the stereo camera with help of the RTabMap and Gazebo. Everything works fine, but when I add "MapCloud" in rviz I see a lot of points that "fly in the air" (see the screenshots https://drive.google.com/file/d/1xYdJt8CRWA3cGKDcCvFt160oMNmj6gen/view, http://drive.google.com/file/d/1JNSYh0Vbn-p4H18lVfx9yN5nP9aMujNR/view).It looks like part of an object, but camera detects distance to this part of the object improperly for some reasons.Are there any filters or RTabMap parameters for solving this problem?

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: How to remove wrong MapCloud

matlabbe
Administrator

The MapCloud plugin has a max depth option that can be tuned to filter far points. Are you sending left and right images to rtabmap or left and depth images?
Reply | Threaded
Open this post in threaded view
|

Re: How to remove wrong MapCloud

IvanB
Yes, I am sending left and right images to the rtabmap.
Reply | Threaded
Open this post in threaded view
|

Re: How to remove wrong MapCloud

matlabbe
Administrator
Hi,

The disparity is computed with default parameters of cv::StereoBM. They cannot be changed for rviz MapCloud plugin. However, for rtabmapviz or for cloud_map topic, we can tune them with StereoBM/ parameters:
$ rtabmap --params | grep StereoBM
Param: Stereo/DenseStrategy = "0"                          [0=cv::StereoBM, 1=cv::StereoSGBM]
Param: StereoBM/BlockSize = "15"                           [See cv::StereoBM]
Param: StereoBM/Disp12MaxDiff = "-1"                       [See cv::StereoBM]
Param: StereoBM/MinDisparity = "0"                         [See cv::StereoBM]
Param: StereoBM/NumDisparities = "128"                     [See cv::StereoBM]
Param: StereoBM/PreFilterCap = "31"                        [See cv::StereoBM]
Param: StereoBM/PreFilterSize = "9"                        [See cv::StereoBM]
Param: StereoBM/SpeckleRange = "4"                         [See cv::StereoBM]
Param: StereoBM/SpeckleWindowSize = "100"                  [See cv::StereoBM]
Param: StereoBM/TextureThreshold = "10"                    [See cv::StereoBM]
Param: StereoBM/UniquenessRatio = "15"                     [See cv::StereoBM]

For convenience, stereo_image_proc can be used to change live the StereoBM parameters with rtq_reconfigure. See http://wiki.ros.org/stereo_image_proc/Tutorials/ChoosingGoodStereoParameters. When you are happy with the results, you can fix the same parameters for rtabmap as above.