当前位置:   article > 正文

自动驾驶 安装ROS系统_做自动驾驶应该安装哪个版本的ros系统

做自动驾驶应该安装哪个版本的ros系统

1 - 换源

sudo gedit /etc/apt/sources.list
  1. #PC的国内软件源
  2. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  3. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
  4. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  5. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
  6. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  7. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
  8. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  9. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
  10. deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  11. deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
  1. #TX2的国内软件源
  2. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse
  3. deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-updates main restricted universe multiverse
  4. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse
  5. deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-security main restricted universe multiverse
  6. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse
  7. deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial-backports main restricted universe multiverse
  8. deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main universe restricted
  9. deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ xenial main universe restricted

2 - 打开软件和更新对话框,具体可以在 Ubuntu 最左上角的搜索按钮中搜索。

打开后按照下图进行配置(确保你的"restricted", "universe," 和 "multiverse."前是打上勾的)

  1. #加入软件源
  2. sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  3. #加入秘钥
  4. sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
  5. #更新软件源
  6. sudo apt-get update
  7. #开始安装
  8. sudo apt-get install ros-kinetic-desktop-full
  9. #初始化
  10. sudo rosdep init
  11. #更新
  12. rosdep update
  13. #加入bashrc
  14. echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
  15. #更新bashrc
  16. source ~/.bashrc
  17. #安装依赖包
  18. sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
  19. #安装栅格地图插件
  20. sudo apt-get install ros-kinetic-grid-map
  21. #安装编译工具
  22. sudo apt-get install python-catkin-tools


2.OPENCV


解压源码后,在解压后的目录中创建build文件夹并进去:

  1. mkdir build
  2. cd build
  3. sudo apt-get install build-essential
  4. sudo apt-get install cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev
  5. sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
  6. cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/usr/local ..
  7. sudo make
  8. sudo make install
  9. sudo sh -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
  10. sudo ldconfig

3.安装QT

  1. sudo chmod a+x qt-opensource-linux-x64-5.10.0.run
  2. ./qt-opensource-linux-x64-5.10.0.run

4.安装dlib

  1. tar xvf dlib-19.6.tar.bz2
  2. cd dlib-19.6/
  3. mkdir build
  4. cd build
  5. cmake -DBUILD_SHARED_LIBS=ON ..
  6. cmake --build . --config Release
  7. sudo make install
  8. sudo ldconfig

5.安装boost

  1. sudo ./bootstrap.sh
  2. sudo ./b2 install
  3. #卸载
  4. cd /usr/local/inlcude
  5. sudo rm -r boost/
  6. cd /usr/local/lib
  7. sudo rm *boost*

如果在tx2上缺什么包:

https://launchpad.net/ubuntu/xenial/arm64/

这里都有~

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/凡人多烦事01/article/detail/642784
推荐阅读
相关标签
  

闽ICP备14008679号