I encountered a bug while using the zed_multi_cam.launch from the zed-ros-example package

I encountered a bug while using the zed_multi_cam.launch from the zed-ros-example package.

good case

[ INFO] [1693355823.558812812]: *** Opening ZED X...
[ INFO] [1693355823.604383824]: * Camera coordinate system -> Right HANDED Z UP and X FORWARD
[ INFO] [1693355823.604560624]: *** Opening ZED X Mini...
[ INFO] [1693355824.034480708]: Stereo is NOT SUPPORTED
[ INFO] [1693355824.034632676]: OpenGL device: NVIDIA Tegra Orin (nvgp
[ INFO] [1693355492.062182718]: OpenGl version: 4.6 (GLSL 4.6).
[ INFO] [1693355497.090045828]: ZED connection -> SUCCESS

bad case

[ INFO] [1693355870.361131585]: *** Opening ZED X Mini...
[ INFO] [1693355870.412381492]: * Camera coordinate system -> Right HANDED Z UP and X FORWARD
[ INFO] [1693355870.412560053]: *** Opening ZED X...
[ INFO] [1693355870.493121089]: ZED connection -> CAMERA NOT DETECTED
[ INFO] [1693355870.543917298]: ZED connection -> CAMERA NOT DETECTED

When opening “zedx” first and then opening “zedxm,” it shows “ZED connection → SUCCESS.” However, when opening “zedxm” first and then opening “zedx,” it displays “ZED connection → CAMERA NOT DETECTED.”

Hi @sdk17586
what version of the ZED SDK and ZED X driver are you using?

i using jetpack 5.1.1, stereolabs-zedx_0.5.4-MAX96712-L4T35.3.1_arm64.deb, ZED_SDK_Tegra_L4T35.3_v4.0.6.zstd.run*

@sdk17586 did you correctly modify the launch file to add the serial number of the cameras in order to open the right camera associated to the model?

my camera zedx serial_num=42343965, zedxm=55763947.

this is launch file.

<!-- CAMERA 2 -->
<arg name="node_name_2"          default="zed_node_B" />
<arg name="camera_model_2"       default="zed" />
<arg name="camera_name_2"        default="zedB" />
<arg name="cam_pos_x_2"          default="0.0" /> <!-- Position respect to base frame (i.e. "base_link) -->
<arg name="cam_pos_y_2"          default="-0.28" /> <!-- Position respect to base frame (i.e. "base_link) -->
<arg name="cam_pos_z_2"          default="-0.04" /> <!-- Position respect to base frame (i.e. "base_link) -->
<arg name="cam_roll_2"           default="0.0" /> <!-- Orientation respect to base frame (i.e. "base_link) -->
<arg name="cam_pitch_2"          default="0.0" /> <!-- Orientation respect to base frame (i.e. "base_link) -->
<arg name="cam_yaw_2"            default="0.0" /> <!-- Orientation respect to base frame (i.e. "base_link) -->

<group ns="$(arg camera_name_1)">
    <include file="$(find zed_multicamera_example)/launch/include/zed_camera_mod.launch">
        <arg name="camera_name"         value="$(arg camera_name_1)" />
        <arg name="node_name"           value="$(arg node_name_1)" />
        <arg name="camera_model"        value="$(arg camera_model_1)" />
        <arg name="publish_urdf"        value="$(arg publish_urdf)" />
        <arg name="publish_tf"          value="true" />
        <arg name="camera_id"           value="0" />
    </include>
</group>

<group ns="$(arg camera_name_2)">
    <include file="$(find zed_multicamera_example)/launch/include/zed_camera_mod.launch">
        <arg name="camera_name"         value="$(arg camera_name_2)" />
        <arg name="node_name"           value="$(arg node_name_2)" />
        <arg name="camera_model"        value="$(arg camera_model_2)" />
        <arg name="publish_urdf"        value="true" />
        <arg name="publish_tf"          value="false" /> <!-- Only the main camera must publish TF! -->
        <arg name="camera_id"           value="1" />

        <arg name="cam_pos_x"         value="$(arg cam_pos_x_2)" />
        <arg name="cam_pos_y"         value="$(arg cam_pos_y_2)" />
        <arg name="cam_pos_z"         value="$(arg cam_pos_z_2)" />
        <arg name="cam_roll"          value="$(arg cam_roll_2)" />
        <arg name="cam_pitch"         value="$(arg cam_pitch_2)" />
        <arg name="cam_yaw"           value="$(arg cam_yaw_2)" />
    </include>
</group>
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find zed_multicamera_example)/rviz/multi_cam.rviz" output="screen" />

There is no arg in this code to input serial_num.

Please try to set the camera_sn parameters instead of camera_id like in the nodelet example: