Embedded Motion Control 2012: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Line 11: Line 11:
This course is about acquiring the knowledge that is necessary to be able to design and implement embedded software for real-time control systems. The book "Real-time concepts for embedded systems" by Li and Yao will be taken as a starting point. The participating students themselves will give lectures to their peers about parts of this book. The accompanying assignment is about applying this knowledge to a real-life robotics task in which ROS will be the standard software framework.
This course is about acquiring the knowledge that is necessary to be able to design and implement embedded software for real-time control systems. The book "Real-time concepts for embedded systems" by Li and Yao will be taken as a starting point. The participating students themselves will give lectures to their peers about parts of this book. The accompanying assignment is about applying this knowledge to a real-life robotics task in which ROS will be the standard software framework.


Lectures will be given on Mondays from 10.45 - 12.30 in Gemini-Zuis 3A12. The course schedule is as follows:
Lectures will be given on Mondays from 10.45 - 12.30 in Gemini-Zuid 3A12. The course schedule is as follows:





Revision as of 07:44, 20 April 2012

Guide towards the assignment
'A-MAZE-ING JAZZ'

Gostai-Jazz-500x500.jpg

Introduction

This course is about acquiring the knowledge that is necessary to be able to design and implement embedded software for real-time control systems. The book "Real-time concepts for embedded systems" by Li and Yao will be taken as a starting point. The participating students themselves will give lectures to their peers about parts of this book. The accompanying assignment is about applying this knowledge to a real-life robotics task in which ROS will be the standard software framework.

Lectures will be given on Mondays from 10.45 - 12.30 in Gemini-Zuid 3A12. The course schedule is as follows:


April, 23th Introduction
May, 7th Chapter 4, 5
May, 14th Chapter 6, 7
May, 21th Chapter 10, 11
June, 4th Corridor competition
June, 11th Chapter 14, 15
June, 18th Final Contest

Goal

The goal of the assignment is to get the real-time concepts in embedded software design operational. The concrete task that has to be solved is to let the Jazz robot find his way out of a maze. The final demonstration by each participating group of 4-6 students will be performed during a contest, the winner of which is the group that performs the task in the shortest time. The maze of the final competition will be constructed just before the competition. So, the Jazz robot will need to be able to safely navigate around the maze and find the exit as quickly as possible. The walls of the maze will contain several types of pointers to the exit, which can potentially help Jazz to speed up execution of the task. These pointers will be defined in the beginning of the assignment.

Hardware

The moving Jazz robot with monocular camera and laser range finder with a working ROS interface.

Installation

This manual describes how to the install the necessary and sufficient software to start programming the Jazz robot.

Ubuntu

Go to The official Ubuntu site and download and install Ubuntu 10.04, which is the latest Long Term Support release. Make sure that you download the appropriate architecture i.e., 32- or 64-bit. Of course you can also bring your notebook to the ICT servicedesk and ask them to install Ubuntu. If you want to keep using Windows next to Ubuntu the most easy way is to have a dual-boot system, i.e., during startup you can choose to boot either Ubuntu or Windows.

Ubuntu Terminal

Most of your interaction with Ubuntu will be done through the terminal, the number-one way of interacting with Ubuntu using your keyboard. A terminal can be started as follows: Application -> Accessories -> Terminal. It might be a good idea to drag the terminal icon to the Ubuntu panel, as you will be using the it a lot.

Although the terminal commands may seem somewhat puzzling at first, you'll soon find out that the terminal is a nifty tool and allows for faster and more powerful access to all of Ubuntu's possibilities than the graphical interface and mouse. If you don't know your way around the terminal, have a look at this page.

ROS

In the this project, we will use the Robotic Operating System (ROS) which aids the testing and development of robot software. ROS provides a nice open-source framework for dealing with the communication between and management of different modules, and comes with a large amount of software that can be used out of the box, including device drivers, libraries, low- and high-level software, visualizers and more. More information about ROS and its goals can be found here. To install ROS under Ubuntu 10.04, do the following:

  1. Add the ROS Debian source to your sources.list such that Ubuntu knows where to download ROS from. Open a terminal (Applications -> Accessories -> Terminal) and enter:
    sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu lucid main" > /etc/apt/sources.list.d/ros-latest.list'
  2. To be able to connect with the server, add its public key to your keys:
    wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
  3. Make sure you have re-indexed the ROS.org server:
    sudo apt-get update
  4. Then, install ROS. To make sure you don't miss out on any packages, install all packages available in the ROS Electric release:
    sudo apt-get install ros-electric-*

If you ran into problems, be sure to check the installation guide on the ROS website.

SVN

In this project, an SVN will be used for sharing and versioning the software. Every group has its own space on the SVN, and an account which has only permissions for that particular part. To set up the directory to where the code is checked out from the SVN, open a terminal and do the following:

  1. First, create a directory in your home directory in which we'll put all ROS-related code, files and data:
    mkdir ~/ros
  2. Then, go to that folder
     cd ~/ros
    and check out your group folder from the SVN:
    svn co https://amigo.wtb.tue.nl/svn/amigo/education/emc/2012/groups/group_01 ~/ros
  3. Furthermore, check out the general folder, which contains the robot simulator:
    svn co https://amigo.wtb.tue.nl/svn/amigo/education/emc/2012/groups/general ~/ros

Environment Set-up

So far we've installed ROS and created a local copy of the SVN. However, before you can start working, you need to do some additional set-ups to make sure Ubuntu knows where to find all ROS-related packages, scripts, etc. More specifically, every time you start up a terminal, the correct environment variables need to be set. The file .bashrc in your home directory is your friend: it's a script which runs every time a a new terminal is opened. We basically need to add some lines to this file, so open it with a text editor:

gedit ~/.bashrc

Append the following text to the end of the file:

source /opt/ros/electric/setup.bash

This will set-up all ROS-related scripts etc. every time you open a terminal. Furthermore, ROS needs to known where your software is located. Therefore, also add the following command to ~/.bashrc:

export ROS_PACKAGE_PATH=~/ros:$ROS_PACKAGE_PATH

That's it. Next time you open a terminal, .bashrc is executed, which will in turn execute the script and set the path specified above. To directly see it working without starting a new terminal, explicitly source .bashrc from the terminal:

source ~/.bashrc

To see whether it worked, try one of commands that are now at your disposal. For example, change your directory to the jazz_simulator package:

roscd jazz_simulator

If everything is correct, you should have changed directory to this package.

Installing Eclipse

To keep the code in your packages clear and manageable, it is advised to use the editor Eclipse, an Integrated Development Environment (IDE) which is widely used for Java, C, C++ and many more languages. This section explains how it can be configured to be easily used with ROS packages.


To install Eclipse, do the following:

  1. Go to the Eclipse download site
  2. Find 'Eclipse IDE for C/C++ Developers' and select the appropriate version on the right (32-Bit or 64-Bit Linux).
  3. Extract Eclipse into a folder of your choice
  4. You can create a launcher to Eclipse to your panel by right clicking the panel, choosing 'Add to panel' and selecting 'Custom Application Launcher'. Then browse to the Eclipse executable, and enter a name. If you want you can add the Eclipse icon by clicking the image on the left and browsing to the icon in the Eclipse folder.


Now, to make sure your package can be viewed properly in eclipse, do the following:

  1. Enter in a terminal:
    roscd <package name>
    make eclipse-project
  2. Open Eclipse
  3. Go to “file” → “Import”
  4. Click “General”
  5. Then “Existing Projects into Workspace”
  6. Click “next”
  7. Browse for the package

All environment settings should be set automatically. You can build the package using ctrl-b. Note that you have to remake the eclipse-project in your package every time you change the manifest or if you switch to a new version of ROS. If you're having trouble or want to know more about the possibilities of using eclipse with ROS, check the ROS wiki.

Getting Started

To get started with ROS, follow the official ROS tutorials. Note that you have already installed and configured your ROS environment, so you can skip the first tutorial. It is advised to work in your group folder, i.e., ~/ros/group_?.

Group Wiki Pages

Group 01 - Visit Wiki - <NAMES>

Group 02 - Visit Wiki - <NAMES>

Group 03 - Visit Wiki - <NAMES>

Group 04 - Visit Wiki - <NAMES>

Group 05 - Visit Wiki - <NAMES>

Group 06 - Visit Wiki - <NAMES>

Group 07 - Visit Wiki - <NAMES>

Group 08 - Visit Wiki - <NAMES>

Group 09 - Visit Wiki - <NAMES>

Group 10 - Visit Wiki - <NAMES>

References