前言
前文说到在设备中成功运行Swin-Transformer-Object-Detection,本文在前文的基础上进行接续的配置。 除python API安装在Swin同一虚拟环境外,其余组件直接安装在原始环境中。
1.ZED2(3.6)
目前ZED2最新版本是3.7.6,在原始环境中进行安装(安装前sudo chmod 777 .run),步骤会卡在查验网址处。如果设备没有梯子,无法完成SDK安装。选择降版本进行安装。SDK安装成功,但是python API无法顺利安装。
2.python API
进入虚拟环境,在命令行输入相应代码段。
git clone https://github.com/stereolabs/zed-python-api
cd zed-python-api/src
pip3 install -r requirements.txt
python3 setup.py build
python3 setup.py install
3.ROS
前文中一键挂载micro SD卡,使用的是jetsonhacks的脚本,ROS也使用他的脚本。
git clone https://github.com/jetsonhacks/installROSXavier.git
cd installROSXavier
./installROS.sh -p ros-melodic-desktop
4.zed ros wrapper
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
cd ..
catkin_make
cd ~/catkin_ws/src
git clone --recursive https://github.com/stereolabs/zed-ros-wrapper.git
git clone https://github.com/stereolabs/zed-ros-examples.git
cd ..
rosdep install --from-paths src --ignore-src -r -y
catkin_make -DCMAKE_BUILD_TYPE=Release
source ./devel/setup.bash
代码段末行进行报错,显示并未进行sudo rosdep init/rosdep update操作
5.sudo rosdep init报错cannot download default...
cd /etc
sudo gedit hosts
# 末行输入
151.101.84.133 raw.githubusercontent.com
6. rosdep update链接失败
鱼香ROS巨佬自研。
sudo pip3 install rosdepc
sudo rosdepc init
rosdepc update