When using the camera under ROS, input:
$ roslaunch usb_cam usb_cam-test.launch
This command is to turn on the camera, and the error is as follows:
Namely: [ERROR] [1574317261.767618042]: VIDIOC_S_FMT ERROR 16, Device or resource busy
Replug the camera, still report this error.
Analysis: First check all the camera equipment, the instructions are as follows:
$ ls /dev/video*
/dev/video1
As you can see, the result is /dev/video1, and the default installation on ROS is usB_CAM with /dev/video0 started, so it’s not hard to imagine changing the launch file that launches the camera.
Solution: Enter the following two instructions:
$ cd /opt/ros/kinetic/share/usb_cam/launch
$ sudo gedit usb_cam-test.launch
The launch file is shown in the figure below:
Change the /dev/video0 that appears in line 3 to /dev/video1 (the number after the video here depends on the result of the previous query), save and exit. So you can use the camera properly. Problem solved.
Supplementary place
1. There is a detail here. After the above steps are modified, $roslaunch USb_CAM USb_cam_test.launch is required to use the camera normally.
2. After restarting the computer, the need for /dev/video will generally revert to 0, so the usB_cam-test.launch file needs to be modified again. Change the part of /dev/video to /dev/video0.
Read More:
- fusermount: failed to unmount : Device or resource busy
- Solution to device or resource busy error in docker redeployment service
- Raspberry Pi USB drive-free camera error libv4l2: error setting pixformat: Device or resource busy, etc.
- User space operation GPIO error echo: write error: device or resource busy error resolution
- Error: EBUSY: resource busy or locked, rmdir ‘
- Error: EBUSY: resource busy or locked
- ROS package ROS_ astra_ Camera cannot open RGB lens
- When installing ROS: bash / opt / ROS / kinetic/ setup.bash : there is no file or directory
- Solution to the problem that the camera can’t display when ROS running
- ROS cannot download ROS melody joint state publisher GUI reference
- bash: /opt/ros/kinetic/ setup.bash : there is no file or directory
- no target device found problem solved
- LIBGL error: no matching fbconfigs or visual s found
- ArcGIS Earth 1.7 beta installation method-solve the 0X80070057.DirectX device creation failed problem
- Running realsense ROS reports an error, USB cam overflow, hardware error
- Ubuntu cannot access USB device, failed to create a proxy device for the USB device
- Solve runtimeerror: reduce failed to synchronize: device side assert triggered problem
- device no response, device descriptor read/64, error -71
- The route addition failed: Either the interface index is wrong or the gateway do es not lie on the s