0.ROS 安装与配置

来源:互联网 发布:mysql注入式攻击 编辑:程序博客网 时间:2024/05/22 05:00
  • 系统环境:Ubuntu 14.04.05 64bit
  • ros版本:Indigo
  • 本节具体教程可见:http://wiki.ros.org/kinetic/Installation/Ubuntu
  • 本人才疏学浅刚刚入门,如有疏漏欢迎同道中人指教 email: hankecs@163.com

1.配置本机的Source.list

  • 在bash中运行下列命令(这里我们使用中科大的源)
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'

如果发现该源无法使用则可尝试别的源,详情见:http://wiki.ros.org/ROS/Installation/UbuntuMirrors

2.配置密钥

sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116

3.下载安装

  • 更新源目录,==必须保证上述添加的源得到更新,若不行可尝试再次更新或者更换其他源==
sudo apt-get update
  • 安装桌面完整版
sudo apt-get install ros-indigo-desktop-full

4.初始化rosdep

  • 安装完成后运行以下两条命令,有的时候第二条命令不能完全运行成功,可多次尝试如果不行也可跳过(目前没有发现会有什么影响)
sudo rosdep initrosdep update

5.系统环境配置

为了每次打开一个新的shell后会自动加载有关ROS的系统环境变量,执行如下命令

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

若仅需要对当前shell进行有关ROS的操作可直接执行

source /opt/ros/indigo/setup.bash

6.测试

按照上述步骤操作后,打开一个新的shell,执行如下命令

roscore

若配置正确则会显示类似下列的信息

xxf@ubuntu:~$ roscore ... logging to /home/xxf/.ros/log/b39cb778-8d95-11e7-95aa-0050562fc680/roslaunch-ubuntu-6049.logChecking log directory for disk usage. This may take awhile.Press Ctrl-C to interruptDone checking log file disk usage. Usage is <1GB.started roslaunch server http://ubuntu:46369/ros_comm version 1.11.20SUMMARY========PARAMETERS * /rosdistro: indigo * /rosversion: 1.11.20NODESauto-starting new masterprocess[master]: started with pid [6061]ROS_MASTER_URI=http://ubuntu:11311/setting /run_id to b39cb778-8d95-11e7-95aa-0050562fc680process[rosout-1]: started with pid [6085]started core service [/rosout]

阅读全文
0 0
原创粉丝点击