一. 刷机
Jetson TX2 重装系统(刷机)+后续设置(安装Fcitx、解决拼音候选词不显示、换国内源、局域网实现VNC远程桌面)_jetson tx2刷机-CSDN博客
参照此博客即可
二.安装ros melodic
使用小鱼儿一键安装ros, 官网:小鱼的一键安装系列 | 鱼香ROS
wget http://fishros.com/install -O fishros && . fishros
三安装zed2 的sdk
注意: 需要先安装orbslam3 后安装sdk 否则会出现报错,[rospack] Error: could not find python module ‘rosdep2.rospack‘. is rosdep up-to-date (at least 0.1-CSDN博客
orbslam3安装参考从零开始的jetson TX2+zed2+orbslam3环境搭建(二)-CSDN博客
官网:ZED SDK 4.1 - Download | Stereolabs
选择合适的版本,这里选择for JetPack 4.6.X
下载好后进入Downloads目录, 终端输入如下指令给文件添加权限
chmod +x ZED_SDK_Tegra_L4T32.7_v4.1.0.zstd.run
然后输入脚本执行指令即开始安装, 安装过程一路默认y即可
./ZED_SDK_Tegra_L4T32.7_v4.1.0.zstd.run
遇到问题:
1.提示缺少库zstd
nvidia@ubuntu:~/Downloads$ ./ZED_SDK_Tegra_L4T32.7_v4.1.0.zstd.run
Verifying archive integrity... 100% MD5 checksums are OK. All good.
Uncompressing 'ZED camera SDK by Stereolabs (Use 'sudo apt install zstd' if zstd is not found)'./ZED_SDK_Tegra_L4T32.7_v4.1.0.zstd.run: 1: eval: zstd: not found
... Decompression failed.
... Extraction failed.
100% Signal caught, cleaning up
按照提示执行命令
sudo apt install zstd
2.网络原因无法下载numpy
Collecting numpy
Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy
采用国内的镜像源来加速, 这里使用豆瓣镜像网站
pip3 install numpy -i http://pypi.doubanio.com/simple/ --trusted-host pypi.doubanio.com
出现如下报错
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-6jkcoi9w/numpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-eebc62qx-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-6jkcoi9w/numpy/
原因是缺少库cython,先更换pypi镜像源
pip install -i https://mirrors.zju.edu.cn/pypi/web/simple pip -U
pip config set global.index-url https://mirrors.zju.edu.cn/pypi/web/simple
然后执行pip3 install cython 即可安装
四.安装ZED ROS Wrapper
跟着GitHub上教程安装即可GitHub - stereolabs/zed-ros-wrapper: ROS wrapper for the ZED SDK
选择已有的/新建工作空间, 克隆存储库,更新依赖项并构建包
cd ~/catkin_ws/src
git clone --recursive https://github.com/stereolabs/zed-ros-wrapper.git
cd ../
rosdep install --from-paths src --ignore-src -r -y
catkin_make -DCMAKE_BUILD_TYPE=Release
source ./devel/setup.bash
安装完成后,在catkin_ws目录下执行命令
roslaunch zed_wrapper zed2.launch
即可验证是否安装成功
至此,zed2相机已可以运行,下篇文章记录如何安装orb-slam3