Image_proc causes images to hang
I have calibrated two pointgrey cameras to operate in stereo using the tutorial. I also have a similar setup still running in ros electric, so I know the system works in a slightly different configuration.
Here is my launch file for the cameras: cam.l :
<launch>
<group ns="left" >
<node pkg="nodelet" type="nodelet" name="left_manager" args="manager" />
<node pkg="nodelet" type="nodelet" name="camera1394_nodelet" args="load camera1394/driver left_manager">
<rosparam file="/home/turtlebot/BitSync/hast/workingDir/cam_info/kob_left_00b09d0100c8851b.yaml" />
<param name="guid" value="00b09d0100c8851b" />
</node>
<node pkg="nodelet" type="nodelet" name="image_proc_debayer" args="load image_proc/debayer left_manager">
<param name="bayer_pattern" value="rggb" />
<param name="guid" value="00b09d0100c8851b" />
<remap from="image_color" to="camera/image_color" />
<remap from="image_mono" to="camera/image_mono" />
<remap from="image_raw" to="camera/image_raw" />
</node>
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc" />
</group>
<group ns="right" >
<node pkg="nodelet" type="nodelet" name="right_manager" args="manager" />
<node pkg="nodelet" type="nodelet" name="camera1394_nodelet" args="load camera1394/driver right_manager">
<param name="guid" value="00b09d0100c884f8" />
<rosparam file="/home/turtlebot/BitSync/hast/workingDir/cam_info/kob_right_00b09d0100c884f8.yaml" />
</node>
<node pkg="nodelet" type="nodelet" name="image_proc_debayer" args="load image_proc/debayer right_manager">
<param name="bayer_pattern" value="rggb" />
<param name="guid" value="00b09d0100c884f8" />
<remap from="image_color" to="camera/image_color" />
<remap from="image_mono" to="camera/image_mono" />
<remap from="image_raw" to="camera/image_raw" />
</node>
<node ns="camera" pkg="image_proc" type="image_proc" name="image_proc" />
</group>
</launch>
Here is the launch file for viewing the images:
<launch>
<group ns="left" >
<node pkg="image_view" type="image_view" name="image_view" >
<remap from="image" to="camera/image_raw" />
</node>
</group>
<group ns="right" >
<node pkg="image_view" type="image_view" name="image_view" >
<remap from="image" to="camera/image_raw" />
</node>
</group>
</launch>
In some configurations, when I launch the files both with create the relevant ros nodes. After about 1-3 seconds, one of the cameras will hang and never recover. When I ctrl-c to kill the process, ros reports and error with the nodelet package:
*** Error in `/opt/ros/indigo/lib/nodelet/nodelet': free(): invalid pointer: 0x00007fded404b9f8 ***
When I use /image_raw and suppress the image_proc and image_proc_debayer packages, I have no issues. If I mix the image_view package in with the nodelet launch file, one of the images will hang. Using either image_proc or image_proc_debayer will also cause the hang.
Any idea what is causing the hang?
The image_view hang might be an unrelated issue: http://answers.ros.org/question/19387...
Strangely, if I preempt the call to image view with rostopic hz /left... and /right..., then call the package, it works fine.
This was the same issue. Updating fixed the issue.