RealSense D435i Inter Cam Sync Mode
Hello,
I am able to sync me D435i camera with external trigger and check the status in RealSense Viewer App. But I want to enable this mode after loading it from JSON file while deploying the code.
I am unable to find the parameter name to set in JSON file to make it work.
Please provide the exact control parameter name to set it using JSON file.
Thanks :)
-
Hi Vivek Goel I am not aware of a json variable for Inter Cam Sync Mode and confirmed that changes to Inter Cam Sync Mode made in the RealSense Viewer program are not saved when exporting settings from the Viewer to a custom json file using the json save option at the top of the options side-panel. The status of Inter Cam Sync Mode can be set with scripting. For example:
C++
depth_sensor1.set_option(RS2_OPTION_INTER_CAM_SYNC_MODE, 1);
depth_sensor2.set_option(RS2_OPTION_INTER_CAM_SYNC_MODE, 2);PYTHON
device.set_option(rs.option.inter_cam_sync_mode, 2)
-
Thank you for quick reply MartyG.
I believe in the next SDK update Intel should provide this option to be change via JSON also.
Since, apply some setting using JSON and some using c++ code make it unreliable for production level design and code.
In continuation of your response I have one more question if, after loading JSON for other parameters and setting only sync mode via c++ code will have any affect on other parameters?
Do I need to completely switch to c+ code for setting other parameters too?
Thanks
-
Setting the Inter Cam Sync Mode of multiple cameras with a json may not be practical. Whilst individual device IDs can be defined for each camera in scripting so that that you can configure which camera is master and which are slaves, a json would not contain those camera ID definitions. The program would therefore not know which of the detected attached cameras should be master or slave.
In regard to your question, not all settings can be applied with json. Visiting the Visual Presets page and left-clicking on the links to json files in the JSON files column will give an overview of the kinds of settings that are supported in json. I recommend viewing at least one json for each type of preset listed.
https://dev.intelrealsense.com/docs/d400-series-visual-presets#section-preset-table
A json should only affect the specific settings that are defined in the json.
-
Hello,
I tried setting up the sync parameter using c++ code. I am able to set other parameters but while setting sync mode "depth_sensor2.set_option(RS2_OPTION_INTER_CAM_SYNC_MODE, 2);" it is throwing a exception.
The exception is - terminate called after throwing an instance of 'rs2::invalid_value_error' what(): object doesn't support option #42
How should I proceed further to set the sync setting in D435i?
Thanks
-
You would need to define sensors, such as depth_sensor1 and depth_sensor2, before calling them in an RS2_OPTION_INTER_CAM_SYNC_MODE instruction. Have you done so earlier in your script, please?
A script in the link below provides an example of defining a sensor that can then be used to set INTER_CAM_SYNC_MODE
https://github.com/IntelRealSense/librealsense/issues/2637

Please sign in to leave a comment.
Comments
5 comments