0
$\begingroup$

Rosanswers logo

Hello,

I am using usb_cam module to get image from my usb logitech c910. I am using the following usb_cam.launch file:

<launch>
<node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" >
    <param name="video_device" value="/dev/video0" />
    <param name="image_width" value="800" />
    <param name="image_height" value="600" />
    <param name="framerate" value="50" />
    <param name="pixel_format" value="mjpeg" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap" />
</node>
<node name="to_mono_node1" pkg="image_proc" type="image_proc" ns="usb_cam" />
<node name="image_view" pkg="image_view" type="image_view" respawn="false" output="screen">
    <remap from="image" to="/usb_cam/image_mono" />
    <param name="autosize" value="true" />
</node></launch>

When I launch roslaunch usb_cam usb_cam.launch it indeed works and reports "Starting 'head_camera' (/dev/video0) at 800x600 via mmap (mjpeg) at 50 FPS"

However, when I use rostopic hz --window=1000 /usb_cam/image_raw it will still report 24hz like:

subscribed to [/usb_cam/image_raw]
average rate: 23.950
    min: 0.037s max: 0.047s std dev: 0.00267s window: 23
average rate: 23.994
    min: 0.037s max: 0.047s std dev: 0.00233s window: 47

How can I make sure that the image is pipelined at 50Hz?

Best regards, C.


Originally posted by wintermute on ROS Answers with karma: 180 on 2016-03-01

Post score: 1

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I am answering my own question:

The frame rate was low, due to lighting conditions. When I turned a bright light the FPS increased to 60.

This is due to camera autoexposure. If we put on the launch file the property: autoexposure false, then the camera will capture at 60fps, (but not so bright picture)

Best regards, C.


Originally posted by wintermute with karma: 180 on 2016-03-02

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by gvdhoorn on 2016-03-02:
Thanks for reporting back your solution. Could you accept your own answer?

Comment by wintermute on 2016-03-02:
thanks. done.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.