ubuntu16.04安裝ROS

記錄在Ubuntu16中安裝ROS1的步驟:

  1. 增加源 在終端中輸入命令:

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'

  1. 增加 key 在終端中輸入命令:

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
或者:
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654

  1. 下載安裝ros 在終端中輸入命令:

sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full

  1. 初始化ros環(huán)境 在終端中輸入命令:

sudo rosdep init
rosdep update

如果操作過(guò)程中提示找不到rosdep命令,請(qǐng)先執(zhí)行sudo apt install python-rosdep

  1. 配置bashrc 在終端中輸入命令:

echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc

  1. 測(cè)試運(yùn)行 在終端中輸入命令:

roscore

如有下列打印表示安裝成功:

~$ roscore 
... logging to /home/xx/.ros/log/f70d7090-b356-11e9-a4ab-0800270ce2f3/roslaunch-pc-12185.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://pc:33197/
ros_comm version 1.12.14


SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.14

NODES

auto-starting new master
process[master]: started with pid [12196]
ROS_MASTER_URI=http://pc:11311/

setting /run_id to f70d7090-b356-11e9-a4ab-0800270ce2f3
process[rosout-1]: started with pid [12209]
started core service [/rosout]
其他
  1. 安裝編譯包依賴(lài)(看情況安裝)
    sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential

2.安裝自啟動(dòng)配置包
sudo apt-get install ros-kinetic-robot-upstart

基本命令參考:rosrun robot_upstart install --user root --setup /home/xx/ros_ws/install/setup.bash bringup_msgs/launch/bringup_start.launch --logdir /home/xx/logs

參考:http://wiki.ros.org/kinetic/Installation/Ubuntu
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容