Lesson 3: Software architecture & environment deployment

1.Sofware architecture

Diego 1# features are based on ROS platform and many open-source software, software architecture is as shown in following figure.

 

  • OS is based on Ubuntu mate 16.04 and ROS release is kinetic
  • ros_arduino_bridge:The communication package between ROS and Arduino

    ros_arduino_firmware:Running on Arduino, responsible for control of corresponding module in Raspberry, like PID calculator, sensor control, servo control

    ros_arduino_node:Running on Raspberry as a node of ROS, providing related node service and topic

    base_controller:Running on Raspberry, subscripting Twist message, implementing control command translation based on the configuration of robot, also releasing odom message for other module

  • SLAM

    Gmapping:Construction indoor map based on laser radar data or pointcloud data, also requiring odom data

    Hector:Construction indoor map based on laser radar data or pointcloud data without odom data

    amcl:Positioning based on existing map based on laser radar data or pointcloud data

    move_base:Path planning, sending Twist message to control robot moving to specified location 

  • Vision

    Openni:Depth camera driver package using to drive xtion and Kinect to produce point cloud data 

    usb_cam: usb camera drive package

  • Voice & Speech

    sphinx:offline voice recognition and synthesis package, mainly focus on English

    Xunfei voice: Online voice recognition and synthesis system

  • moveit:Mechanical manipulator control package to control mechanical manipulator moving to specified position and obstacle avoiding
  • teleop_twist_keyboard-master:Controlling robot via keyboard

2.Building Ubuntu SD

Raspberry is based armhf architecture, according to ROS website, ROS kinetic+Ubuntu Xenial is required to support armhf.

and the recommended xenial release is Ubuntu MATE 16.04.2 LTS

So here we use the recommended release to avoid uncertain problems.

For ROS installation information, please refer to http://wiki.ros.org/ROS/Installation

2.1. Ubuntu MATE 16.04.2 LTS Download

Download address:https://ubuntu-mate.org/download/

Here Raspberry Pi release is recommended, after download and unzip you will get the mirror file.

2.2. Building Ubuntu SD on Mac

a.  Open a terminal

b. Using cd command to the mirror file located folder, here mirror file is at desktop

cd Desktop

c. Check the file name of sd card

diskutil list

d. Unmount disk

diskutil unmountDisk /dev/disk3

e. Executing write flash command

sudo dd bs=1m if=ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img of=/dev/disk3

Here is the procedure:

For windows OS, Win32DiskImager software with graphic interface can be used for write flash, we will not go detail here.

After above steps, SD card is ready to plug in Raspberry. For the first boot, necessary configuration is required, more detail please refer to :https://ubuntu-mate.org/raspberry-pi/

3. ROS installation

This part follows ROS installation guidance:http://wiki.ros.org/kinetic/Installation/Ubuntu

3.1 Setting 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'

 3.2 Setting key

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

3.3 System update

sudo apt-get update

3.4 ROS kinetic desktop installation

ROS kinetic desktop release is selected considering of calculation capability of Raspberry, required package will be loaded according to requirements.

sudo apt-get install ros-kinetic-desktop

3.5 rosdep    Initial rosdep

sudo rosdep init
rosdep update

3.6 Preference setting 

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

Until now, ROS has been installed on Raspberry and ready for work.

4.ROS working space creation

 To begin ROS development, first task is to create ROS working space

$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace

Leave a Reply

Scroll to top
%d bloggers like this: