CS395T: Autonomous Robots -- Assignment 2
Assignment 2: Movement
The purpose of this assignment is to familiarize you with the
challenges of robotic movement. In Part I, your job is to design a kick
that enables the Aibo to kick a ball as far or as accurately as
possible. For Part II, your job is to control the Aibo's feet so as
to make the robot walk.
Part I: KickTool
For this part of the assignment, your job is to design a kick for the
Aibo. The goal is to make something that kicks the ball as far, or as
accurately, as possible. First, get our KickTool.
- Copy the kick tool from
/home/robosoccer/assignments/prog2/KickTool into your home
directory. Note that it just has the compiled binaries (in the MS
directory); don't worry about the source code for this one.
- Load up the kick tool (same loading up procedure as in Assignment 1), and run it on the Aibo.
- Telnet into the Aibo:
telnet 10.0.1.<IP-number> 59000
- Follow the instructions through the telnet window.
- When you're done making a kick, save it with the "(w)rite kick
to file" command.
- To copy your kick file off the memstick, put the memstick back
in the reader, mount /memstick, and use cp to copy
from /memstick/open-r/mw/data/p/ to your home directory.
Don't forget to umount /memstick when you are done
with it.
- Warning: The wipestick command (which you should use as
you load up the memory stick) will delete any kick files saved to
the memory stick. So be sure to copy the kick off the memstick before
you wipestick it.
Some useful information:
- A kick is represented as a series of poses. A pose
consists of an angle value for each joint, combined with an amount
of time (how long it takes to move to that pose from the previous
one). The amount of time is called the "maxCounter", and the unit
for the maxCounter is 8 milliseconds (think 125 per second).
- You can create poses by manually positioning the joints, or by
editing the joint values numerically. The KickTool allows you to
navigate through your options.
- The (r)un kick command only works every other time you
execute it.
- Ignore the option "fetch the ball" for now, since it involves
vision.
- The kick tool takes some getting used to. You may need to
spend some time experimenting with it to get the hang of it.
Part II: Walking
For this part of the assignment, you will write code to control the
Aibo's four legs so that they walk. The two main problems you will
have to solve are how the legs coordinate with each other, and what
trajectories the feet should follow.
- Most of a walking program is in
/home/robosoccer/assignments/prog2/MakeWalk. Your job is
to fill in the missing piece. But first, copy the MakeWalk program
into your home directory.
- In the directory ParamWalk, look at the file
ParamWalk.cc. Starting at line 289, you should find the
function CompAngles. What's there right now is some
example code to get you started. Instead of walking, it bounces up
and down. You have to change it so that it walks forwards,
preferably as fast as possible.
- You can use our inverse kinematics function, SetLocIK.
For each leg, call SetLocIK(newangles, legnum, x,
y, z). Each leg has its own coordinate system,
centered at its hip. But the four coordinate systems are all
oriented the same way: positive x goes to the Aibo's right, positive
y goes forwards, and positive z goes up. Our inverse kinematics
assumes that the distance from the hip to the knee is the same as
the distance from the knee to the foot: this constant length is the
unit length of the coordinate systems. For example, if you set all
four legs to (0, 0, -2), the robot should stand up as tall as it
can. The leg numbers are 1: right front; 2: left front; 3: right
rear; 4: left rear.
- If you don't want to use SetLocIK, you are welcome to
write your own inverse kinematics, or set the joint angles directly
(to do this, put the angle values (in degrees) directly into the
array newangles; see inside SetLocIK for an
example).
- The function CompAngles will be executed every time
the Aibo moves its joints to the next set of angles. This means
that the walking cycle takes place over the course of many different
CompAngles executions (roughly one every 8 milliseconds).
To orchestrate the walking cycle, we suggest that you use a static
counter variable like the one in the example code.
- Optional: For additional challenges, try making the
robot walk straight backwards, straight sideways, or turn in place.
- Finally, feel free to be creative! There are many ways to move
the robot across the field; experimentation with new ideas is
encouraged.
What to Turn In
- Send us (stronger and pstone) an email with a description of
your expeiences/design process in part I, and a description of your
final walking code (leg coordination, trajectories, etc.) for part
II.
- Make a directory for yourself in /home/class. For
Part I, put a copy of your .PMF kick file in
/home/class/<yourname>/prog2/.
- For Part II, first run make clean in the main
directory of your walking program (this deletes many large files
that are generted when you compile). Then copy your walking program
into /home/class/<yourname>/prog2/.
- Be prepared to demo both your kick and your walk in class on Thursday, Sept. 22.
[Back to Class Homepage]
Page maintained by
Peter Stone and Dan Stronger
Questions? Send me
mail