View my account

RealSense D435i Inter Cam Sync Mode

Comments

5 comments

  • MartyX Grover

    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) 

    0
    Comment actions Permalink
  • Vivek Goel

    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

     

    0
    Comment actions Permalink
  • MartyG

    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. 

    0
    Comment actions Permalink
  • Vivek Goel

    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

    0
    Comment actions Permalink
  • MartyX Grover

    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

     

     

    0
    Comment actions Permalink

Please sign in to leave a comment.