Embedded Motion Control 2012: Difference between revisions

From Control Systems Technology Group
Jump to navigation Jump to search
Line 29: Line 29:


= SVN =
= SVN =
In this project, an [http://svnbook.red-bean.com/en/1.7/svn.intro.whatis.html SVN] will be used for sharing and versioning the software. To set up the directory to where the code is checked out from the SVN, open a terminal and do the following:
In this project, an [http://svnbook.red-bean.com/en/1.7/svn.intro.whatis.html 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:


# First, create a directory in your home directory in which we'll put all ROS-related code, files and data: <pre>mkdir ~/ros</pre>
# First, create a directory in your home directory in which we'll put all ROS-related code, files and data: <pre>mkdir ~/ros</pre>
# Then, check out your group folder from the SVN:<pre>svn co https://amigo.wtb.tue.nl/svn/amigo/education/emc/2012/groups/group_01 ~/ros</pre>
# Then, check out your group folder from the SVN:<pre>svn co https://amigo.wtb.tue.nl/svn/amigo/education/emc/2012/groups/group_01 ~/ros</pre>
# Furthermore, check out the general folder, which contains the robot simulator:<pre>svn co https://amigo.wtb.tue.nl/svn/amigo/education/emc/2012/groups/general ~/ros</pre>
# Furthermore, check out the general folder, which contains the robot simulator:<pre>svn co https://amigo.wtb.tue.nl/svn/amigo/education/emc/2012/groups/general ~/ros</pre>
The SVN can be accessed from a terminal, but this can also be done using a graphical user interface with the program called SmartSVN. Please see [[installing SmartSVN]] for information about how to install a graphical client for using SVN. In order to be able to commit files to the SVN, get yourself an SVN account by contacting Patrick van Brakel.


= Environment Set-up =
= Environment Set-up =

Revision as of 11:47, 18 April 2012

Guide towards the assignment

Gostai-Jazz-500x500.jpg

Author(s): Sjoerd van den Dries

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

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, 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

We could simply set-up ROS by directly calling the setup.bash script located in /opt/ros/electric/setup.bash from .bashrc. However, instead, we will call a script located on the SVN which will do that for you, and much more. This way, you'll have all the functionality in your terminal everyone has in the group, including many useful commands that will make your life much easier. Assuming you still have ~/.bashrc open:

  1. Add to the end of the file:
    export TUE_TRUNK=~/ros/pkgs/tue-ros-pkg/trunk
    This sets the environment variable TUE_TRUNK to the correct path, such that all scripts can find the AMIGO trunk on your computer.
  2. Do the same for the development folder dev, so add:
    export TUE_DEV=~/ros/pkgs/tue-ros-pkg/dev
  3. Add the following line to run (or 'source') a script which introduces many useful aliases, which are abbreviations for (sometimes somewhat lengthy) terminal commands:
    source $TUE_TRUNK/tue_admin_files/amigo_admin_files/files/amigo_bash_aliases
    Notice that it uses the TUE_TRUNK variable to be able to define a path relative to the trunk.
  4. Add a line to ensure a script is executed which sets up all ROS-related things:
    source $TUE_TRUNK/tue_admin_files/amigo_admin_files/files/user_bash_ros
  5. Save ~/.bashrc and close it.

That's it. Next time you open a terminal, .bashrc is executed, which will in turn execute the scripts 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, type in the terminal:

trunk

and see how your directory changes to the root of the AMIGO trunk.

Getting Started

Now everything is set-up correctly, you can start using Ubuntu and ROS to develop some great new features for AMIGO! But before you run off and start to do some serious coding, be sure to check out the following pages:


Introduction

Goal

Hardware

Installation

Installing Ubuntu 10.04 LTS

Ubuntu can be installed according 2 methods

  1. Using an USB stick.
  2. Using the hard drive.

For both methods the most recent installation instructions can be found on http://www.ubuntu.com/desktop/get-ubuntu/download. Make sure that you download the appropriate architecture ie. 32 or 64-bit. Creating a dual-boot system, ie. installing Ubuntu on the hard drive is the most convenient. When installing Ubuntu on an USB stick make sure to use some persistence/extra space during the install such that information is still there after a reboot.

If you installed Ubuntu on an USB stick you have to make sure that your notebook will boot from the USB stick. This can be edited in the BIOS or for most notebooks during the booting process, F9 can be pressed to select the USB drive.

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