ECE 550: Advanced Robotic Planning
Programming Homework #1

Due: Feb. 18, 2016.

ROS is an open-source collection of software libraries and tools that has been developed specifically for robotics applications. ROS has become a defacto standard in robotics research, providing standardized interfaces, device drivers, and algorithm implementations. However, generality and power come at a cost: it can be difficult for new users to find their way through the maze of libraries, system files, install options; even arriving to the first "Hello World" program can be a frustrating experience. The purpose of this first assignment is to ease your entry into the world of ROS.

The assignment consists of two parts. The first part of the assignment is merely to gain access to a ROS system. The second part requires writing a fairly simple ROS program. Before beginning the assignment, I encourage you to first read some background material about ROS. The first three chapters of [AGITR] provide a particularly friendly overview, and the content of these chapterse matches well with the requirements for this assignment. The first two chapters of [MF] give a nice introduction to ROS at the system level.

Part 1: Acquiring a ROS Installation

To complete the programming assignments for the course, you will need to have access to a ROS system. Since ROS runs runs under the Linux operating, you'll also need access to a Linux installation. There are at least three possibilities:

  • If you have access to a Linux machine machine (including a dual-boot system with Linux partition), you can install and run ROS directly on this system. If this is possible for you, it's likely the best choice. You'll enjoy the convenience of working with your own computer, and you'll enjoy the speed of the system relative to running ROS on a virtual machine.
  • On a Windows system, you can install a virtual machine that runs linux, and then run ROS on the virtual machine. The main disadvantage to this approach is that using the virtual machine incurs significant computational overhead, which can cause system response to be a bit slow. Still, for the assingments in this course, the virutal machine option is probably reasonable.
  • If neither of the above options work for you, you can complete your assignments using computers in the undergraduate robotics lab (ECEB 3071). At present, the lab is equipped with four ROS-equipped Linux machines. If you choose to use this option, you'll need to contact the course TA to gain access to the lab.

Because both ROS and Linux are open-source software packages, there are a number of versions of each. ROS is designed to run under Ubuntu Linux, so this choice is fairly easy. Nevertheless, there are still choices, since there are many versions of Ubuntu (and newer versions will continue to arrive). ROS versions are called distributions, and these are sequentially named, starting with ROS Box Turtle (March 2010), ROS C (August 2010), continuing to the current ROS Jade (May 2015). For this class, we recommend using ROS Indigo (July 2014) along with Ubuntu 14.04 (Trusty).

There are many web pages, tutorials, and books that provide guidelines for installing ROS. You can find a partial list on the Course Resources page. In addition, Hyongju (your course TA) has prepared a streamlined tutorial to guide you through the installation process, and to demonstrate how to write simple ROS programs.

What you should do: Once you have installed ROS, you should write and execute the standard "Hello World" program. This will ensure that (a) you have a working ROS installation, (b) you are able to successfully compile ROS programs, and (c) that you understand how to execute ROS programs. You can find Hyongju's step-by-step guide here.

Part 2: A First Programming Assignment

For the programming assignment, you will create a simple path planning program using either C++ or python that works with turtlesim package in ROS. This project requires writing both subscriber and publisher code, so please take some time to learn about these concepts before beginning. The following are good places to begin: Hyongju's tutorial overview, [AGITR] (particularly the third chapter), and [MF] (the first two chapter).

Your program will control the motion of a robot using the turtlesim package. The simulated (turtle) robot lives on an 11x11 grid. The coordinates for the lower-left corner are (0, 0), and for the upper-right corner are (11,11). Initially, the turtle is positioned at (5.54, 5.54) heading east. The simulator is designed to prevent turtle from escaping the square workspace.

Your task is to write a program should do the following things.

  1. When the program begins, it should prompt the user for an input goal position (xg,yg).
  2. Once the goal position has been enterred, your robot should move to the goal using a simple proportional control scheme:
    1. Determine the desired heading to the goal (i.e., the heading angle from the robot's current position to the goal).
    2. Determine the heading error.
    3. Set the angular velocity of the robot to be proportional to the heading error.
    4. Set the linear velocity of the robot to be proportional to the distance to the goal.
    The above commands should be executed in a loop, until the robot reaches the goal position (within some error tolerance). This is, obviously, a very simple control scheme. Feel free to design a more sophisticated controller (particularly if you have had past courses in control systems).

What to turn in: For this assignment, you are required to give a live demonstration to the course TA. Scheduling for this will be arranged closer to the due date.