Howto Install and Configure ROS on Ubuntu

HowtoInstall and Configure ROS Groovy on Ubuntu

Followthe instruction http://www.ros.org/wiki/groovy/Installation/Ubuntuto install ROS Groovy:

  1. Setupsources.list:

    $sudosh -c 'echo "deb http://packages.ros.org/ros/ubuntu precisemain" > /etc/apt/sources.list.d/ros-latest.list'

  2. Setupkeys:

    $wgethttp://packages.ros.org/ros.key -O - | sudo apt-key add -

  3. Installation:

    1. $sudoapt-get update

    2. $sudoapt-get install ros-groovy-desktop-full

  4. Initializerosdep:

    1. $sudorosdep init

    2. $rosdepupdate

  5. Environmentsetup:

    1. Addthe ROS environment variables to the bash session every time a newshell is launched:

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

    2. Resourceto enable ros environment variables:

      $source~/.bashrc

    3. Checkthe ros environment variable to test the installation:

      $echo$ROS_DISTRO

      $export| grep ROS

      You will getsomething like:

      declare-x ROS_DISTRO="groovy"

      declare-x ROS_ETC_DIR="/opt/ros/groovy/etc/ros"

      declare-x ROS_MASTER_URI="http://localhost:11311"

      declare-x ROS_PACKAGE_PATH="/opt/ros/groovy/share:/opt/ros/groovy/stacks"

      declare-x ROS_ROOT="/opt/ros/groovy/share/ros"

      Everytime a new shell is launched, the environment variables will beloaded automatically.

  6. Getrosinstall:

    $sudoapt-get install python-rosinstall


Followthe instructionhttp://www.ros.org/wiki/ROS/Tutorials/InstallingandConfiguringROSEnvironmentto configure ros environment:

  1. Createa ROS Workspace:

    1. Createdirectories:

      $mkdir-p /program/ros_workspace/src

    2. Initializethe workspace:

      $cd/program/ros_workspace/src

      $catkin_init_workspace

      thiscommand will create one CMakeList.txt link;

    3. Buildthe workspace:

      $cd/program/ros_workspace

      $catkin_make

      thiscommand will create another two folders build and devel in theworkspace, refer tohttp://www.ros.org/wiki/ROS/Tutorials/InstallingandConfiguringROSEnvironmentfor detailed information about these folders.

  2. Changethe source command in ~/.bashrc:

    $gedit~/.bashrc

    Commentthe last line with '#',add new source and save the file. That is,changing the last part of ~/.bashrc into:

    #source/opt/ros/groovy/setup.bash

    source/program/ros_workspace/devel/setup.bash

    Byadding this line, every time you start a new shell, it willautomatically load ros environment variables. And roscd willdirectly take you to /program/ros_workspace/devel.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值