IntelRealSense / realsense-ros

ROS Wrapper for Intel(R) RealSense(TM) Cameras
http://wiki.ros.org/RealSense
Apache License 2.0
2.53k stars 1.75k forks source link

DS Neighbor Threshold unavailable in ros params #3156

Closed RichFel closed 2 months ago

RichFel commented 2 months ago
Required Info
Camera Model D435 / D435i
Firmware Version 5.16.0.1
Operating System & Version Linux Ubuntu 22
Kernel Version (Linux Only) 6.5.0-41-generic
Platform PC
Librealsense SDK Version 2.55.1
Language C++
Segment Robot
ROS Distro Humble
RealSense ROS Wrapper Version 4.55.1

Issue Description

Hi,

To reduce noise and especially ghost points, the parameter (in realsense viewer) StereoModule/AdvancedControls/DepthControl/DS Neighbor Threshold helps a lot. I can't seem to find it in the ros2 param list. Is it available in the ROS Wrapper. If not, could it be added?

Thank you a lot! image

MartyG-RealSense commented 2 months ago

Hi @RichFel You can use Advanced Mode parameters in the ROS wrapper by defining the settings in the RealSense Viewer and then exporting them to a json camera configuration file using the json save button near the top of the Viewer's options side-panel, beside the Preset drop-down.

image

In a json file, the Neighbour Threshold parameter is called param-neighborthresh and may look like the line below.

"param-neighborthresh": "7",

Once you have exported the json file, you can import it into your ROS launch to apply the file's configuration settings to the launch with the json_file_path parameter, including the full path to the json file in the json_file_path instruction. You can use the parameter in the launch command or edit the launch file.

https://github.com/IntelRealSense/realsense-ros/issues/2884#issuecomment-1748340605 has an example of using the json_file_path parameter in a ROS2 launch instruction.