How to launch 2 camera at the same time using uvc_camera_node

asked 2023-06-12 03:46:16 -0500

nemunatu gravatar image

I tried to launch both camera using this launch code <launch> <node name="lenti_mark" pkg="lenti_mark" type="lenti_mark" output="screen" &gt;="" <!--="" marker="" param="" file="" --="">

<!-- camera param -->

<!-- type  0:file 1:topic (CameraInfo) -->
<param name="campara_type" value="0"/>

<!-- camera param file -->
<param name="cam_param_file" value="$(find lenti_mark)/Data/CameraParams/20.txt"/>

<!-- debug (RViz) -->
<!--TF frame_id world -->
<param name="world_flg" value="true" />
<!-- camera position -->_AL
<param name="cam_pos_x" value="0.0" />
<param name="cam_pos_y" value="0.0" />
<param name="cam_pos_z" value="0.3" />

</node>

<group ns="camera_right">
    <node name="uvc_camera" pkg="uvc_camera" type="uvc_camera_node" output="screen">
        <param name="device" type="string" value="/dev/video4"/>
        <param name="width" value="1920"/>
        <param name="height" value="1080"/>
        <param name="pixel_format" value="MJPG"/>
        <param name="fps" value="30"/>
        <param name="focus_auto" value="0" />
        <param name="frame_id" value="camera_right"/>
    </node>
</group>

<group ns="camera_left">
    <node name="uvc_camera" pkg="uvc_camera" type="uvc_camera_node" output="screen">
        <param name="device" type="string" value="/dev/video3"/>
        <param name="width" value="1920"/>
        <param name="height" value="1080"/>
        <param name="pixel_format" value="MJPG"/>
        <param name="fps" value="30"/>
        <param name="focus_auto" value="0" />
        <param name="frame_id" value="camera_left"/>
    </node>
</group>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find lenti_mark)/launch/leag.rviz"/>

</launch>

But i just get 1 camera launched eventhough both of the topic is already published.

C:\fakepath\Screenshot from 2023-06-12 17-38-39.png

I also got this error messages :

[camera_right/uvc_camera-2] process has died [pid 4962, exit code -6, cmd /opt/ros/melodic/lib/uvc_camera/uvc_camera_node __name:=uvc_camera __log:=/home/member/.ros/log/422f3266-08f8-11ee-88d7-e4a7a0e56889/camera_right-uvc_camera-2.log]. log file: /home/member/.ros/log/422f3266-08f8-11ee-88d7-e4a7a0e56889/camera_right-uvc_camera-2*.log

I am still very new with ROS, so I really appreciate if anyone have an idea about this problem.

edit retag flag offensive close merge delete