CMU RI 16-711: KDC: Assignment 1


This assignment uses the Open Dynamics Engine (ODE, www.ode.org) to explore trajectory planning and optimization. Below are ODE demo programs and Linux and Windows versions of the necessary include and library files to compile them. Documentation and the source code for ODE is available from www.ode.org. Download the appropriate file below. The readme.txt file in the top level lists what the directories are. ode-demos includes the source and compiled versions for the demo programs that came with ODE. cga-demos includes the source and compiled versions for demo programs written by CGA.


Linux: Demo programs for ODE and libraries


Windows (Visual Studio 6): Demo programs for ODE and libraries

E&S Library has a "Visual Studio 6" installation CD for loan. This has Visual C++ on it. Note that the current update for VC6 is below.

Service Pack 6 for Visual Studio 6.


Windows (Visual Studio .net)

Two example applications, testCrash (an ODE demo) and ass1a (a version of ass1kdc). All additional needed files are included. You can get the rest of the demo programs from the Visual Studio 6 version.


Mac instructions


Assignment 1

Part 1: Optimize the trajectory of a pendulum with friction. The program cga-demos/ass1kdc.cpp gives an example of an answer to this part, using a simple PD servo. Note that the score is printed out for each second of simulated time. See if you can find a way to swing the pendulum from the downward pointing equilibrium point to the upward pointing equilibrium point with a smaller score. The scoring function is given in the example program ass1kdc.cpp.

Part 2: Redo Part 1 with an unknown initial starting point. The program ass1kdc.cpp (see links above) shows how we will give an initial state as command line arguments to the program:
ass1kdc.exe 2.1 5.3
For some reason command line arguments do not work under Windows, so edit the program to change the initial state. Let us know if you figure out how to fix this problem. To get Windows to work with command line arguments the console subsystem must be selected in the project configuration.
System -> Subsystem -> Console (/SUBSYSTEM:CONSOLE)

The range of initial states we will test on will have a maximum energy of 20 (roughly twice the energy of the goal position).


If you don't want to use ODE, here is a C program and a Makefile that approximately matches the ODE simulation.


What to turn in?

Generate a web page describing what you did. Include links to your source and compiled code in either .zip, .tar, or .tar.gz format. Be sure to list the names of all the members of your group. Mail the URL of your web page to mmcnaugh@cs and cc cga@cs [You complete the address, we are trying to avoid spam.] The writeup is more important than the code. What did you do? Why did it work?


You can use any type of computer/OS/language you want. You can work in groups or alone.