目前实现ROS的方式主要有两种:Ubuntu系统+ROS;Ubuntu系统+docker+ROS镜像;使用dockers运行ROS镜像的部署方式,可以大大加快设备部署、移植工作。
参考连接https://wiki.ros.org/noetic/Installation/Ubuntu
1,配置ubuntu的软件和更新,
sudo apt update
sudo apt-get install ros-melodic-desktop-full
2,设置安装源
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
wget -O /etc/apt/sources.list https://mirrors.huaweicloud.com/repository/conf/Ubuntu-Ports-bionic.list
3,设置key安装
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
4,配置环境变量
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
5,测试 运行ros里经典的小海龟例程
roscore
rosrun turtlesim turtlesim_node
rosrun turtlesim turtle_teleop_key
米尔-芯驰D9的ROS系统的智能车架构:
小车视频:
07804d972ce0a6f82cbf8f8e21e24325