系统环境是Ubuntu 16.04,每完成一大步,将会把系统的完整镜像(VM Ware导出的虚拟机)发布到Github与Gitee,供使用。因为安装环境,本身是很耗费时间的,安装过程亦参考了网上很多的文章,踩了很多的坑,本系列旨在填坑,让后来人可以集中精力做实际的开发、学习。
每步会有步骤说明,命令的输出如果太多,就省略不再贴出来。
使用的设备是 Livox Horizon + 大华(Dahua) DH-IPC-HFW2433M-LED
ningdr@ubuntu:~/soft$ echo ==================第一步==================
ningdr@ubuntu:~/soft$ sudo apt install -y zlib1g-dev libbz2-dev libssl-dev libncurses5-dev libsqlite3-dev libreadline-dev tk-dev libgdbm-dev libdb-dev libpcap-dev xz-utils libexpat1-dev liblzma-dev libffi-dev libc6-dev aptitude
ningdr@ubuntu:~/soft$ sudo apt install -y python-catkin-pkg python-rosdep ros-$ROS_DISTRO-catkin gksu
ningdr@ubuntu:~/soft$ sudo apt install -y python3-pip python3-colcon-common-extensions python3-setuptools python3-vcstool
ningdr@ubuntu:~/soft$ echo ==================第二步==================
ningdr@ubuntu:~/soft$ mkdir -p autoware.ai/src
ningdr@ubuntu:~/soft$ cd autoware.ai/
ningdr@ubuntu:~/soft/autoware.ai$
ningdr@ubuntu:~/soft/autoware.ai$ echo ==================第三步==================
ningdr@ubuntu:~/soft/autoware.ai$ wget -O autoware.ai.repos "https://raw.githubusercontent.com/Autoware-AI/autoware.ai/1.12.0/autoware.ai.repos"
ningdr@ubuntu:~/soft/autoware.ai$
ningdr@ubuntu:~/soft/autoware.ai$ vcs import src < autoware.ai.repos
#这一步完成后,目录看起来是这样子的,如果某个工程缺失,根据文件中的地址下载后,放入对应目录,重新vcs即可
ningdr@ubuntu:~/soft/autoware.ai$ pwd
/home/ningdr/soft/autoware.ai
ningdr@ubuntu:~/soft/autoware.ai$ tree -L 3
.
├── autoware
├── autoware.ai.repos
└── src
├── autoware
│ ├── common
│ ├── core_perception
│ ├── core_planning
│ ├── documentation
│ ├── messages
│ ├── simulation
│ ├── utilities
│ └── visualization
├── car_demo
│ ├── build_demo.bash
│ ├── car_demo
│ ├── Dockerfile
│ ├── prius_description
│ ├── prius_msgs
│ ├── README.md
│ └── run_demo.bash
├── citysim
│ ├── cmake
│ ├── CMakeLists.txt
│ ├── media
│ ├── models
│ ├── plugins
│ ├── README.md
│ └── worlds
└── drivers
├── awf_drivers
└── ds4
24 directories, 7 files
ningdr@ubuntu:~/soft/autoware.ai$
ningdr@ubuntu:~/soft/autoware.ai$ echo ==================第四步==================
ningdr@ubuntu:~/soft/autoware.ai$ rosdep update
# 这一步会报很多依赖没安装,那就安装
ningdr@ubuntu:~/soft/autoware.ai$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
ningdr@ubuntu:~/soft/autoware.ai$ echo ==================第五步==================
# 以缺失joint_state_controller来说,把下划线改为中划线,然后加上ros-kinetic-前缀,apt install 即可
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-nmea-msgs \
ros-kinetic-joint-state-controller \
ros-kinetic-jsk-recognition-msgs \
ros-kinetic-jsk-topic-tools \
ros-kinetic-nmea-navsat-driver \
ros-kinetic-pacmod-msgs \
ros-kinetic-image-view2 \
ros-kinetic-jsk-rviz-plugins
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-gps-common \
ros-kinetic-lgsvl-msgs \
ros-kinetic-grid-map-ros \
ros-kinetic-velodyne-pointcloud \
ros-kinetic-grid-map-msgs \
ros-kinetic-gscam \
ros-kinetic-velodyne-gazebo-plugins \
ros-kinetic-jsk-recognition-msgs \
ros-kinetic-sound-play \
ros-kinetic-rosbridge-server \
ros-kinetic-imu-tools
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-controller-manager \
ros-kinetic-velodyne-description \
ros-kinetic-grid-map-visualization \
ros-kinetic-uvc-camera \
ros-kinetic-automotive-navigation-msgs
ros-kinetic-effort-controllers \
ros-kinetic-automotive-platform-msgs
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-automotive-platform-msgs \
ros-kinetic-effort-controllers
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-velocity-controllers
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-velodyne
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-transmission-interface
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-position-controllers
ningdr@ubuntu:~/soft/autoware.ai$ sudo apt install -y ros-kinetic-gazebo-ros-control
ningdr@ubuntu:~/soft/autoware.ai$ echo ==================第六步==================
ningdr@ubuntu:~/soft/autoware.ai$ rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
......输出省略.......
Processing triggers for libc-bin (2.23-0ubuntu11.2) ...
#All required rosdeps installed successfully
ningdr@ubuntu:~/soft/autoware.ai$ echo ==================第七步==================
# 这一步需要你机器的内存进行支撑,4G不够使,分配16G内存才完成编译,见到了成功的输出,哈哈哈
ningdr@ubuntu:~/soft/autoware.ai$ colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release
..........省略............
---
Finished <<< op_simulation_package [1min 52s]
Summary: 139 packages finished [26min 34s]
31 packages had stderr output: autoware_camera_lidar_calibrator autoware_connector autoware_driveworks_gmsl_interface autoware_driveworks_interface autoware_pointgrey_drivers data_preprocessor decision_maker dp_planner kvaser lidar_apollo_cnn_seg_detect lidar_euclidean_cluster_detect lidar_localizer lidar_point_pillars lidar_shape_estimation microstrain_driver mqtt_socket op_ros_helpers op_simulation_package op_utilities pixel_cloud_fusion points_downsampler points_preprocessor road_occupancy_processor trafficlight_recognizer vision_darknet_detect vision_segment_enet_detect vision_ssd_detect vlg22c_cam way_planner waypoint_maker waypoint_planner
ningdr@ubuntu:~/soft/autoware.ai$ roslaunch runtime_manager runtime_manager.launch
至此,Autoware 安装成功
完整系统镜像,点我下载(解压后登录密码见README.md)
可以根据官方的Demo试验Autoware的安装结果,试验不在镜像里,我自己试了,可以使用,官方说使用RViz默认配置,从 F i l e − o p e n c o n f i g File - open config File−openconfig,起初怎么都没找到 F i l e File File菜单,之后把RViz窗口最大化,神器的事情发生了, F i l e File File菜单就在窗口顶部~~,是我对Ubuntu不熟悉的缘故吗~~(安装完成,把虚拟机调成了8g,但是4core 8g不够使用,太卡),附上效果图:
ningdr@ubuntu:~/soft/docker$ echo ==================第一步==================
ningdr@ubuntu:~/soft/docker$ curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -
OK
# 检测指纹,需要和这个匹配:9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
ningdr@ubuntu:~/soft/docker$ sudo apt-key fingerprint 0EBFCD88
pub 4096R/0EBFCD88 2017-02-22
Key fingerprint = 9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid Docker Release (CE deb) <[email protected]>
sub 4096R/F273FCD8 2017-02-22
ningdr@ubuntu:~/soft/docker$
ningdr@ubuntu:~/soft/docker$ echo ==================第二步==================
ningdr@ubuntu:~/soft/docker$ sudo add-apt-repository \
> "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
> $(lsb_release -cs) \
> stable"
[sudo] password for ningdr:
ningdr@ubuntu:~/soft/docker$
ningdr@ubuntu:~/soft/docker$ echo ==================第三步==================
ningdr@ubuntu:~/soft/docker$ sudo apt update
ningdr@ubuntu:~/soft/docker$ sudo apt install docker-ce docker-ce-cli containerd.io
ningdr@ubuntu:~/soft/docker$ echo ==================第四步==================
ningdr@ubuntu:~/soft/docker$ sudo docker run hello-world
[sudo] password for ningdr:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:2498fce14358aa50ead0cc6c19990fc6ff866ce72aeb5546e1d59caac3d0d60f
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
ningdr@ubuntu:~/soft/docker$