CS8803RMP: Robot Motion Planning
Programming Homework #1

Due: Apr. 16, 2019.

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, your best bet is to find a partner that has access to one of the above solutions.

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, I recommend using ROS Indigo (July 2014) along with Ubuntu 14.04 (Trusty), but feel free to make your own choice here.

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, a few years ago I gave a similar programming assignment for a class at UIUC. At that time, my TA, Hyongju prepared a tutorial to guide students through the assignment. It may not be completely up-to-date, but you might find it to be helpful for this assignment.

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.

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: [AGITR] (particularly the third chapter), and [MF] (the first two chapters).

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).