ros2 usb camera的发布与web可视化查看相机图像
本文中使用的ros2 humble Ubuntu22 .
usb camera 支持uvc 。
程序为 ros2
https://gitlab.com/boldhearts/ros2_v4l2_camera#usage-1
该程序支持大部分的 uvc usb camera
ros2 直接安装
sudo apt-get install ros-humble-v4l2-camera
ros2 run v4l2_camera v4l2_camera_node
orangepi@orangepi5:~/ros2_ws/src$ ros2 run v4l2_camera v4l2_camera_node
[INFO] [1715932445.388780316] [v4l2_camera]: Driver: uvcvideo
[INFO] [1715932445.389265058] [v4l2_camera]: Version: 330350
[INFO] [1715932445.389386098] [v4l2_camera]: Device: Rmoncam A2 720P: RMONCAM A2 72
[INFO] [1715932445.389478555] [v4l2_camera]: Location: usb-xhci-hcd.9.auto-1
[INFO] [1715932445.389560220] [v4l2_camera]: Capabilities:
[INFO] [1715932445.389639260] [v4l2_camera]: Read/write: NO
[INFO] [1715932445.389716259] [v4l2_camera]: Streaming: YES
[INFO] [1715932445.389833799] [v4l2_camera]: Current pixel format: YUYV @ 1280x800
[INFO] [1715932445.390124002] [v4l2_camera]: Available pixel formats:
[INFO] [1715932445.390221709] [v4l2_camera]: MJPG - Motion-JPEG
[INFO] [1715932445.390284125] [v4l2_camera]: YUYV - YUYV 4:2:2
[INFO] [1715932445.390354707] [v4l2_camera]: Available controls:
[INFO] [1715932445.391935222] [v4l2_camera]: Brightness (1) = 0
[INFO] [1715932445.393452739] [v4l2_camera]: Contrast (1) = 32
[INFO] [1715932445.395049587] [v4l2_camera]: Saturation (1) = 64
[INFO] [1715932445.396837474] [v4l2_camera]: Hue (1) = 0
[INFO] [1715932445.397065845] [v4l2_camera]: White Balance Temperature, Auto (2) = 1
[INFO] [1715932445.398656694] [v4l2_camera]: Gamma (1) = 300
[INFO] [1715932445.399952256] [v4l2_camera]: Gain (1) = 64
[INFO] [1715932445.401052696] [v4l2_camera]: Power Line Frequency (3) = 1
[INFO] [1715932445.402432840] [v4l2_camera]: White Balance Temperature (1) = 4600 [inactive]
[INFO] [1715932445.403740651] [v4l2_camera]: Sharpness (1) = 50
[INFO] [1715932445.405328458] [v4l2_camera]: Backlight Compensation (1) = 0
[INFO] [1715932445.405574329] [v4l2_camera]: Exposure, Auto (3) = 3
[INFO] [1715932445.407142011] [v4l2_camera]: Exposure (Absolute) (1) = 166 [inactive]
[INFO] [1715932445.408599154] [v4l2_camera]: Exposure, Auto Priority (2) = 1
[INFO] [1715932445.412213719] [v4l2_camera]: Requesting format: 640x480 YUYV
[INFO] [1715932445.422154554] [v4l2_camera]: Success
[INFO] [1715932445.423676445] [v4l2_camera]: Succesfully set value for control Exposure, Auto Priority to 0
[INFO] [1715932445.425627080] [v4l2_camera]: Starting camera
[WARN] [1715932445.691544207] [v4l2_camera]: Image encoding not the same as requested output, performing possibly slow conversion: yuv422_yuy2 => rgb8
[INFO] [1715932445.717555483] [v4l2_camera]: using default calibration URL
[INFO] [1715932445.717906936] [v4l2_camera]: camera calibration URL: file:///home/orangepi/.ros/camera_info/rmoncam_a2_720p:_rmoncam__a2_72.yaml
[ERROR] [1715932445.718424635] [camera_calibration_parsers]: Unable to open camera calibration file [/home/orangepi/.ros/camera_info/rmoncam_a2_720p:_
另外起一个终端查看topic 信息
orangepi@orangepi5:~$ ros2 topic list
/camera_info
/image_raw
/parameter_events
/rosout
orangepi@orangepi5:~$ ros2 topic echo /image_raw --no-ar
header:
stamp:
sec: 1715932535
nanosec...🔒
以下内容已隐藏
支付 ¥0.01 解锁全文
付费解锁
加载中...
