一、安装驱动
cd ~
git clone https://github.com/jetsonhacksnano/installSwapfile
cd installSwapfile
./installSwapfile.sh
reboot
cd ~
git clone https://github.com/jetsonhacksnano/installLibrealsense
//下载自己想要的版本,这里使用2.50.0(最新版),记住realsense-ros对realsense的版本有要求
git clone https://github.com/IntelRealSense/librealsense/releases/tag/v2.50.0
cd installLibrealsense
gedit ./buildLibrealsense.sh
修改上图中的1、2、4行内容,和自己的系统匹配
其中第一行是git clone下来的librealsense位置;第二行是对应的版本;第四行进/usr/local看看自己的cuda是什么版本的,改成相应的版本就行了。下一步确保自己的系统能顺利git clone, 而且关闭本终端外的其他应用,以下编译过程会占用很大运行内存,编译到一半后会卡住,请耐心等待编译:
./buildLibrealsense.sh
这一步中会git一个东西。
测试:
cd ~/Documents/librealsense/build/examples/capture
./rs-capture
但我realsense-viewer打开后始终没有显示设备接入,这里先不管,因为后面能正常跑realsense的ROS包。
二、安装ROS包
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src/
git clone https://github.com/IntelRealSense/realsense-ros.git
cd realsense-ros/
git checkout `git tag | sort -V | grep -P "^\d+\.\d+\.\d+" | tail -1`
cd ..
catkin_init_workspace
cd ..
catkin_make clean
catkin_make -DCATKIN_ENABLE_TESTING=False -DCMAKE_BUILD_TYPE=Release
catkin_make install
echo "source ~/catkin_ws/devel/setup.bash">>~/.bashrc
source ~/.bashrc
运行:
roslaunch realsense2_camera rs_camera.launch
并查看话题:
可以发现没有双目和IMU的话题,因此需要修改rs_camera.launch文件:
1. 打开双目,修改图片的width、height:
2. 打开imu的加速度计和陀螺仪并合并为一个topic
保存修改。
此时重新rostopic list,可以看到imu和双目的话题。
三、运行Vins-Fusion
安装编译运行教程查看github:
https://github.com/HKUST-Aerial-Robotics/VINS-Fusion
运行效果:
参考链接:
Jetson Nano使用T265向PX4提供位置信息 - 知乎
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)