How to specify parameters using lauch file
Hi.
I am using RealSense D435i.
There are places where the wrong depth calculation will misidentify.
I checked using Viewer.
I was able to eliminate the error by setting the [DS SecondPeak Threshold].
I don't know how to specify this parameter in the ROS lauch file.
Do you know anyone?
thank you.
-
You cannot define an Advanced Mode parameter such as Second Peak Threshold (also known as Second Peak Delta) in a launch file directly. You could though define it in a json camera configuration file and load the json at launch using the launch file or the roslaunch instruction. An example of an instruction for this setting to place in the json file is:
"param-secondpeakdelta": "325"
If you are not familiar with json files, also called Visual Presets, you can read their official documentation page at the link below.https://dev.intelrealsense.com/docs/d400-series-visual-presets
A json file can be loaded from the launch file by defining a path to the file with the json_file_path parameter. -
Typically when setting different Advanced Mode values with a json after a json has already been loaded, you would have to stop the pipeline, load a different json file and then restart the pipeline to apply the change.
I would speculate that instead of using a json file, you may be able to access Advanced Mode directly to make a change to the Second Peak Threshold during ROS runtime by launching a Python pyrealsense2 node script in ROS. The link below suggests code for doing so.
https://github.com/IntelRealSense/librealsense/issues/10224#issuecomment-1060412603
Please sign in to leave a comment.
Comments
5 comments