1. 程式人生 > >ROS系列-ARM平臺ROS開發環境安裝

ROS系列-ARM平臺ROS開發環境安裝

安裝環境:lubuntu 14.04
安裝機器:嵌入式ARM RK box
ROS版本:Jade Turtles

以下兩步可選其一:
(1)加入ros ubuntu的源 sources.list

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

Set up your keys

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

更新源:
sudo apt-get update
安裝桌面版:

sudo apt-get install ros-jade-desktop

我這邊full版本安裝一直提示找不到包。

Initialize rosdep
Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

sudo rosdep init
    rosdep update

Environment setup
It’s convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

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

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.
If you just want to change the environment of your current shell, you can type:

source /opt/ros/jade/setup.bash

這些安裝成功後,可以在source。list中去掉國內源,在執行一邊

apt-get update
就可以進行下一步:

sudo apt-get install python-rosinstall

到這裡ROS的初步環境算是搭建完成了,接下來跑個例子試試看效果。

測試ROS的例程
  安裝ROS成功後,在Beginner Tutorials中有一個簡單的示例程式.
  a、在Terminal中輸入下訴命令。該命令是初始化ROS環境,全域性引數,以及每個節點註冊等工作。         


roscore
  
  b、再開啟一個Terminal,輸入命令。開啟一個小烏龜介面。     

    $ rosrun turtlesim turtlesim_node

這裡寫圖片描述
  c、再開啟一個Terminal,輸入命令。接受鍵盤輸入,控制小烏龜移動。     

    $ rosrun turtlesim turtle_teleop_key
  d、選中最後開啟的Terminal,鍵盤按下上下左右按鍵,可看到控制小烏龜移動。如下圖所示
這裡寫圖片描述

e、再開啟一個Terminal,輸入下訴命令,可以看到當前ROS Nodes 以及Topic等圖形展示。     
    $ rosrun rqt_graph rqt_graph
[圖片]