microsoft / Azure_Kinect_ROS_Driver

A ROS sensor driver for the Azure Kinect Developer Kit.
MIT License
304 stars 226 forks source link

Issue running two kinect cameras on a same machine through ROS driver #97

Open Michae1Park opened 5 years ago

Michae1Park commented 5 years ago

We are running two Kinects through the ROS driver, and it seems like there is an issue connecting them through the USB. The weird part is that sometimes the cameras connect without an issue, or restarting the cameras multiple times "fixes" the problem.

We have already made usbfs adjustments following https://github.com/microsoft/Azure-Kinect-Sensor-SDK/issues/485.

We are on ROS melodic and Ubuntu 18.04.

Below is the error message.

[ INFO] [1572984480.118636104]: K4A Parameters:
[ INFO] [1572984480.119257532]: sensor_sn - std::string : 000032293712
[ INFO] [1572984480.119309027]: depth_enabled - bool : 1
[ INFO] [1572984480.119326127]: depth_mode - std::string : NFOV_UNBINNED
[ INFO] [1572984480.119345351]: color_enabled - bool : 1
[ INFO] [1572984480.119364867]: color_format - std::string : bgra
[ INFO] [1572984480.119378943]: color_resolution - std::string : 1440P
[ INFO] [1572984480.119390089]: fps - int : 30
[ INFO] [1572984480.119400281]: point_cloud - bool : 0
[ INFO] [1572984480.119410932]: rgb_point_cloud - bool : 0
[ INFO] [1572984480.119421161]: point_cloud_in_depth_frame - bool : 1
[ INFO] [1572984480.119431340]: tfprefix - std::string : camera1
[ INFO] [1572984480.119441309]: recording_file - std::string :
[ INFO] [1572984480.119451336]: recording_loop_enabled - bool : 0
[ INFO] [1572984480.119461344]: body_tracking_enabled - bool : 0
[ INFO] [1572984480.119484974]: body_tracking_smoothing_factor - float : 0
[ INFO] [1572984480.119495871]: imu_rate_target - int : 0
[ INFO] [1572984480.119506017]: rescale_ir_to_mono8 - bool : 0
[ INFO] [1572984480.119517051]: ir_mono8_scaling_factor - float : 1
[ INFO] [1572984480.119527413]: wired_sync_mode - int : 1
[ INFO] [1572984480.124689331]: Found 2 sensors
[ INFO] [1572984480.124728091]: Searching for sensor with serial number: 000032293712
[ INFO] [1572984480.147432833]: K4A Parameters:
[ INFO] [1572984480.147880693]: sensor_sn - std::string : 000269493712
[ INFO] [1572984480.147898463]: depth_enabled - bool : 1
[ INFO] [1572984480.147913883]: depth_mode - std::string : NFOV_UNBINNED
[ INFO] [1572984480.147930725]: color_enabled - bool : 1
[ INFO] [1572984480.147955945]: color_format - std::string : bgra
[ INFO] [1572984480.147981587]: color_resolution - std::string : 1440P
[ INFO] [1572984480.147993070]: fps - int : 30
[ INFO] [1572984480.148007800]: point_cloud - bool : 0
[ INFO] [1572984480.148062133]: rgb_point_cloud - bool : 0
[ INFO] [1572984480.148076705]: point_cloud_in_depth_frame - bool : 1
[ INFO] [1572984480.148090036]: tfprefix - std::string : camera2
[ INFO] [1572984480.148103613]: recording_file - std::string :
[ INFO] [1572984480.148117913]: recording_loop_enabled - bool : 0
[ INFO] [1572984480.148131730]: body_tracking_enabled - bool : 0
[ INFO] [1572984480.148163465]: body_tracking_smoothing_factor - float : 0
[ INFO] [1572984480.148178002]: imu_rate_target - int : 0
[ INFO] [1572984480.148192588]: rescale_ir_to_mono8 - bool : 0
[ INFO] [1572984480.148207981]: ir_mono8_scaling_factor - float : 1 [ INFO] [15729844 [2019-11-05 15:08:00.156] [error] [t=13559] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/us bcommand.c (30): TraceLibUsbError(). /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcomman d.c (447): libusb_claim_interface(usbcmd->libusb, usbcmd->interface) returned LIBUSB_ERROR_BUSY in us b_cmd_create
[2019-11-05 15:08:00.156] [error] [t=13559] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/us bcommand.c (30): TraceLibUsbError(). /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcomman d.c (489): libusb_release_interface(usbcmd->libusb, usbcmd->interface) returned LIBUSB_ERROR_NOT_FOUN D in usb_cmd_destroy
[2019-11-05 15:08:00.156] [error] [t=13559] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/depth_mcu/depth_mcu.c (68): usb_cmd_create(USB_DEVICE_DEPTH_PROCESSOR, device_index, NULL, &depthmcu->usb_cmd) returned failure in depthmcu_create() [2019-11-05 15:08:00.157] [error] [t=13559] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/sdk/k4a.c (133): depthmcu_create(index, &device->depthmcu) returned failure in k4a_device_open() [ERROR] [1572984480.157068584]: Failed to open K4A device at index 0 [ INFO] [1572984480.382604587]: K4A[0] : 000269493712 [ INFO] [1572984480.444531693]: K4A[1] : 000032293712 [2019-11-05 15:08:00.495] [error] [t=13551] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (30): TraceLibUsbError(). /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (447): libusb_claim_interface(usbcmd->libusb, usbcmd->interface) returned LIBUSB_ERROR_BUSY in usb_cmd_create [2019-11-05 15:08:00.495] [error] [t=13551] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (30): TraceLibUsbError(). /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (489): libusb_release_interface(usbcmd->libusb, usbcmd->interface) returned LIBUSB_ERROR_NOT_FOUND in usb_cmd_destroy [2019-11-05 15:08:00.495] [error] [t=13551] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/depth_mcu/depth_mcu.c (68): usb_cmd_create(USB_DEVICE_DEPTH_PROCESSOR, device_index, NULL, &depthmcu->usb_cmd) returned failure in depthmcu_create() [2019-11-05 15:08:00.495] [error] [t=13551] /w/1/s/extern/Azure-Kinect-Sensor-SDK/src/sdk/k4a.c (133): depthmcu_create(index, &device->depthmcu) returned failure in k4a_device_open() [ERROR] [1572984480.495722995]: Failed to open K4A device at index 1 [ERROR] [1572984480.495788941]: Failed to open a K4A device. Cannot continue. [ INFO] [1572984480.495818889]: Setting wired sync mode: 1 [ INFO] [1572984480.495837643]: Setting RGB Camera Format: bgra [ INFO] [1572984480.495859076]: Setting RGB Camera Resolution: 1440P [ INFO] [1572984480.495881217]: Setting Depth Camera Mode: NFOV_UNBINNED [ INFO] [1572984480.495898688]: Setting Camera FPS: 30 [ INFO] [1572984480.495918625]: Using default IMU rate. Setting to maximum: 1600 Hz. [ INFO] [1572984480.495946535]: Setting Target IMU rate to 1600 (desired: 1600) [ INFO] [1572984480.496042274]: K4A Started [ERROR] [1572984480.500203295]: Failed to open a K4A device. Cannot continue. [ INFO] [1572984480.500265224]: Setting wired sync mode: 2 [ INFO] [1572984480.500347781]: Setting RGB Camera Format: bgra [ INFO] [1572984480.500394846]: Setting RGB Camera Resolution: 1440P [ INFO] [1572984480.500436188]: Setting Depth Camera Mode: NFOV_UNBINNED [ INFO] [1572984480.500478589]: Setting Camera FPS: 30 [ INFO] [1572984480.500527819]: Using default IMU rate. Setting to maximum: 1600 Hz. [ INFO] [1572984480.500578731]: Setting Target IMU rate to 1600 (desired: 1600) [ INFO] [1572984480.500701062]: K4A Started ^C[camera2/node-6] killing on exit

GabrielQuik commented 5 years ago

Having a similar issue myself, I modified my driver.launch file:

<launch>
  <arg name="tf_prefix"         default="" />               <!-- Prefix added to tf frame IDs. It typically contains a trailing '_' unless empty. -->

  <param name="robot_description"
    command="xacro $(find azure_kinect_ros_driver)/urdf/azure_kinect.urdf.xacro tf_prefix:=$(arg tf_prefix)" />

  <node name="joint_state_publisher1" pkg="joint_state_publisher" type="joint_state_publisher" />
  <node name="robot_state_publisher1" pkg="robot_state_publisher" type="state_publisher" />

  <arg name="depth_enabled"           default="true" />           <!-- Enable or disable the depth camera -->
  <arg name="depth_mode"              default="NFOV_UNBINNED" />  <!-- Set the depth camera mode, which affects FOV, depth range, and camera resolution. See Azure Kinect documentation for full details. Valid options: NFOV_UNBINNED, NFOV_2X2BINNED, WFOV_UNBINNED, WFOV_2X2BINNED, and PASSIVE_IR -->
  <arg name="color_enabled"           default="true" />           <!-- Enable or disable the color camera -->
  <arg name="color_format"            default="bgra" />           <!-- The format of RGB camera. Valid options: bgra, jpeg -->
  <arg name="color_resolution"        default="3072P" />          <!-- Resolution at which to run the color camera. Valid options: 720P, 1080P, 1440P, 1536P, 2160P, 3072P -->
  <arg name="fps"                     default="15" />              <!-- FPS to run both cameras at. Valid options are 5, 15, and 30 -->
  <arg name="point_cloud"             default="true" />           <!-- Generate a point cloud from depth data. Requires depth_enabled -->
  <arg name="rgb_point_cloud"         default="false" />           <!-- Colorize the point cloud using the RBG camera. Requires color_enabled and depth_enabled -->
  <arg name="point_cloud_in_depth_frame" default="false" />        <!-- Whether the RGB pointcloud is rendered in the depth frame (true) or RGB frame (false). Will either match the resolution of the depth camera (true) or the RGB camera (false). -->
  <arg name="required"                default="false" />          <!-- Argument which specified if the entire launch file should terminate if the node dies -->
  <!-- <arg name="sensor_sn"               default="000319193812" />               Sensor serial number. If none provided, the first sensor will be selected -->
  <arg name="recording_file"          default="" />               <!-- Absolute path to a mkv recording file which will be used with the playback api instead of opening a device -->
  <arg name="recording_loop_enabled"  default="false" />          <!-- If set to true the recording file will rewind the beginning once end of file is reached -->
  <arg name="body_tracking_enabled"           default="false" />  <!-- If set to true the joint positions will be published as marker arrays -->
  <arg name="body_tracking_smoothing_factor"  default="0.0" />    <!-- Set between 0 for no smoothing and 1 for full smoothing -->
  <arg name="rescale_ir_to_mono8"  default="false" />    <!-- Whether to rescale the IR image to an 8-bit monochrome image for visualization and further processing. A scaling factor (ir_mono8_scaling_factor) is applied. -->
  <arg name="ir_mono8_scaling_factor"  default="1.0" />    <!-- Scaling factor to apply when converting IR to mono8 (see rescale_ir_to_mono8). If using illumination, use the value 0.5-1. If using passive IR, use 10. -->
  <arg name="imu_rate_target" default="0"/>                       <!-- Desired output rate of IMU messages. Set to 0 (default) for full rate (1.6 kHz). --> 

  <node pkg="azure_kinect_ros_driver" type="node" name="azure_kinect_ros_driver1" output="screen" required="$(arg required)">
    <param name="depth_enabled"     type="bool"   value="$(arg depth_enabled)" />
    <param name="depth_mode"        type="string" value="$(arg depth_mode)" />
    <param name="color_enabled"     type="bool"   value="$(arg color_enabled)" />
    <param name="color_format"      type="string" value="$(arg color_format)" />
    <param name="color_resolution"  type="string" value="$(arg color_resolution)" />
    <param name="fps"               type="int"    value="$(arg fps)" />
    <param name="point_cloud"       type="bool"   value="$(arg point_cloud)" />
    <param name="rgb_point_cloud"   type="bool"   value="$(arg rgb_point_cloud)" />
    <param name="point_cloud_in_depth_frame"   type="bool"   value="$(arg point_cloud_in_depth_frame)" />

    <param name="sensor_sn"         type="string" value="000319193812" /> <!--$(arg sensor_sn) -->

    <param name="tf_prefix"         type="string" value="1" />   <!--$(arg tf_prefix)-->

    <param name="recording_file"          type="string" value="$(arg recording_file)" />
    <param name="recording_loop_enabled"  type="bool"   value="$(arg recording_loop_enabled)" />
    <param name="body_tracking_enabled"           type="bool"   value="$(arg body_tracking_enabled)" />
    <param name="body_tracking_smoothing_factor"  type="double" value="$(arg body_tracking_smoothing_factor)" />
    <param name="rescale_ir_to_mono8" type="bool" value="$(arg rescale_ir_to_mono8)" />
    <param name="ir_mono8_scaling_factor" type="double" value="$(arg ir_mono8_scaling_factor)" />
    <param name="imu_rate_target" type="int" value="$(arg imu_rate_target)"/>
  </node>

  <node pkg="azure_kinect_ros_driver" type="node" name="azure_kinect_ros_driver2" output="screen" required="$(arg required)">
    <param name="depth_enabled"     type="bool"   value="$(arg depth_enabled)" />
    <param name="depth_mode"        type="string" value="$(arg depth_mode)" />
    <param name="color_enabled"     type="bool"   value="$(arg color_enabled)" />
    <param name="color_format"      type="string" value="$(arg color_format)" />
    <param name="color_resolution"  type="string" value="$(arg color_resolution)" />
    <param name="fps"               type="int"    value="$(arg fps)" />
    <param name="point_cloud"       type="bool"   value="$(arg point_cloud)" />
    <param name="rgb_point_cloud"   type="bool"   value="$(arg rgb_point_cloud)" />
    <param name="point_cloud_in_depth_frame"   type="bool"   value="$(arg point_cloud_in_depth_frame)" />

    <param name="sensor_sn"         type="string" value="000466592912" />       <!--$(arg sensor_sn)-->

    <param name="tf_prefix"         type="string" value="2" />   <!--$(arg tf_prefix)-->

    <param name="recording_file"          type="string" value="$(arg recording_file)" />
    <param name="recording_loop_enabled"  type="bool"   value="$(arg recording_loop_enabled)" />
    <param name="body_tracking_enabled"           type="bool"   value="$(arg body_tracking_enabled)" />
    <param name="body_tracking_smoothing_factor"  type="double" value="$(arg body_tracking_smoothing_factor)" />
    <param name="rescale_ir_to_mono8" type="bool" value="$(arg rescale_ir_to_mono8)" />
    <param name="ir_mono8_scaling_factor" type="double" value="$(arg ir_mono8_scaling_factor)" />
    <param name="imu_rate_target" type="int" value="$(arg imu_rate_target)"/>
  </node>

</launch>

I'm getting this error:

[ INFO] [1573209959.169794605]: K4A Parameters:
[ INFO] [1573209959.169893985]: K4A Parameters:
[ INFO] [1573209959.170357624]: sensor_sn - std::string : 000319193812
[ INFO] [1573209959.170369447]: depth_enabled - bool : 1
[ INFO] [1573209959.170397522]: depth_mode - std::string : NFOV_UNBINNED
[ INFO] [1573209959.170403870]: color_enabled - bool : 1
[ INFO] [1573209959.170420720]: color_format - std::string : bgra
[ INFO] [1573209959.170429024]: color_resolution - std::string : 3072P
[ INFO] [1573209959.170434677]: fps - int : 15
[ INFO] [1573209959.170439853]: point_cloud - bool : 1
[ INFO] [1573209959.170444888]: rgb_point_cloud - bool : 0
[ INFO] [1573209959.170450076]: point_cloud_in_depth_frame - bool : 0
[ INFO] [1573209959.170455206]: tf_prefix - std::string : 1
[ INFO] [1573209959.170460272]: recording_file - std::string : 
[ INFO] [1573209959.170465396]: recording_loop_enabled - bool : 0
[ INFO] [1573209959.170471610]: body_tracking_enabled - bool : 0
[ INFO] [1573209959.170487811]: body_tracking_smoothing_factor - float : 0
[ INFO] [1573209959.170497122]: imu_rate_target - int : 0
[ INFO] [1573209959.170503810]: rescale_ir_to_mono8 - bool : 0
[ INFO] [1573209959.170504179]: sensor_sn - std::string : 000466592912
[ INFO] [1573209959.170513048]: ir_mono8_scaling_factor - float : 1
[ INFO] [1573209959.170517919]: depth_enabled - bool : 1
[ INFO] [1573209959.170525548]: depth_mode - std::string : NFOV_UNBINNED
[ INFO] [1573209959.170531962]: color_enabled - bool : 1
[ INFO] [1573209959.170538129]: color_format - std::string : bgra
[ INFO] [1573209959.170545163]: color_resolution - std::string : 3072P
[ INFO] [1573209959.170551640]: fps - int : 15
[ INFO] [1573209959.170557909]: point_cloud - bool : 1
[ INFO] [1573209959.170564950]: rgb_point_cloud - bool : 0
[ INFO] [1573209959.170573119]: point_cloud_in_depth_frame - bool : 0
[ INFO] [1573209959.170581059]: tf_prefix - std::string : 2
[ INFO] [1573209959.170588088]: recording_file - std::string : 
[ INFO] [1573209959.170594056]: recording_loop_enabled - bool : 0
[ INFO] [1573209959.170599938]: body_tracking_enabled - bool : 0
[ INFO] [1573209959.170612482]: body_tracking_smoothing_factor - float : 0
[ INFO] [1573209959.170619267]: imu_rate_target - int : 0
[ INFO] [1573209959.170626400]: rescale_ir_to_mono8 - bool : 0
[ INFO] [1573209959.170634591]: ir_mono8_scaling_factor - float : 1
[ INFO] [1573209959.174829936]: Found 2 sensors
[ INFO] [1573209959.174845330]: Searching for sensor with serial number: 000319193812
[ INFO] [1573209959.174845755]: Found 2 sensors
[ INFO] [1573209959.174859444]: Searching for sensor with serial number: 000466592912
[2019-11-08 11:45:59.193] [error] [t=6263] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (30): TraceLibUsbError(). /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (447): libusb_claim_interface(usbcmd->libusb, usbcmd->interface) returned LIBUSB_ERROR_BUSY in usb_cmd_create 
[2019-11-08 11:45:59.193] [error] [t=6263] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (30): TraceLibUsbError(). /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/usbcommand/usbcommand.c (489): libusb_release_interface(usbcmd->libusb, usbcmd->interface) returned LIBUSB_ERROR_NOT_FOUND in usb_cmd_destroy 
[2019-11-08 11:45:59.193] [error] [t=6263] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/depth_mcu/depth_mcu.c (68): usb_cmd_create(USB_DEVICE_DEPTH_PROCESSOR, device_index, NULL, &depthmcu->usb_cmd) returned failure in depthmcu_create()
[2019-11-08 11:45:59.193] [error] [t=6263] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/sdk/k4a.c (133): depthmcu_create(index, &device->depthmcu) returned failure in k4a_device_open()
[ERROR] [1573209959.194062055]: Failed to open K4A device at index 0

But after that the camera somehow starts:

[ INFO] [1573209959.441344807]: K4A[0] : 000319193812
[ INFO] [1573209959.451480348]: K4A[1] : 000466592912
[ INFO] [1573209959.542489945]: K4A Serial Number: 000319193812
[ INFO] [1573209959.547954739]: RGB Version: 1.6.102
[ INFO] [1573209959.548036973]: Depth Version: 1.6.75
[ INFO] [1573209959.548076136]: Audio Version: 1.6.14
[ INFO] [1573209959.548112687]: Depth Sensor Version: 6109.7.0
[ INFO] [1573209959.552526076]: K4A Serial Number: 000466592912
[ INFO] [1573209959.557920861]: RGB Version: 1.6.98
[ INFO] [1573209959.558008293]: Depth Version: 1.6.70
[ INFO] [1573209959.558049634]: Audio Version: 1.6.14
[ INFO] [1573209959.558109172]: Depth Sensor Version: 6109.7.0
[ INFO] [1573209959.694828180]: Setting RGB Camera Format: bgra
[ INFO] [1573209959.694884071]: Setting RGB Camera Resolution: 3072P
[ INFO] [1573209959.694916169]: Setting Depth Camera Mode: NFOV_UNBINNED
[ INFO] [1573209959.694925802]: Setting Camera FPS: 15
[ INFO] [1573209959.694941152]: Using default IMU rate. Setting to maximum: 1600 Hz.
[ INFO] [1573209959.694953248]: Setting Target IMU rate to 1600 (desired: 1600)
[ INFO] [1573209959.696557519]: Setting RGB Camera Format: bgra
[ INFO] [1573209959.696575512]: Setting RGB Camera Resolution: 3072P
[ INFO] [1573209959.696591537]: Setting Depth Camera Mode: NFOV_UNBINNED
[ INFO] [1573209959.696607222]: Setting Camera FPS: 15
[ INFO] [1573209959.696619126]: Using default IMU rate. Setting to maximum: 1600 Hz.
[ INFO] [1573209959.696631957]: Setting Target IMU rate to 1600 (desired: 1600)
[ INFO] [1573209961.358517762]: K4A Calibration Blob:
[ INFO] [1573209961.358553836]:      Depth:
[ INFO] [1573209961.358562309]:          Extrinsics:
[ INFO] [1573209961.358597163]:              Translation: 0, 0, 0
[ INFO] [1573209961.358614167]:              Rotation[0]: 1, 0, 0
[ INFO] [1573209961.358628685]:              Rotation[1]: 0, 1, 0
[ INFO] [1573209961.358647579]:              Rotation[2]: 0, 0, 1
[ INFO] [1573209961.358658584]:          Resolution:
[ INFO] [1573209961.358676818]:              Width: 640
[ INFO] [1573209961.358688941]:              Height: 576
[ INFO] [1573209961.358701651]:          Intrinsics:
[ INFO] [1573209961.358713769]:              Model Type: 4
[ INFO] [1573209961.358727962]:              Parameter Count: 14
[ INFO] [1573209961.358743118]:              cx: 321.03
[ INFO] [1573209961.358756037]:              cy: 335.133
[ INFO] [1573209961.358768798]:              fx: 504.418
[ INFO] [1573209961.358781339]:              fy: 504.539
[ INFO] [1573209961.358793667]:              k1: 1.51932
[ INFO] [1573209961.358806643]:              k2: 0.943031
[ INFO] [1573209961.358819583]:              k3: 0.0524298
[ INFO] [1573209961.358832003]:              k4: 1.85519
[ INFO] [1573209961.358844353]:              k5: 1.40261
[ INFO] [1573209961.358856417]:              k6: 0.26801
[ INFO] [1573209961.358882503]:              codx: 0
[ INFO] [1573209961.358898001]:              cody: 0
[ INFO] [1573209961.358915647]:              p2: -2.37938e-05
[ INFO] [1573209961.358926621]:              p1: -5.5666e-05
[ INFO] [1573209961.358939523]:              metric_radius: 0
[ INFO] [1573209961.358950428]:      Color:
[ INFO] [1573209961.358961076]:          Extrinsics:
[ INFO] [1573209961.358991085]:              Translation: -31.9631, -1.85898, 3.97215
[ INFO] [1573209961.359004185]:              Rotation[0]: 0.999992, 0.00394083, 5.15718e-05
[ INFO] [1573209961.359019281]:              Rotation[1]: -0.00392766, 0.995397, 0.0957535
[ INFO] [1573209961.359031770]:              Rotation[2]: 0.000326014, -0.095753, 0.995405
[ INFO] [1573209961.359042191]:          Resolution:
[ INFO] [1573209961.359050567]:              Width: 4096
[ INFO] [1573209961.359061299]:              Height: 3072
[ INFO] [1573209961.359074049]:          Intrinsics:
[ INFO] [1573209961.359082367]:              Model Type: 4
[ INFO] [1573209961.359097144]:              Parameter Count: 14
[ INFO] [1573209961.359109630]:              cx: 2051.1
[ INFO] [1573209961.359120187]:              cy: 1556.02
[ INFO] [1573209961.359136918]:              fx: 1917.99
[ INFO] [1573209961.359148441]:              fy: 1917.17
[ INFO] [1573209961.359157374]:              k1: 0.453534
[ INFO] [1573209961.359166073]:              k2: -2.60388
[ INFO] [1573209961.359175658]:              k3: 1.60551
[ INFO] [1573209961.359185244]:              k4: 0.337189
[ INFO] [1573209961.359195616]:              k5: -2.43588
[ INFO] [1573209961.359206483]:              k6: 1.53139
[ INFO] [1573209961.359232585]:              codx: 0
[ INFO] [1573209961.359245815]:              cody: 0
[ INFO] [1573209961.359255321]:              p2: -0.000356849
[ INFO] [1573209961.359263978]:              p1: 0.000614337
[ INFO] [1573209961.359272157]:              metric_radius: 0
[ INFO] [1573209961.359280311]:      IMU (Depth to Color):
[ INFO] [1573209961.359287499]:          Extrinsics:
[ INFO] [1573209961.359298603]:              Translation: -31.9631, -1.85898, 3.97215
[ INFO] [1573209961.359310118]:              Rotation[0]: 0.999992, 0.00394083, 5.15718e-05
[ INFO] [1573209961.359329571]:              Rotation[1]: -0.00392766, 0.995397, 0.0957535
[ INFO] [1573209961.359339560]:              Rotation[2]: 0.000326014, -0.095753, 0.995405
[ INFO] [1573209961.359353797]:      IMU (Depth to IMU):
[ INFO] [1573209961.359365067]:          Extrinsics:
[ INFO] [1573209961.359377190]:              Translation: -50.7309, 3.47979, 1.18163
[ INFO] [1573209961.359390933]:              Rotation[0]: -0.000156644, 0.105338, -0.994437
[ INFO] [1573209961.359405026]:              Rotation[1]: -0.999998, 0.00182431, 0.000350763
[ INFO] [1573209961.359419127]:              Rotation[2]: 0.00185111, 0.994435, 0.105337
[ INFO] [1573209961.359430907]:      IMU (IMU to Depth):
[ INFO] [1573209961.359440969]:          Extrinsics:
[ INFO] [1573209961.359458987]:              Translation: 3.46965, 4.16247, -50.5744
[ INFO] [1573209961.359472381]:              Rotation[0]: -0.000156644, -0.999998, 0.00185111
[ INFO] [1573209961.359484621]:              Rotation[1]: 0.105338, 0.00182431, 0.994435
[ INFO] [1573209961.359499207]:              Rotation[2]: -0.994437, 0.000350763, 0.105337
[ INFO] [1573209961.359513097]:      IMU (Color to IMU):
[ INFO] [1573209961.359526045]:          Extrinsics:
[ INFO] [1573209961.359539461]:              Translation: -46.7344, -28.4714, 3.18682
[ INFO] [1573209961.359554037]:              Rotation[0]: 0.000207191, 0.00963259, -0.999954
[ INFO] [1573209961.359569693]:              Rotation[1]: -0.999983, 0.00577716, -0.000151545
[ INFO] [1573209961.359582723]:              Rotation[2]: 0.00577543, 0.999937, 0.00963361
[ INFO] [1573209961.359593840]:      IMU (IMU to Color):
[ INFO] [1573209961.359603689]:          Extrinsics:
[ INFO] [1573209961.359617835]:              Translation: -28.4797, -2.57197, -46.7673
[ INFO] [1573209961.359628759]:              Rotation[0]: 0.000207191, -0.999983, 0.00577543
[ INFO] [1573209961.359641327]:              Rotation[1]: 0.00963259, 0.00577716, 0.999937
[ INFO] [1573209961.359653970]:              Rotation[2]: -0.999954, -0.000151545, 0.00963361
[ INFO] [1573209961.359706538]: STARTING CAMERAS
[ INFO] [1573209961.369650375]: K4A Calibration Blob:
[ INFO] [1573209961.369679699]:      Depth:
[ INFO] [1573209961.369688112]:          Extrinsics:
[ INFO] [1573209961.369700516]:              Translation: 0, 0, 0
[ INFO] [1573209961.369710103]:              Rotation[0]: 1, 0, 0
[ INFO] [1573209961.369722711]:              Rotation[1]: 0, 1, 0
[ INFO] [1573209961.369779269]:              Rotation[2]: 0, 0, 1
[ INFO] [1573209961.369812617]:          Resolution:
[ INFO] [1573209961.369836209]:              Width: 640
[ INFO] [1573209961.369862634]:              Height: 576
[ INFO] [1573209961.369888137]:          Intrinsics:
[ INFO] [1573209961.369896819]:              Model Type: 4
[ INFO] [1573209961.369929483]:              Parameter Count: 14
[ INFO] [1573209961.369955192]:              cx: 336.023
[ INFO] [1573209961.369982892]:              cy: 342.662
[ INFO] [1573209961.370012573]:              fx: 504.357
[ INFO] [1573209961.370024367]:              fy: 504.299
[ INFO] [1573209961.370034988]:              k1: 9.28672
[ INFO] [1573209961.370044172]:              k2: 5.99745
[ INFO] [1573209961.370053624]:              k3: 0.304881
[ INFO] [1573209961.370071908]:              k4: 9.61187
[ INFO] [1573209961.370100937]:              k5: 9.131
[ INFO] [1573209961.370129551]:              k6: 1.61361
[ INFO] [1573209961.370139041]:              codx: 0
[ INFO] [1573209961.370152363]:              cody: 0
[ INFO] [1573209961.370162623]:              p2: 4.88916e-05
[ INFO] [1573209961.370175924]:              p1: 3.63565e-05
[ INFO] [1573209961.370188693]:              metric_radius: 0
[ INFO] [1573209961.370200380]:      Color:
[ INFO] [1573209961.370212581]:          Extrinsics:
[ INFO] [1573209961.370225081]:              Translation: -32.0288, -1.91426, 4.05645
[ INFO] [1573209961.370239584]:              Rotation[0]: 0.999987, 0.00486109, -0.00117743
[ INFO] [1573209961.370253921]:              Rotation[1]: -0.00473281, 0.995785, 0.0915946
[ INFO] [1573209961.370266293]:              Rotation[2]: 0.00161772, -0.0915879, 0.995796
[ INFO] [1573209961.370277205]:          Resolution:
[ INFO] [1573209961.370287945]:              Width: 4096
[ INFO] [1573209961.370305481]:              Height: 3072
[ INFO] [1573209961.370316912]:          Intrinsics:
[ INFO] [1573209961.370334838]:              Model Type: 4
[ INFO] [1573209961.370346859]:              Parameter Count: 14
[ INFO] [1573209961.370361778]:              cx: 2053.42
[ INFO] [1573209961.370371358]:              cy: 1550.32
[ INFO] [1573209961.370382810]:              fx: 1919.59
[ INFO] [1573209961.370391933]:              fy: 1918.68
[ INFO] [1573209961.370406825]:              k1: 0.798395
[ INFO] [1573209961.370425252]:              k2: -2.96517
[ INFO] [1573209961.370435469]:              k3: 1.68627
[ INFO] [1573209961.370450020]:              k4: 0.67448
[ INFO] [1573209961.370476782]:              k5: -2.79819
[ INFO] [1573209961.370503834]:              k6: 1.61745
[ INFO] [1573209961.370516350]:              codx: 0
[ INFO] [1573209961.370531443]:              cody: 0
[ INFO] [1573209961.370542043]:              p2: -0.000459536
[ INFO] [1573209961.370558928]:              p1: 0.0012836
[ INFO] [1573209961.370569581]:              metric_radius: 0
[ INFO] [1573209961.370580559]:      IMU (Depth to Color):
[ INFO] [1573209961.370591180]:          Extrinsics:
[ INFO] [1573209961.370602068]:              Translation: -32.0288, -1.91426, 4.05645
[ INFO] [1573209961.370615408]:              Rotation[0]: 0.999987, 0.00486109, -0.00117743
[ INFO] [1573209961.370625370]:              Rotation[1]: -0.00473281, 0.995785, 0.0915946
[ INFO] [1573209961.370640143]:              Rotation[2]: 0.00161772, -0.0915879, 0.995796
[ INFO] [1573209961.370656294]:      IMU (Depth to IMU):
[ INFO] [1573209961.370667138]:          Extrinsics:
[ INFO] [1573209961.370680337]:              Translation: -51.1051, 3.76862, 2.04273
[ INFO] [1573209961.370696262]:              Rotation[0]: -0.00151056, 0.115849, -0.993266
[ INFO] [1573209961.370709003]:              Rotation[1]: -0.999997, -0.00181321, 0.00130931
[ INFO] [1573209961.370722608]:              Rotation[2]: -0.00164932, 0.993265, 0.115851
[ INFO] [1573209961.370734493]:      IMU (IMU to Depth):
[ INFO] [1573209961.370744843]:          Extrinsics:
[ INFO] [1573209961.370758619]:              Translation: 3.69478, 3.89834, -51.0026
[ INFO] [1573209961.370771219]:              Rotation[0]: -0.00151056, -0.999997, -0.00164932
[ INFO] [1573209961.370783865]:              Rotation[1]: 0.115849, -0.00181321, 0.993265
[ INFO] [1573209961.370800669]:              Rotation[2]: -0.993266, 0.00130931, 0.115851
[ INFO] [1573209961.370811667]:      IMU (Color to IMU):
[ INFO] [1573209961.370822574]:          Extrinsics:
[ INFO] [1573209961.370836041]:              Translation: -46.9961, -28.2536, 3.95493
[ INFO] [1573209961.370848645]:              Rotation[0]: 0.000222117, 0.0243901, -0.999702
[ INFO] [1573209961.370861014]:              Rotation[1]: -0.999995, 0.00304716, -0.00014784
[ INFO] [1573209961.370873701]:              Rotation[2]: 0.00304264, 0.999698, 0.0243906
[ INFO] [1573209961.370885826]:      IMU (IMU to Color):
[ INFO] [1573209961.370899167]:          Extrinsics:
[ INFO] [1573209961.370911095]:              Translation: -28.255, -2.7214, -47.0827
[ INFO] [1573209961.370922374]:              Rotation[0]: 0.000222117, -0.999995, 0.00304264
[ INFO] [1573209961.370940203]:              Rotation[1]: 0.0243901, 0.00304716, 0.999698
[ INFO] [1573209961.370951458]:              Rotation[2]: -0.999702, -0.00014784, 0.0243906
[ INFO] [1573209961.371000516]: STARTING CAMERAS
[ INFO] [1573209961.796463168]: STARTING IMU
[ INFO] [1573209961.797246263]: K4A Started
[ INFO] [1573209961.900803228]: Setting the time base using a k4a_imu_sample_t sample. Assuming the transmission delay to be 5 ms.
[ WARN] [1573209962.318769084]: Image processing thread is running behind.
Expected max loop time: 0.066666667
Actual loop time: 0.477720524

Then I'm getting this error while the camera is still up and running, I'm getting topics only from one of two cameras even though they are both "running"

[2019-11-08 11:46:03.299] [error] [t=6350] /__w/1/s/extern/Azure-Kinect-Sensor-SDK/src/capturesync/capturesync.c (144): replace_sample(). capturesync_drop, releasing capture early due to full queue TS: 49466 type:Depth

wirthual commented 5 years ago

I had similar issues connecting to multiple devices, I am not sure if this is the actual problem but in my code I closed the device when the serial number does not match and then I could use multiple devices. I am thinking about this part of the code:

if (params_.sensor_sn != "")
      {
        if (device.get_serialnum() == params_.sensor_sn)
        {
          k4a_device_ = std::move(device);
          break;
        }
      }

If the serial numbers do not match, the device is not closed? I think it would be useful if the sdk could provide a function to connect to a device by passing in a serial number instead of the index.

RoseFlunder commented 5 years ago

@wirthual The device should be closed by the destructor when it goes out of scope: See device descructor in c++ wrapper

wirthual commented 5 years ago

I see, thank you for pointing out. I use a variable with a scope that's not only the for loop, probably this was the reason I needed to close it explicit in my code.

Tarekbouamer commented 4 years ago

I had the same issue in running two KAs at the same time, By default, Linux limits image capturing to a Max_value, in my desktop it was limited to 16 MB.

To extend the USBFS limit, I manually moddified the grub ( /etc/default/grub ) chaning ( GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" ) to ==> ( GRUB_CMDLINE_LINUX_DEFAULT="quiet splash usbcore.usbfs_memory_mb=1000" ),

Update the grup ( sudo update-grub ) and restart your PC ( sudo reboot ).

check if buffer size has successfully changed ( cat /sys/module/usbcore/parameters/usbfs_memory_mb )

All the Best :)

carcormir commented 4 years ago

@GabrielQuik Did you manage to solve your problem? I am also using two kinects in the same computer and get the same error and after it, both cameras work fine.

Failed to open K4A device at index 0

I believe it could be the way the two cameras are brought up. Every time the driver is launch, it will try to open all the devices connected to the PC no matter whether they have been already opened or not. This error does not limit the functionality but it would be nice if it did not happen.

RoseFlunder commented 4 years ago

To prevent this error we would need to remove the option to choose a kinect via serial number because you can only query the serial number of the device if you have opened it via the API. Already opened devices will produce this error.

carcormir commented 4 years ago

@RoseFlunder Thanks for your fast response. Is there any proper clean way to launch multiple cameras and avoid this error ?

Tarekbouamer commented 4 years ago

@carcormir can u run two kinects using K4aviewer ? do u get the same error .

carcormir commented 4 years ago

@Tarekbouamer I open two instances of k4aviewer and I am able to run both kinects simultaneously without any errors. The problem comes when trying to launch two cameras using the ROS driver

RoseFlunder commented 4 years ago

Well the error just means that the device that is opened by the first instances of the driver node can't be opened by the second instance, which is not a problem to worry about. If you only want the error gone just because of asthehic reasons you could just comment out this line of code in your copy of this package: https://github.com/microsoft/Azure_Kinect_ROS_Driver/blob/bda2956ddbec3eb1f7fb2b2297c84f11255d1ab6/src/k4a_ros_device.cpp#L163

carcormir commented 4 years ago

That is what I already did, but I was not sure if there was another way. Thanks for the help though! Have a great weekend.

jonra1993 commented 4 years ago

Hi @Michae1Park @carcormir , did you solve it? I have same problem when I try to open second Kinect camera?

ooeygui commented 4 years ago

Duplicating to the feature request - https://github.com/microsoft/Azure_Kinect_ROS_Driver/issues/126

working236 commented 2 years ago

cat /sys/module/usbcore/parameters/usbfs_memory_mb

it seems like that i could not fix the problem with your proposal. i turly get 1000 after your instruction, but i still could open 2 device. Could you give me more advice?

leoneversberg commented 2 years ago

I seem to have found a workaround solution to launching two kinect camera nodes on the same computer, as mentioned here or in #236 and #210 The solution seems to be a delay between launching the kinect nodes instead of launching them at the same time. I used this launch-prefix to create a parameter node_start_delay for the azure_kinect_ros_driver node which is set to 1 sec for the second camera.

Here is an example driver.launch for two Azure Kinect cameras:

<launch>
  <arg name="tf_prefix"         default="" />                       <!-- Prefix added to tf frame IDs. It typically contains a trailing '_' unless empty. -->
  <arg name="overwrite_robot_description" default="true" />         <!-- Flag to publish a standalone azure_description instead of the default robot_descrition parameter-->

  <group if="$(arg overwrite_robot_description)">
    <param name="robot_description"
      command="xacro $(find azure_kinect_ros_driver)/urdf/azure_kinect.urdf.xacro tf_prefix:=$(arg tf_prefix)" />
    <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" />
    <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
  </group>

  <group unless="$(arg overwrite_robot_description)">
    <param name="azure_description"
      command="xacro $(find azure_kinect_ros_driver)/urdf/azure_kinect.urdf.xacro tf_prefix:=$(arg tf_prefix)" />
    <node name="joint_state_publisher_azure" pkg="joint_state_publisher" type="joint_state_publisher">
      <remap from="robot_description" to="azure_description" />
    </node>  
    <node name="robot_state_publisher_azure" pkg="robot_state_publisher" type="robot_state_publisher">
      <remap from="robot_description" to="azure_description" />
    </node>
  </group>

  <arg name="depth_enabled"           default="true" />           <!-- Enable or disable the depth camera -->
  <arg name="depth_mode"              default="WFOV_UNBINNED" />  <!-- Set the depth camera mode, which affects FOV, depth range, and camera resolution. See Azure Kinect documentation for full details. Valid options: NFOV_UNBINNED, NFOV_2X2BINNED, WFOV_UNBINNED, WFOV_2X2BINNED, and PASSIVE_IR -->
  <arg name="depth_unit"              default="16UC1" />          <!-- Depth distance units. Options are: "32FC1" (32 bit float metre) or "16UC1" (16 bit integer millimetre) -->
  <arg name="color_enabled"           default="true" />           <!-- Enable or disable the color camera -->
  <arg name="color_format"            default="bgra" />           <!-- The format of RGB camera. Valid options: bgra, jpeg -->
  <arg name="color_resolution"        default="1536P" />          <!-- Resolution at which to run the color camera. Valid options: 720P, 1080P, 1440P, 1536P, 2160P, 3072P -->
  <arg name="fps"                     default="5" />              <!-- FPS to run both cameras at. Valid options are 5, 15, and 30 -->
  <arg name="point_cloud"             default="true" />           <!-- Generate a point cloud from depth data. Requires depth_enabled -->
  <arg name="rgb_point_cloud"         default="true" />           <!-- Colorize the point cloud using the RBG camera. Requires color_enabled and depth_enabled -->
  <arg name="point_cloud_in_depth_frame" default="false" />        <!-- Whether the RGB pointcloud is rendered in the depth frame (true) or RGB frame (false). Will either match the resolution of the depth camera (true) or the RGB camera (false). -->
  <arg name="required"                default="false" />          <!-- Argument which specified if the entire launch file should terminate if the node dies -->
  <arg name="sensor_sn"               default="" />               <!-- Sensor serial number. If none provided, the first sensor will be selected -->
  <arg name="recording_file"          default="" />               <!-- Absolute path to a mkv recording file which will be used with the playback api instead of opening a device -->
  <arg name="recording_loop_enabled"  default="false" />          <!-- If set to true the recording file will rewind the beginning once end of file is reached -->
  <arg name="body_tracking_enabled"           default="false" />  <!-- If set to true the joint positions will be published as marker arrays -->
  <arg name="body_tracking_smoothing_factor"  default="0.0" />    <!-- Set between 0 for no smoothing and 1 for full smoothing -->
  <arg name="rescale_ir_to_mono8"  default="false" />    <!-- Whether to rescale the IR image to an 8-bit monochrome image for visualization and further processing. A scaling factor (ir_mono8_scaling_factor) is applied. -->
  <arg name="ir_mono8_scaling_factor"  default="1.0" />    <!-- Scaling factor to apply when converting IR to mono8 (see rescale_ir_to_mono8). If using illumination, use the value 0.5-1. If using passive IR, use 10. -->
  <arg name="imu_rate_target" default="0"/>                       <!-- Desired output rate of IMU messages. Set to 0 (default) for full rate (1.6 kHz). --> 
  <arg name="node_start_delay" default="1.0" />  <!-- delay for second camera in seconds -->

  <!-- master camera -->
  <node pkg="azure_kinect_ros_driver" type="node" name="azure_kinect_ros_driver1" output="screen" required="$(arg required)">
    <param name="sensor_sn"         type="string" value="xxxxxxxxx" /> <!--$(arg sensor_sn) -->
    <param name="depth_enabled"     type="bool"   value="$(arg depth_enabled)" />
    <param name="depth_mode"        type="string" value="$(arg depth_mode)" />
    <param name="depth_unit"        type="string" value="$(arg depth_unit)" />
    <param name="color_enabled"     type="bool"   value="$(arg color_enabled)" />
    <param name="color_format"      type="string" value="$(arg color_format)" />
    <param name="color_resolution"  type="string" value="$(arg color_resolution)" />
    <param name="fps"               type="int"    value="$(arg fps)" />
    <param name="point_cloud"       type="bool"   value="$(arg point_cloud)" />
    <param name="rgb_point_cloud"   type="bool"   value="$(arg rgb_point_cloud)" />
    <param name="point_cloud_in_depth_frame"   type="bool"   value="$(arg point_cloud_in_depth_frame)" />
    <param name="sensor_sn"         type="string" value="$(arg sensor_sn)" />
    <param name="tf_prefix"         type="string" value="$(arg tf_prefix)" />
    <param name="recording_file"          type="string" value="$(arg recording_file)" />
    <param name="recording_loop_enabled"  type="bool"   value="$(arg recording_loop_enabled)" />
    <param name="body_tracking_enabled"           type="bool"   value="$(arg body_tracking_enabled)" />
    <param name="body_tracking_smoothing_factor"  type="double" value="$(arg body_tracking_smoothing_factor)" />
    <param name="rescale_ir_to_mono8" type="bool" value="$(arg rescale_ir_to_mono8)" />
    <param name="ir_mono8_scaling_factor" type="double" value="$(arg ir_mono8_scaling_factor)" />
    <param name="imu_rate_target" type="int" value="$(arg imu_rate_target)"/>
    <param name="wired_sync_mode" value="1"/> <!-- Wired sync mode. 1: MASTER --> 
    <param name="subordinate_delay_off_master_usec" value="0"/>
  </node>

<!-- subordinate camera -->
<node pkg="azure_kinect_ros_driver" type="node" name="azure_kinect_ros_driver2" output="screen" required="$(arg required)" launch-prefix="bash -c 'sleep $(arg node_start_delay); $0 $@' ">
    <param name="sensor_sn"         type="string" value="yyyyyyyy" /> <!--$(arg sensor_sn) -->
    <param name="depth_enabled"     type="bool"   value="$(arg depth_enabled)" />
    <param name="depth_mode"        type="string" value="$(arg depth_mode)" />
    <param name="depth_unit"        type="string" value="$(arg depth_unit)" />
    <param name="color_enabled"     type="bool"   value="$(arg color_enabled)" />
    <param name="color_format"      type="string" value="$(arg color_format)" />
    <param name="color_resolution"  type="string" value="$(arg color_resolution)" />
    <param name="fps"               type="int"    value="$(arg fps)" />
    <param name="point_cloud"       type="bool"   value="$(arg point_cloud)" />
    <param name="rgb_point_cloud"   type="bool"   value="$(arg rgb_point_cloud)" />
    <param name="point_cloud_in_depth_frame"   type="bool"   value="$(arg point_cloud_in_depth_frame)" />
    <param name="sensor_sn"         type="string" value="$(arg sensor_sn)" />
    <param name="tf_prefix"         type="string" value="$(arg tf_prefix)" />
    <param name="recording_file"          type="string" value="$(arg recording_file)" />
    <param name="recording_loop_enabled"  type="bool"   value="$(arg recording_loop_enabled)" />
    <param name="body_tracking_enabled"           type="bool"   value="$(arg body_tracking_enabled)" />
    <param name="body_tracking_smoothing_factor"  type="double" value="$(arg body_tracking_smoothing_factor)" />
    <param name="rescale_ir_to_mono8" type="bool" value="$(arg rescale_ir_to_mono8)" />
    <param name="ir_mono8_scaling_factor" type="double" value="$(arg ir_mono8_scaling_factor)" />
    <param name="imu_rate_target" type="int" value="$(arg imu_rate_target)"/>
    <param name="wired_sync_mode" value="2"/> <!-- Wired sync mode. 2: SUBORDINATE. --> 
    <param name="subordinate_delay_off_master_usec" value="160"/>
  </node>
</launch>
jiejie567 commented 1 year ago

Hi, @leoneversberg , I wonder after launching two cameras, did they have the same timestamps for the data.

leoneversberg commented 1 year ago

Hi, @leoneversberg , I wonder after launching two cameras, did they have the same timestamps for the data.

I didn't notice any differences in the timestamps or sync issues. I followed the instructions from https://learn.microsoft.com/en-us/azure/kinect-dk/multi-camera-sync and connected both cameras with a 3.5mm cable.