ROS

[ROS] USB_CAM

개ㅁI 2022. 8. 23. 03:02

http://wiki.ros.org/usb_cam

 

usb_cam - ROS Wiki

melodic noetic   Show EOL distros:  EOL distros:   electric fuerte groovy hydro indigo jade kinetic lunar diamondback: Only showing information from the released package extracted on Unknown. No API documentation available. Please see this page for in

wiki.ros.org

git clone USB_CAM roswiki

git clone https://github.com/ros-drivers/usb_cam.git

and install usb-cam

sudo apt install ros-melodic-usb-cam

check which port connected to camera

ls -ltr /dev/video*

video0 -> laptop cam

video1 -> USB cam

Based on this, fix code.

Example: (look at the line 92)

run command (node)

rosrun usb_cam usb_cam

run command (launch)

roslaunch usb_cam usb_cam-test.launch

 


But I meet error...;-(

[rosrun] Couldn't find executable named usb_cam below /home/yulimhwang/catkin_ws/src/usb_cam
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:

 

solution:

You should make executable file.

chmod +x usb_cam_node.cpp

 

OMG.. I meet another error. ;-<

[ERROR] [1661190157.805564400]: VIDIOC_S_FMT error 22, Invalid argument
[ INFO] [1661190157.830886597]: Using transport "raw"
[usb_cam-2] process has died [pid 14232, exit code 1, cmd /home/yulimhwang/catkin_ws/devel/lib/usb_cam/usb_cam_node __name:=usb_cam __log:=/home/yulimhwang/.ros/log/cf913f8a-2241-11ed-87d1-0c7a15d6d9c7/usb_cam-2.log].
log file: /home/yulimhwang/.ros/log/cf913f8a-2241-11ed-87d1-0c7a15d6d9c7/usb_cam-2*.log

 

I....don't....know.... why only webcam run...

I know~~

thanks charm.

we must to change /dev/video2.

not video1.

 

 

728x90