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

No disparity from connected and synced stereo images (stereo_image_proc)

asked 2016-07-27 12:06:13 -0500

perfectspeed gravatar image

Hi I'm running some sensors on a system with Ubuntu 14.04 and Indigo. I use two Prosilica 1350 in a stereo setup with a resolution of 1360x1024. The cameras are calibrated with cameracalibrator.py and the .yaml-files are placed in ~/.ros/camera_info They are synced by hardware and I've checked the timing in rqt and they are within three microseconds (3 us). I use a launchfile with the relevant content showed below.

Problem: I do not get any disparity from the stereo_image_proc. Question: What do I need to change in my launchfile to get the disparity?

I have tried everything on the "Possible issue"-list:

Possible issues:
        * stereo_image_proc is not running.     // Yes, its running ! 
          Does `rosnode info /stereo_cam` show any connections?   // It shows connections
        * The cameras are not synchronized.   // By Hardware
          Try restarting stereo_view with parameter _approximate_sync:=True     // Done 
        * The network is too slow. One or more images are dropped from each triplet.   
          Try restarting stereo_view, increasing parameter 'queue_size' (currently 50)     
          // Tried queue_size from 5 to 500 and even resized images

Sorry, I'm not able to upload any image of rosgraph, but the nodes seem connected. I get the following warning:

[ WARN] [1469637939.617985018]: [stereo_view] Low number of synchronized left/right/disparity triplets received.
Left images received:      493 (topic '/stereo/left/image_rect')
Right images received:     492 (topic '/stereo/right/image_rect')
Disparity images received: 0 (topic '/stereo/disparity')
Synchronized triplets: 0

rostopic echo /stereo/left/image_rect and rostopic echo /stereo/right/image_rect show running data.

rosnode info /stereo_cam shows:

 Node [/stereo_cam]
    Publications: 
     * /rosout [rosgraph_msgs/Log]

Subscriptions: 
 * /stereo/left/image_rect_color [sensor_msgs/Image]
 * /stereo/disparity [stereo_msgs/DisparityImage]
 * /stereo/right/image_rect_color [sensor_msgs/Image]

Services: 
 * /stereo_cam/set_logger_level
 * /stereo_cam/get_loggers

contacting node http://sas2-truck:33253/ ...
Pid: 13170
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /stereo/left/image_rect_color
    * to: /stereo/stereo_image_proc (http://sas2-truck:35006/)
    * direction: inbound
    * transport: TCPROS
 * topic: /stereo/right/image_rect_color
    * to: /stereo/stereo_image_proc (http://sas2-truck:35006/)
    * direction: inbound
    * transport: TCPROS
 * topic: /stereo/disparity
    * to: /stereo/stereo_image_proc (http://sas2-truck:35006/)
    * direction: inbound
    * transport: TCPROS

Launchfile:

  <!-- Group with namespace, i.e. stereo -->
<group ns="stereo">  

  <!-- Left camera node --> 
  <node name="left" pkg="prosilica_camera" type="prosilica_node" output="screen"  >
     <param name="guid" type="str" value="$(arg guid)" />
    <param name="ip_address" type="str" value="192.168.101.2" />
    <param name="frame_id" value="left_optical_frame" />
    <rosparam command="load" file="cam_settings_1350_Kollmorgen.yaml" />
   <remap from="image_raw" to="/stereo/left/image_raw" />
   <remap from="camera_info" to="/stereo/left/camera_info" /> 
 </node>

  <!-- Right camera node -->
  <node name="right" pkg="prosilica_camera" type="prosilica_node" output="screen"  >
     <param name="guid" type="str" value="$(arg guid)" />
    <param name="ip_address" type="str" value="192.168.102.2" />
    <param name="frame_id" value="right_optical_frame" />
    <rosparam command="load" file="cam_settings_1350_Kollmorgen.yaml" /> 
   <remap from="image_raw" to="/stereo/right/image_raw" />
   <remap from="camera_info" to="/stereo/right/camera_info" /> 
 </node> 

<node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" output="screen" > 
<param name="approximate_sync" value="0.01" />
</node>
</group> 

<node name="stereo_cam" pkg="image_view" type="stereo_view" output="screen" >
<param name="queue_size" value="50" />
<param name="approximate_sync" value="True" />
<remap from="stereo/left/image" to="/stereo ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-08-18 04:05:33 -0500

Miquel Massot gravatar image

updated 2016-08-18 04:11:12 -0500

Hi!

you are mixing namespaces... remove the remappings at the end of your launchfile, and in the cameras publish to /left/image_raw and /right/image_raw (without the "/stereo"!) because you grouped everything inside a namespace.

Right now, cameras are publishing at /stereo/stereo/left_or_right/image_raw and stereo_image_proc expects them to be at /stereo/left_or_right/image_raw...

edit flag offensive delete link more

Comments

Thanks for your answer, Miquel. I changed the launch file to the one shown in my answer. I do not get any better result, even though the code is more correct.

perfectspeed gravatar image perfectspeed  ( 2016-08-28 12:26:37 -0500 )edit
0

answered 2016-08-28 12:23:16 -0500

perfectspeed gravatar image

updated 2016-08-28 12:24:44 -0500

Thanks for your answer, Miquel. I changed the launch file to the code shown below. There are no change in output. Running rosrun rqt_graph rqt_graph the nodes seem all connected. rosnode list show:

/stereo/left
/stereo/right
/stereo/stereo_image_proc
/stereo_cam

and rosnode info stereo_cam

Node [/stereo_cam]
Publications: 
 * /rosout [rosgraph_msgs/Log]

Subscriptions: 
 * /stereo/right/image [unknown type]
 * /stereo/left/image [unknown type]
 * /stereo/disparity [stereo_msgs/DisparityImage]

Services: 
 * /stereo_cam/set_logger_level
 * /stereo_cam/get_loggers


contacting node http://sas2-truck:46038/ ...
Pid: 2161
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /stereo/disparity
    * to: /stereo/stereo_image_proc (http://sas2-truck:44066/)
    * direction: inbound
    * transport: TCPROS

Part of the launch file:

<group ns="stereo">  

  <!-- Left camera node --> 
  <node name="left" pkg="prosilica_camera" type="prosilica_node" output="screen" >
    <param name="ip_address" type="str" value="192.168.101.2" />
    <param name="frame_id" value="left_optical_frame" />
    <rosparam command="load" file="cam_settings_1350_Kollmorgen.yaml" />
   <remap from="image_raw" to="/left/image_raw" />
   <remap from="camera_info" to="/left/camera_info" /> 
 </node>


  <!-- Right camera node -->
  <node name="right" pkg="prosilica_camera" type="prosilica_node" output="screen" >
    <param name="ip_address" type="str" value="192.168.102.2" />
    <param name="frame_id" value="right_optical_frame" />
    <rosparam command="load" file="cam_settings_1350_Kollmorgen.yaml" /> 
   <remap from="image_raw" to="/right/image_raw" />
   <remap from="camera_info" to="/right/camera_info" /> 
 </node> 


<node name="stereo_image_proc" pkg="stereo_image_proc" type="stereo_image_proc" output="screen"  > 
<param name="approximate_sync" value="0.05" />
</node>
</group>


<node name="stereo_cam" pkg="image_view" type="stereo_view" output="screen" >
<param name="queue_size" value="500" />
<param name="approximate_sync" value="True" />
</node>
edit flag offensive delete link more

Comments

Hello! have you got the solutions? thx!

ZionGo gravatar image ZionGo  ( 2023-07-05 03:20:48 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-27 12:06:13 -0500

Seen: 1,065 times

Last updated: Aug 28 '16