camera_1394 nodelet speed issues on Gumstix
Hello all,
The battle of getting images processed on a Gumstix continues (see This Question for getting OpenCV running efficiently on Gumstix). As I've gotten in to monitoring more closely what is going on with my code, I'm noticing that the camera_1394 nodelet is taking up a significant amount of processor time (on the order of 60%-70%). Further, I've stripped down the nodelet to only perform image debayering in hopes of minimizing the amount of processing performed, but this seems to accomplish little in terms of reducing processor load. I was hoping that someone might be able to shed some light on why this little nodelet is such a processor hog, and what I might do in order to reduce the amount of CPU time it takes up. For reference, here is my launch file:
<launch>
<!-- nodelet manager process -->
<node pkg="nodelet" type="nodelet" name="camera_nodelet_manager"
args="manager" />
<!-- camera driver nodelet -->
<node pkg="nodelet" type="nodelet" name="camera1394_nodelet"
args="load camera1394/driver camera_nodelet_manager">
<rosparam file="$(find omnisensor)/params/ffmv.yaml" />
</node>
<!-- Bayer color decoding -->
<node pkg="nodelet" type="nodelet" name="image_proc_debayer"
args="load image_proc/debayer camera_nodelet_manager">
<param name="bayer_pattern" value="rggb" />
<param name="bayer_method" value="" />
<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 pkg="image_view" type="image_view" name="image_view" >
<remap from="image" to="camera/image_color"/>
</node>
<node pkg="omnisensor" type="find_laser_filtered.py" name="laser_filter" />
<node pkg="image_view" type="image_view" name="laser_filter_view" >
<remap from="image" to="laser_image"/>
</node>
</launch>
Just to clarify what's going on here, the find_laser_filtered.py is the code I'm running for my application, and the image_views are for debugging purposes. Both image_view nodes die on launch, I keep them there so I can run the same launch file on my dev machine and the robot.
Anyway, any ideas you might have to reduce the CPU load caused by the camera1394 nodelet would be much appreciated.
Thanks, Bradley Powers
Update
Here's my ffmv.yaml file, as called by the camera driver nodelet.
{auto_brightness: 2, auto_exposure: 2, auto_focus: 5, auto_gain: 2, auto_gamma: 0,
auto_hue: 5, auto_iris: 5, auto_saturation: 5, auto_sharpness: 5, auto_shutter: 2,
auto_white_balance: 3, auto_zoom: 5, bayer_method: '', bayer_pattern: rggb, binning_x: 0,
binning_y: 0, brightness: 138.0, camera_info_url: '', exposure: 0.0, focus: 0.0,
format7_color_coding: mono8, format7_packet_size: 0, frame_id: /camera, frame_rate: 60.0,
gain: 12.041193008422852, gamma: 1.2000000000000002, guid: 00b09d0100a80b41, hue: 0.0,
iris: 8.0, iso_speed: 400, reset_on_open: false, roi_height: 0, roi_width: 0, saturation: 1.0,
sharpness: 1.0, shutter: 0.066243231296539307, use_ros_time: true, video_mode: 640x480_mono8,
white_balance_BU: 512.0, white_balance_RV: 512.0, x_offset: 0, y_offset: 0, zoom: 0.0}
The file was auto generated through dynamic_reconfigure.
Update
I was mistaken! The nodelet taking up all of the processing time isn't the camera1394_nodelet (1% CPU utilization), it's the camera_nodelet_manager (37% utilization)!
Why on earth is the manager requiring sooo much CPU? If I'm understanding correctly, it's simply there to monitor for crashes...