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

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.

Problem with usb_cam in melodic using laptop integrated camera

$
0
0
I installed ros, usb_cam successfully however when I run the command:> rosrun usb-cam usb-cam-node I get the following error: [ INFO] [1532657507.128646432]: using default calibration URL [ INFO] [1532657507.129513301]: camera calibration URL: file:///home/pedro/.ros/camera_info/head_camera.yaml [ INFO] [1532657507.129663131]: Unable to open camera calibration file [/home/pedro/.ros/camera_info/head_camera.yaml] [ WARN] [1532657507.129701080]: Camera calibration file /home/pedro/.ros/camera_info/head_camera.yaml not found. [ INFO] [1532657507.129746222]: Starting 'head_camera' (/dev/video0) at 640x480 via mmap (mjpeg) at 30 FPS [ WARN] [1532657507.864252000]: unknown control 'focus_auto' > [ERROR] [1532657507.943121832]: outbuf> size mismatch. pic_size: 1843200> bufsize: 614400

Why can't I install usb-cam package at RPI3?

$
0
0
Hello, I have installed Raspbian Stretch at my RPi3 and the ros_comm for the ROS Kinetic package (since it was the recommended one from the ros wiki). However, when I try to install any package the message I receive is "E: unable to locate package" . For example, I type at the terminal "sudo apt-get install ros-kinetic-usb-cam" and the message I receive is the above. Any suggestions about what I am doing wrong? ---------- Update: I have followed the instructions from [this site](https://wiki.ros.org/ROSberryPi/Installing%20ROS%20Kinetic%20on%20the%20Raspberry%20Pi): $ rosinstall_generator ros_comm --rosdistro kinetic --deps --wet-only --tar > kinetic-ros_comm-wet.rosinstall $ wstool init src kinetic-ros_comm-wet.rosinstall

focus setting in usb_cam

$
0
0
When I try to use `usb_cam` to control uvc camera, setting the "focus" parameter in the launch file, it seems to have no effect on my image result. But it does have effects when I change the "image_height" or "image_width" parameters. why did it happen? Here is my lanuch file code: Also, if I use `guvcview` to change its focus, it does have effects and can keep the focus parameter in mind.

usb_cam package and head_camera.yaml missing

$
0
0
Hello, I am new to ROS. I have been trying to do usb camera integration into a robotics project at our university's lab. I will write the steps i did and the errors that i got. 1. I went into my ~/catkin_ws/src folder and i ran git clone https://github.com/bosch-ros-pkg/usb_cam 2. Then I went into my ~/catkin_ws folder and ran source /devel/setup.bash 3. Then I ran roscore 4. Then I ran roslaunch usb_cam usb_cam-test.launch 5. This was the output ... logging to /home/submetu/.ros/log/1fd73732-55ad-11e6-a65d-d8fc93edb7dc/roslaunch-submetu-9724.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://submetu:40095/ SUMMARY ======== PARAMETERS * /image_view/autosize: True * /rosdistro: kinetic * /rosversion: 1.12.2 * /usb_cam/camera_frame_id: usb_cam * /usb_cam/image_height: 480 * /usb_cam/image_width: 640 * /usb_cam/io_method: mmap * /usb_cam/pixel_format: yuyv * /usb_cam/video_device: /dev/video0 NODES / image_view (image_view/image_view) usb_cam (usb_cam/usb_cam_node) ROS_MASTER_URI=http://localhost:11311 core service [/rosout] found process[usb_cam-1]: started with pid [9742] ERROR: cannot launch node of type [image_view/image_view]: can't locate node [image_view] in package [image_view] [ INFO] [1469813059.142822397]: using default calibration URL [ INFO] [1469813059.142904972]: camera calibration URL: file:///home/submetu/.ros/camera_info/head_camera.yaml [ INFO] [1469813059.142970068]: Unable to open camera calibration file [/home/submetu/.ros/camera_info/head_camera.yaml] [ WARN] [1469813059.142995991]: Camera calibration file /home/submetu/.ros/camera_info/head_camera.yaml not found. [ INFO] [1469813059.143027047]: Starting 'head_camera' (/dev/video0) at 640x480 via mmap (yuyv) at 30 FPS [ERROR] [1469813064.141746901]: VIDIOC_S_FMT error 5, Input/output error terminate called after throwing an instance of 'boost::exception_detail::clone_impl>' what(): boost: mutex lock failed in pthread_mutex_lock: Invalid argument [usb_cam-1] process has died [pid 9742, exit code -6, cmd /home/submetu/catkin_ws/devel/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/submetu/.ros/log/1fd73732-55ad-11e6-a65d-d8fc93edb7dc/usb_cam-1.log]. log file: /home/submetu/.ros/log/1fd73732-55ad-11e6-a65d-d8fc93edb7dc/usb_cam-1*.log all processes on machine have died, roslaunch will exit shutting down processing monitor... ... shutting down processing monitor complete done I tried the tutorial of http://wiki.ros.org/camera_calibration , but I am not getting any camera output because the above error comes everytime. So I cant calibrate i.e. i cant get the head_camera.yaml file. I looked at many tutorials but I could not find anything helpful to me. Please help :( Thank you in advance (im using a lenovo thinkpad e440 with ubuntu. My camera is a logitech camera(it is connected as cheese is giving video output))

USB_CAM error : Input/output error

$
0
0
Hi, I want to use web-camera(Logicool Webcam C210) I use usb-cam package,but I cannnot see the web-camera view. My launch file is below, So,I got the error messages [ERROR] [1536468451.681312829]: VIDIOC_S_FMT error 5, Input/output error [usb_cam-2] process has died [pid 4954, exit code 1, cmd /opt/ros/kinetic/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/username/.ros/log/729b5ef0-b3eb-11e8-a98a-a44e31601874/usb_cam-2.log]. log file: /home/username/.ros/log/729b5ef0-b3eb-11e8-a98a-a44e31601874/usb_cam-2*.log I have checked my device by command: > v4l2-ctl --list-formats-ext I confirmed device number ,view size and pixel_format. I tried other web-camera(logicool C270), but I got same error messages. So, What am I wrong? thanks. (I use Ubuntu16.04LTS,ros-kinetic,and I installed [v4l-utils] and [usb-cam] packages)

USB_CAM error with low resolution on RaspiCam

$
0
0
Hi Guys, When trying to run the USB_CAM with a **raspberry pi cam** connected with a **flex cable** I am getting the following error: ***[ERROR] [1536479863.709252536]: VIDIOC_S_FMT error 22, Invalid argument*** This is the launch file: **When changing the resolution to 1280x920 it works fine.** when running: v4l2-ctl --list-formats-ext ioctl: VIDIOC_ENUM_FMT Index : 0 Type : Video Capture Pixel Format: 'YU12' Name : Planar YUV 4:2:0 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 1 Type : Video Capture Pixel Format: 'YUYV' Name : YUYV 4:2:2 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 2 Type : Video Capture Pixel Format: 'RGB3' Name : 24-bit RGB 8-8-8 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 3 Type : Video Capture Pixel Format: 'JPEG' (compressed) Name : JFIF JPEG Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 4 Type : Video Capture Pixel Format: 'H264' (compressed) Name : H.264 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 5 Type : Video Capture Pixel Format: 'MJPG' (compressed) Name : Motion-JPEG Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 6 Type : Video Capture Pixel Format: 'YVYU' Name : YVYU 4:2:2 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 7 Type : Video Capture Pixel Format: 'VYUY' Name : VYUY 4:2:2 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 8 Type : Video Capture Pixel Format: 'UYVY' Name : UYVY 4:2:2 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 9 Type : Video Capture Pixel Format: 'NV12' Name : Y/CbCr 4:2:0 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 10 Type : Video Capture Pixel Format: 'BGR3' Name : 24-bit BGR 8-8-8 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 11 Type : Video Capture Pixel Format: 'YV12' Name : Planar YVU 4:2:0 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 12 Type : Video Capture Pixel Format: 'NV21' Name : Y/CrCb 4:2:0 Size: Stepwise 32x32 - 3280x2464 with step 2/2 Index : 13 Type : Video Capture Pixel Format: 'BGR4' Name : 32-bit BGRA/X 8-8-8-8 Size: Stepwise 32x32 - 3280x2464 with step 2/2 **How can I lower the resolution to 640x480??**

Input/output error using usb_cam package

$
0
0
Hi, I am trying to use ```usb_cam``` package to connect a *Logitech* usb camera from my laptop. I am using ROS ```kinetic``` with ```Ubuntu 16.04```. I successfully built the package using ```catkin_make```. Then when I run the ```usb_cam_node``` node using ```$ rosrun usb_cam usb_cam_node``` from the terminal I receive the following **input-output** error, ```VIDIOC_STREAMON error 5, Input/output error```. Any help to overcome this error is appreciated. Thank you.

[image_transport] Topics '/usb_cam/image_color' and '/usb_cam/camera_info' do not appear to be synchronized

$
0
0
please help me :( $ rosrun image_transport republish compressed in:=usb_cam/image raw out:=usb_cam/image $ ROS_NAMESPACE=usb_cam rosrun image_proc image_proc image_raw:=image _approximate_s=true _queue_size:=20 [ WARN] [1545066099.656226554]: [image_transport] Topics '/usb_cam/image_color' and '/usb_cam/camera_info' do not appear to be synchronized. In the last 10s: Image messages received: 0 CameraInfo messages received: 45 Synchronized pairs: 0

Not detecting raspberry pi camera

$
0
0
I am doing a project in which I have to use a usb camera and the raspberry pi camera. Therefore, I installed first the usb_cam package and tried to make a web streaming with the rasbperry pi camera. However, the raspberry cam was not detected as a /dev/video device so I execute the following commands to detect the pi camera as a /dev/video device: sudo rpi-update and sudo modprobe bcm2835-v4l2. Once it was detected as a /dev/video device, I used the usb_cam and web_server package to make the stream, everything worked perfectly until I installed the raspicam_node. Now it is impossible to detect /dev/video0. I would be really grateful if someone would help me.

Problems when relaunching camera

$
0
0
First time after starting PC I can launch camera by:> roslaunch usb_cam usb_cam-test.launch However after closing it, using ctrl+c in the terminal and running again I get following error: > [ERROR] [1548665838.684033928]:> VIDIOC_S_FMT error 5, Input/output> error [usb_cam-1] process has died> [pid 7194, exit code 1, cmd> /opt/ros/kinetic/lib/usb_cam/usb_cam_node> __name:=usb_cam __log:=/home/nuvo/.ros/log/a60e58e0-22c3-11e9-8944-f81a670f7983/usb_cam-1.log].> log file:> /home/nuvo/.ros/log/a60e58e0-22c3-11e9-8944-f81a670f7983/usb_cam-1*.log

opencv video_stream crash for webcam

$
0
0
Hi, Im using ROS kinetic with ubuntu 16 I tried to run the following: sudo apt-get install ros-kinetic-video-stream-opencv source devel/setup.bash roslaunch video_stream_opencv webcam.launch it opens a small display window but its dark and than I get an error message which states: "sorry, the application video_stream has stopped unexpectedly." on the command prompt there's the following output: ... logging to /home/tester/.ros/log/7c3f439c-215d-11e9-93d6-a434d94983a6/roslaunch-tester-XPS-13-9350-20451.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB. started roslaunch server http://tester-XPS-13-9350:44108/ SUMMARY PARAMETERS * /rosdistro: kinetic * /rosversion: 1.12.12 * /webcam/webcam_stream/buffer_queue_size: 1 * /webcam/webcam_stream/camera_info_url: * /webcam/webcam_stream/camera_name: webcam * /webcam/webcam_stream/flip_horizontal: False * /webcam/webcam_stream/flip_vertical: False * /webcam/webcam_stream/fps: 30.0 * /webcam/webcam_stream/frame_id: webcam_optical_frame * /webcam/webcam_stream/height: 0 * /webcam/webcam_stream/loop_videofile: False * /webcam/webcam_stream/set_camera_fps: 30.0 * /webcam/webcam_stream/video_stream_provider: 0 * /webcam/webcam_stream/width: 0 NODES /webcam/ webcam_image_view (image_view/image_view) webcam_stream (video_stream_opencv/video_stream) ROS_MASTER_URI=http://localhost:11311 process[webcam/webcam_stream-1]: started with pid [20468] process[webcam/webcam_image_view-2]: started with pid [20469] [ INFO] [1548701307.750201298]: Resource video_stream_provider: 0 [ INFO] [1548701307.750265122]: Getting video from provider: /dev/video0 [ INFO] [1548701307.969115605]: Video stream provider type detected: videodevice [ INFO] [1548701307.972647577]: Camera name: webcam [ INFO] [1548701307.975877216]: Setting camera FPS to: 30 [ INFO] [1548701307.979017728]: Camera reports FPS: 30 [ INFO] [1548701307.983787903]: Setting buffer size for capturing frames to: 1 [ INFO] [1548701307.988602391]: Throttling to fps: 30 [ INFO] [1548701307.991712224]: Publishing with frame_id: webcam_optical_frame [ INFO] [1548701307.994771983]: Provided camera_info_url: '' [ INFO] [1548701307.998538313]: Flip horizontal image is: false [ INFO] [1548701308.002029133]: Flip vertical image is: false [ INFO] [1548701308.015348365]: using default calibration URL [ INFO] [1548701308.015553150]: camera calibration URL: file:///home/tester/.ros/camera_info/webcam.yaml [ INFO] [1548701308.015712941]: Unable to open camera calibration file [/home/tester/.ros/camera_info/webcam.yaml] [ WARN] [1548701308.015782408]: Camera calibration file /home/tester/.ros/camera_info/webcam.yaml not found. [ INFO] [1548701308.015847803]: Opened the stream, starting to publish. [ WARN] [1548701308.616463773]: No calibration file given, publishing a reasonable default camera info. [ INFO] [1548701308.616540568]: The image width is: 640 [ INFO] [1548701308.616565884]: The image height is: 480 [webcam/webcam_stream-1] process has died [pid 20468, exit code -11, cmd /opt/ros/kinetic/lib/video_stream_opencv/video_stream camera:=image_raw __name:=webcam_stream __log:=/home/tester/.ros/log/7c3f439c-215d-11e9-93d6-a434d94983a6/webcam-webcam_stream-1.log]. log file: /home/tester/.ros/log/7c3f439c-215d-11e9-93d6-a434d94983a6/webcam-webcam_stream-1*.log --------------------- What am I doing wrong and how do I solve this? thank you!

Input/output error using usb_cam

$
0
0
I am trying to use usb_cam package to connect a Logitech usb camera from my laptop. I am using ROS kinetic with Ubuntu 16.04. I successfully built the package using catkin_make. Then when I run the usb_cam_node node using $ rosrun usb_cam usb_cam_node from the terminal I receive the following input-output error, VIDIOC_STREAMON error 5, Input/output error. the solution post earlier on this forum, paste below didn't help, hence request you suggest a different solution I solved the problem using video_device:=/dev/video1 of usb_cam_node. The problem happened because I have been using an external usb camera with my laptop which already had a built-in camera.

recording only header image_raw message

$
0
0
I would like to record using rosbag only the /usb_cam/image_raw/header topic excluding the data. Tried: rosbag record -a -x "/usb_cam1/image_raw/data" But looks like it is not working. I have more topics to include than exclude so just checking for suggestions

VIDIOC_S_FMT error 5 , Input/output error

$
0
0
Hello, When i run the node usb_cam in ros kinetic under ubuntu 16.04 I have this error: [ERROR] [1555322281.131759362]: VIDIOC_S_FMT error 5, Input/output error [usb_cam-2] process has died [pid 18567, exit code 1, cmd /home/ubuntu/catkin_ws/devel/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/ubuntu/.ros/log/f0d32396-5f64-11e9-a083-b06ebfbf3825/usb_cam-2.log]. log file: /home/ubuntu/.ros/log/f0d32396-5f64-11e9-a083-b06ebfbf3825/usb_cam-2*.log When I unplug the camera then re-plug it works just once then i have the same erros. help me please

How to use image_proc/crop_decimate to crop an image?

$
0
0
Hi, I used usb_cam driver to publish a camera raw image, and I'm trying to crop the published image using image_proc/crop_decimate. when I viewed the output of image_proc/crop_decimate, I did not see any difference between the original image and the cropped image. it seems that the image_proc/crop_decimate node is bypassing the parameters of my launch file. the size of the original image 640x480 and I want to crop the image to 640x300 This is my launch file script: Does any one has an idea how to use image_proc/crop_decimate node? Thanks

Running usb_cam across VNC and getting Cannot identify '/dev/video0'

$
0
0
Hello guys, I was running a docker container that contains the normal ros packages and usb_cam. I visualized the ubuntu interface through a VNC (localhost:5900) and tried `roslaunch usb_cam usb_cam-test.launch` in the VNC viewer. However, I got: [ERROR] [1559585420.922861365]: Cannot identify '/dev/video0': 2, No such file or directory When I tried `ls -ltrh /dev/video*`, I got `ls: cannot access '/dev/video*': No such file or directory`. Everything works when I tried the aboves on my local computer, are there any additional steps I need to make so I can use my webcam in a docker image?

usb_cam pkg gives garbled green screen

$
0
0
I have a ROS kinetic on my virtualbox. I tried to use "usb_cam" pkg but it doesn't work. My web cam is connected directly to my PC and I can see the video through "cheese" or "camorama" but when I run usb_cam pkg, I get garbled green screen both on "image_view" or directly on "rviz" for image_raw. I tried both yuyv and jpeg for pixel format but it doesn't work. Any suggestions ?
Viewing all 118 articles
Browse latest View live


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