how to set framerate of usb_cam above 30FPS?
I am using this usb_camera. I want to use the frame rate 120FPS 640x480
.
I passed the parameter <framerate>
in launch file. But when i check the average rate of topic `rostopic hz usb_cam/image_raw . its showing 30HZ only. Actually it should be 120 !!!
I also try hardcoding the ros::Rate
to 120, but is doesn't effect the output of average rate.
bool spin(){
ros::Rate loop_rate(this -> framerate_);
while (node_.ok())
{
if (cam_.is_capturing()) {
if (!take_and_send_image()) ROS_WARN("USB camera did not respond in time.");
}
//ROS_INFO("framerate_ '%i'", framerate_ );
ros::spinOnce();
loop_rate.sleep();
}
return true; }
Are there any restrictions on increasing the framerate above 30FPS. When I change the frame rate below 30 is show the changes but not above the 30FPS. My usb_cam launch file parameters are as:
<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="640" />
<param name="image_height" value="480" />
<param name="pixel_format" value="yuyv" />
<param name="camera_frame_id" value="usb_cam" />
<param name="io_method" value="mmap"/>
<param name="framerate" value="120" />
</node>
How can I change the framerate in usb_cam
above 30FPS.
Do you see an option to set the framerate that high using
guvcview
?I want to use with ROS. I think its just a video viewer in linux. if no, please give some link
I want to use withROS. I think its just a video viewer in linux. if no, please give some link
If it doesn't work in guvcview then it probably won't work in usb_cam