小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
使用小鱼的ROS2 yolov5 功能包出的错误
-
描述:跟着教程一步一步来的,启动节点的时候 输入的是:ros2 run yolov5_ros2 yolo_detect_2d --ros-args -p device:=cpu -p image_topic:=/cam2image/image -p show_result:=True
使用的是usb摄像头,终端输入:sudo ros2 run usb_cam usb_cam_node_exe
使用环境:虚拟机 ROS2 humble
问题:在启动usb节点的时候出现错误
WARN] [1716643455.473032149] [usb_cam]: framerate: 30.000000
[INFO] [1716643455.474399452] [usb_cam]: using default calibration URL
[INFO] [1716643455.474450095] [usb_cam]: camera calibration URL: file:///home/allen/.ros/camera_info/default_cam.yaml
[ERROR] [1716643455.474524392] [camera_calibration_parsers]: Unable to open camera calibration file [/home/allen/.ros/camera_info/default_cam.yaml]
[WARN] [1716643455.474605532] [usb_cam]: Camera calibration file /home/allen/.ros/camera_info/default_cam.yaml not found
[INFO] [1716643455.547630352] [usb_cam]: Starting 'default_cam' (/dev/video0) at 640x480 via mmap (yuyv) at 30 FPS
This device supports the following formats:
Motion-JPEG 1280 x 720 (30 Hz)
Motion-JPEG 640 x 480 (25 Hz)
YUYV 4:2:2 1280 x 720 (10 Hz)
YUYV 4:2:2 640 x 480 (25 Hz)
[INFO] [1716643455.586574012] [usb_cam]: Setting 'brightness' to 50
unknown control 'white_balance_temperature_auto'[INFO] [1716643455.599496036] [usb_cam]: Setting 'white_balance_temperature_auto' to 1
[INFO] [1716643455.599582796] [usb_cam]: Setting 'exposure_auto' to 3
unknown control 'exposure_auto'[INFO] [1716643455.604288244] [usb_cam]: Setting 'focus_auto' to 0
unknown control 'focus_auto'[INFO] [1716643455.619050624] [usb_cam]: Timer triggering every 33 ms
Select timeout, exiting...
terminate called after throwing an instance of 'char const*'
[ros2run]: Aborted -
@1730462374 在 使用小鱼的ROS2 yolov5 功能包出的错误 中说:
sudo ros2 run usb_cam usb_cam_node_exe
应该是相机硬件驱动相关问题,跟虚拟机有关系,检查下虚拟机配置,或者使用其他软件尝试打开摄像头看看能不能开再测试通过ros2打开相机。
-