Quantcast
Channel: ROS Answers: Open Source Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 118

how to set framerate of usb_cam above 30FPS?

$
0
0
I am using [this usb_camera](https://www.aliexpress.com/item/2MP-CMOS-OV2710-High-30-60-120-fps-Industrial-Mini-1-05mm-Wide-angle-fisheye-lens/32727795207.html?spm=2114.search0104.3.21.722c46e5Zy4PUx&ws_ab_test=searchweb0_0,searchweb201602_1_10152_10151_10065_10344_10068_10342_10343_5722611_10340_10341_10696_5722911_5722811_5722711_10084_10083_10618_10307_10059_100031_10103_10624_10623_10622_10621_10620_5722511,searchweb201603_11,ppcSwitch_5&algo_expid=1fe968f7-f35e-435a-8cae-9b3de4480f2b-3&algo_pvid=1fe968f7-f35e-435a-8cae-9b3de4480f2b&priceBeautifyAB=0). I want to use the frame rate 120FPS `640x480`. I passed the parameter `` 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: How can I change the framerate in `usb_cam` above 30FPS.

Viewing all articles
Browse latest Browse all 118

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>