在安装ros以及ros2时,容易出现很多系统错误,所以此处使用小鱼的一键安装,能够一键安装各个版本的ros以及ros2.
wget http://fishros.com/install -O fishros && bash fishros
一、Installation Requirements
sudo apt install -y git cmake python3-pip
pip3 install -U colcon-common-extensions vcstool
二、下载Autoware.Auto project.
git clone https://gitlab.com/autowarefoundation/autoware.auto/AutowareAuto.git
cd AutowareAuto
sudo apt install python3-colcon-common-extensions python3-vcstool
vcs import < autoware.auto.$ROS_DISTRO.repos
###1.使用waiwang pig shell
###2.将repos文件中 github.com全代理替代成 kgithub.com
export ROS_VERSION=2
rosdep install -y -i --from-paths src
######一定不要整什么稳定分支
三、Compile Troubleshooting
1.In case where ros-foxy-autoware-auto-msgs is installed on the system, colcon uses it instead of the one in the AutowareAuto/src/external/ folder. This may cause errors. To prevent this, please remove the package by:
sudo apt purge -y ros-foxy-autoware-auto-msgs
2.In case an error occurs related to acado package, please run:
sudo apt purge -y ros-foxy-acado-vendor
sudo apt install -y ros-foxy-acado-vendor
四、编译
colcon build
必要时,删除:
21 packages : apollo_lidar_segmentation apollo_lidar_segmentation_nodes filter_node_base gnss_conversion_nodes grid_map_cv grid_map_demos grid_map_pcl mpc_controller ndt ndt_mapping_nodes ndt_nodes neural_networks outlier_filter outlier_filter_nodes point_cloud_mapping recordreplay_planner_nodes spinnaker_camera_driver spinnaker_camera_nodes trajectory_follower trajectory_follower_nodes tvm_utility