奥比中光astra pro深度相机采集彩色图像跑单目orb_slam3

奥比中光astra pro用尽各种办法,采集不到彩色图,有能同时采集彩图和深度图的告诉兄弟一下,下面是我的装机过程:

在ros2 foxy版安装奥比中光Astra Pro RGBD深度像机_JT_BOT的博客-CSDN博客

不知道什么原因,用奥比中光的程序采集不了彩色图像只能采集深度图和红外图,只能改造ros自带的摄像头程序采集彩色图了。

安装foxy摄像头程序:

sudo apt install ros-foxy-usb-cam//foxy安装摄像头驱动

sudo gedit /opt/ros/foxy/share/usb_cam/config/params.yaml

/dev/vedeo0  一般是笔记本摄像头

/dev/vedeo2  是外接奥比中光摄像头

改成 video_device: "/dev/video2"

 保存退出

运行摄像头节点:

ros2 launch usb_cam demo_launch.py

正常的话可以看到奥比中光astra pro深度相机采集的彩色图像了

 重开一个终端查看话题:摄像头发布话题为/image_raw

m@ubun:~$ ros2 topic list
/camera_info
/image_raw
/image_raw/compressed
/image_raw/compressedDepth
/image_raw/theora
/parameter_events
/rosout

修改orb_slam3接受图像话题为/image_raw

 运行orbslam3_ros2

ros2 run orbslam3 mono ~/ros2_ws/src/ORB_SLAM3/Vocabulary/ORBvoc.txt ~/ros2_ws/src/ORB_SLAM3/Examples/Monocular/EuRoC.yaml

单目orb_slam3_ros2启动成功

如果启动了太卡的话可以修改摄像头的launch文件,只启动发布节点,不启动摄像头画面显示节点,为计算机节省点资源。

保存退出 再次启动

ros2 launch usb_cam demo_launch.py

ros2 run orbslam3 mono ~/ros2_ws/src/ORB_SLAM3/Vocabulary/ORBvoc.txt ~/ros2_ws/src/ORB_SLAM3/Examples/Monocular/EuRoC.yaml

猜你喜欢

转载自blog.csdn.net/m0_73694897/article/details/129927095
今日推荐