Advertisement

ubuntu20.04安装ROS Noetic

阅读量:

1. ubuntu换源(清华/中科大/阿里云)

2. 设置ROS源

中科大源

复制代码
    sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
    

清华源

复制代码
    sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
    

3. 添加密钥

复制代码
    sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
    
    

4. 更新软件包

复制代码
    sudo apt update
    

5. 安装ROS

复制代码
    sudo apt install ros-noetic-desktop-full
    

6. 设置环境变量

复制代码
 echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc

    
 source ~/.bashrc
    
    
    
    

7. 安装依赖

复制代码
    sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
    

8. 初始化ROS

复制代码
 sudo rosdep init

    
 rosdep update
    
    
    
    

初始化失败的解决方法,该方法中的python2.7路径对应20.04中的python3路径<>

9. 小乌龟测试

复制代码
 roscore

    
 rosrun turtlesim turtlesim_node
    
 rosrun turtlesim turtle_teleop_key
    
    
    
    

全部评论 (0)

还没有任何评论哟~