ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to create disparity images with ueye_cam and nodelets

asked 2018-02-23 10:47:57 -0600

Julian98 gravatar image

Hi there,

I'm currently trying to get a disparity image out of a pair of externally triggered UEye cameras from IDS. I'm using nodelets instead of nodes to avoid overhead and desynchronization caused by the transfer of data over TCP and the necessary (de)serialization. My cameras are working and I get rectified versions of the camera image, but the last nodelet in the launchfile advertises a "disparity" topic but does not publish any data for it.

Below you can see my launchfile:

<launch>

   <arg name="manager" default="nodelet_manager"/> 

   <node pkg="nodelet" type="nodelet" name="$(arg manager)" args="manager" output="screen" />

   <node pkg="nodelet" type="nodelet" name="ueye_cam_nodelet_left"
      args="load ueye_cam/ueye_cam_nodelet $(arg manager)">
      <param name="camera_name" type="str" value="left" /> <!-- == namespace for topics and services -->
      <param name="camera_topic" type="str" value="image_raw" />
      <param name="camera_id" type="int" value="1" /> <!-- 0 = any camera; 1+: camera ID -->
      <param name="camera_intrinsics_file" type="string" value="$(find ueye_cam)/resources/left.yaml" /> <!-- default: ~/.ros/camera_info/<camera_name>.yaml -->
      <param name="camera_parameters_file" type="string" value="" /> <!-- default: ~/.ros/camera_conf/<camera_name>.ini -->
      <param name="ext_trigger_mode" type="bool" value="True" /> <!-- if False, then camera will operate in free-run mode; otherwise, frames need to be triggered by hardware signal (falling-edge) on digital input pin of camera -->
[...]
</node>

<node pkg="nodelet" type="nodelet" name="ueye_cam_nodelet_right"
    args="load ueye_cam/ueye_cam_nodelet $(arg manager)">
      <param name="camera_name" type="str" value="right" /> <!-- == namespace for topics and services -->
      <param name="camera_topic" type="str" value="image_raw" />
      <param name="camera_id" type="int" value="2" /> <!-- 0 = any camera; 1+: camera ID -->
      <param name="camera_intrinsics_file" type="string" value="" /> <!-- default: ~/.ros/camera_info/<camera_name>.yaml -->
      <param name="camera_parameters_file" type="string" value="" /> <!-- default: ~/.ros/camera_conf/<camera_name>.ini -->
      <param name="ext_trigger_mode" type="bool" value="True" /> <!-- if False, then camera will operate in free-run mode; otherwise, frames need to be triggered by hardware signal (falling-edge) on digital input pin of camera -->
[...]
</node>

<node pkg="nodelet" type="nodelet" name="debayer_left"
    args="load image_proc/debayer $(arg manager)">
      <remap from="image_raw" to="/left/image_raw" />
      <remap from="image_mono" to="/left/image_mono" />
      <remap from="image_color" to="/left/image_color" />
</node>

<node pkg="nodelet" type="nodelet" name="debayer_right"
  args="load image_proc/debayer $(arg manager)">
      <remap from="image_raw" to="/right/image_raw" />
      <remap from="image_mono" to="/right/image_mono" />
      <remap from="image_color" to="/right/image_color" />
</node>

<node pkg="nodelet" type="nodelet" name="rectifier_right"
  args="load image_proc/rectify $(arg manager)">
      <remap from="camera_info" to="/right/camera_info" />
      <remap from="image_mono" to="/right/image_mono" />
      <remap from="image_rect" to="/right/image_rect" />
</node>

<node pkg="nodelet" type="nodelet" name="rectifier_left"
  args="load image_proc/rectify $(arg manager)">
      <remap from="camera_info" to="/left/camera_info" />
      <remap from="image_mono" to="/left/image_mono" />
      <remap from="image_rect" to="/left/image_rect" />
</node>

<node pkg="nodelet" type="nodelet" name="disparity"
args="load stereo_image_proc/disparity $(arg manager)" />

</launch>
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-02-23 15:23:55 -0600

Thomas D gravatar image

Even though you have hardware triggering on for your cameras the message timestamps may not be exactly the same. You can bag some of your images and then use rqt_bag to see if the timestamps from your 2 images and 2 camera info messages are the same.

If they are not synced then you should add the following to your disparity node in your launch file:

<param name="approximate_sync" value="true"/>
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-02-23 10:47:57 -0600

Seen: 289 times

Last updated: Feb 23 '18