Closed aristow1 closed 1 year ago
Hello @aristow1 pleas format code/logs etc. with the standard markdown functions for that. This makes it much easier for other to read your post and be able to help you (I edited your post already for you).
<arg name="camera_name" default="" />
Here is an untested minimal example which should work:
test_two_cameras.launch
<launch>
<node name="check_ueye_api" pkg="ueye_cam" type="check_ueye_api" required="true" />
<arg name="nodelet_manager_name" value="nodelet_manager" />
<node pkg="nodelet" type="nodelet" name="$(arg nodelet_manager_name)" args="manager" output="screen" />
<!--Stereo Camera left-->
<node pkg="nodelet" type="nodelet" name="ueye_cam_nodelet_stereo_left"
args="load ueye_cam/ueye_cam_nodelet $(arg nodelet_manager_name)">
<param name="camera_name" type="str" value="stereo_left" /> <!-- == namespace for topics and services -->
<param name="camera_topic" type="str" value="image_raw" />
<param name="camera_id" type="int" value="1" />
<param name="color_mode" type="str" value="rgb8" /> <!-- valid options: 'rgb8', 'mono8', 'bayer_rggb8' -->
<param name="image_width" type="int" value="1600" />
<param name="image_height" type="int" value="1200" />
<param name="image_top" type="int" value="-1" /> <!-- -1: center -->
<param name="image_left" type="int" value="-1" /> <!-- -1: center -->
</node>
<!--Stereo Camera right-->
<node pkg="nodelet" type="nodelet" name="ueye_cam_nodelet_stereo_right"
args="load ueye_cam/ueye_cam_nodelet $(arg nodelet_manager_name)">
<param name="camera_name" type="str" value="stereo_right" /> <!-- == namespace for topics and services -->
<param name="camera_topic" type="str" value="image_raw" />
<param name="camera_id" type="int" value="5" />
<param name="color_mode" type="str" value="rgb8" /> <!-- valid options: 'rgb8', 'mono8', 'bayer_rggb8' -->
<param name="image_width" type="int" value="1600" />
<param name="image_height" type="int" value="1200" />
<param name="image_top" type="int" value="-1" /> <!-- -1: center -->
<param name="image_left" type="int" value="-1" /> <!-- -1: center -->
</node>
thank you this helped me ! and then i just can add as much cameras as i want to the launch file with their respective names and ID right ?
Yes, you need to set the name and ID.
please close the issue if it is resolved
im trying to work with 4 IDS camera but im first testing with only 2. in the launch file i added a 2 second node and changed the camera_name param and the camera_id param. here is my launch file :
and in the the terminal i get this when i roslaunch the rgb8.launch file :
why is it showing /camera/image_raw although i changed the namespace to camera1 and camera2 and how can i fix this Problem. Thank you.