前言
图为智盒T600采用AGX Xaiver为核心版,系统为ubuntu18.04, arm64架构
参考连接
https://www.cnblogs.com/xiangzh/p/14244915.html
https://github.com/Autoware-AI/autoware.ai/wiki/Source-Build
操作步骤
- 将opencv版本换为opencv3.2.0
(1) 若为T600预装系统运行
sudo apt-get purge libopencv-dev
sudo apt install libopencv-dev
(2) 若为nvidia官方系统则运行
sudo apt-get purge libopencv-dev
vim /etc/apt/sources.list.d/nvidia-l4t-apt-source.list
将文件中两行全部注释掉,如下
保存退出后运行
sudo apt install libopencv-dev
- 安装ros
http://wiki.ros.org/cn/melodic/Installation/Ubuntu
若遇到rosdep init
或rosdep update
不成功的问题,参考下面链接中的方法二
https://blog.csdn.net/TengYun_zhang/article/details/122166916 - 安装eigen3.3.7以上版本
https://gitlab.com/libeigen/eigen/-/releases
通过上面链接下载3.3.7版本的eigen包
cd Downloads
unzip eigen-3.3.7.zip
cd eigen-3.3.7/
mkdir build
cd build
cmake ..
make
sudo make install
- 安装autoware.ai
(1) 安装依赖
sudo apt update
sudo apt install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin
sudo apt install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
pip3 install -U setuptools
(2) 下载源码
mkdir -p autoware.ai/src
cd autoware.ai
wget -O autoware.ai.repos "https://raw.githubusercontent.com/Autoware-AI/autoware.ai/master/autoware.ai.repos"
vcs import src < autoware.ai.repos
rosdepc update
rosdepc install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
(3)修改cuda版本
将3处cuda10.0改为cuda10.2
gedit ~/autoware.ai/src/autoware/common/autoware_build_flags/cmake/autoware_build_flags-extras.cmake
修改后文件为
(3) 编译代码
With CUDA support
AUTOWARE_COMPILE_WITH_CUDA=1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
Without CUDA Support
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release