In this lab you will hand-craft a motion sequence to make the robot pick up
and flip a soda can. But we'll start with an easier problem: getting it
to nod "yes".
Part I: Calliope Startup
This should be familiar from last week, but since powering up the
Calliope is a bit complicated, the instructions are repeated here.
- Make sure the netbook is booted and running, and the cables from
the USB hub and the Kinect are plugged in.
- Unplug the Create power cord.
- Unplug the Calliope charger.
- If you would like to run on external power (recommended for this
lab), plug in the external power adapter.
- Turn on the Create by pressing its power button.
- Move the Calliope's arm to a safe position.
- Power up the Calliope:
- To run on external power, flip the power switch down.
- To run on battery power, flip the power switch up.
- You may need to run the fix_usb_serial.sh script.
- Start Tekkotsu and look for error messages.
- Start the ControllerGUI and verify that you can move the pan/tilt
and are getting images from the Kinect. Note: it can take a few
seconds for the Kinect to sort itself out after powering up.
If you don't already have a Relax sript in you ControllerGUI's script
menu (bottom right), give yourself one by going to Root Control >
Background Services and clicking once
on Relax Behavior to
select it without
activating it. Then click the Add button in
the ControllerGUI window and click "OK". Now this service is
available in your script menu and you can use it to relax or unrelax
all the servos. Check the Tekkotsu console for a message that tells
you whether the servos are relaxed or unrelaxed.
Part II: Posture Files
- If you have the Head Controller running, turn it off. Otherwise
it will fight with the posture editor. Note: the proper way to
turn off any of the GUI tools is to click on the ControllerGUI button
that activated the tool. Do not click on the window's close button;
that kills the window but leaves the tool running.
- Go to Root Control > File Access > Posture Editor.
- Straighten the head by setting NECK:pan and NECK:tilt to 0. To
do this, click on an effector name such as NECK:pan, then type the new
effector value in the ControllerGUI's "Send Input" window and hit Enter.
- Click on Save Posture and type lookstraight.pos in the Send Input
window. Hit Enter to save the posture. Look at the Tekkotsu console
and you'll see that the posture file has been stored on the robot
- Follow a similar procedure to create lookup.pos and lookdown.pos.
- Use the Load Posture command to move the robot to the "look up" posture
and then to the "look down" posture.
- Copy the files from the robot to your AFS directory by doing the
following on the workstation:
getmyfile robotname project/ms/data/motion/calliope5kp/filename
- Edit the files on the workstation to take out all the effectors
except for NECK:PAN and NECK:TILT.
Part III: Motion Sequences
- Review the lecture notes on motion sequences.
- Create a file nodyes.mot that makes the robot nod "yes" by
loading posture files to first center the pan/tilt and then move it
up, then down, then back to neutral. Note that the speed of the
motion is governed by how many millisconds you give the robot to reach
its new target position. This robot's "head" has a lot of mass;
please be gentle with the tilt servo.
- Upload nodyes.mot to the robot using sendmyfile. Install it in the
- Run Tekkotsu and go to Root Control > File Access > Run
Motion Sequence to test out your motion sequence.
Part IV: Running a Motion Sequence From a State Machine
Construct a state machine with a DynamicMotionSequenceNode that
causes the robot to say "Yes indeed!" whie nodding its head up and down.
Test it on your robot.
Part V: Flip The Soda Can
Do this for homework.
Some notes on working with the arm: (a) Do not leave the arm extended
for long periods of time. This heats up the servos, reducing their
life, and wears down the battery. Instead, use the Arm Controller's
"Relax" button to relax the arm when you're not actively using it.
(b) If you put too much of a load on a servo, such as by driving the
arm into the table or closing the gripper too tightly on an object,
you will get a "LOAD ERROR" message on the console and the servo will
shut down. You may also see the red error LED on the back of the
servo blinking. To correct this condition, relax the arm for a few
seconds and then unrelax it.
- Place an empty soda can in front of the robot. See if you can
use the Arm Controller to pick up the can, then rotate the wrist to
flip the can upside-down, place the can back on the table, and move
the arm out of the way. The Arm Controller can be awkward to use
(we're working on an improved version), so you might prefer to use the
Posture Editor instead. But don't run both at the same time or they
- Write a series of postures to position the arm to approach the
can, grasp the can, lift the can, rotate the can, place the can back
in the same location, release the can, and withdraw the arm.
- Construct a motion sequence to smoothly perform this series of actions.
- Construct a state machine that performs the motion sequence in a
loop. How reliable is the behavior? That is, how many times can the
sequence be repeated before it fumbles the grasp and loses the can?
- Modify your state machine so that the robot holds the can up and
looks at it with the camera to verify that it was picked up
successfully. You may want to wrap the can in colored tape to
facilitate better can detection. If the can is not visible, the grasp
has failed, and the robot should politely ask the human to put the can
back where it can find it, wait 5 seconds, and try the grasp again.
If the can is visible then the robot should continue with its can
Part VI: Park the Arm
Do this part if you are taking the graduate version of this class
Write a state machine to safely fold up and park the arm without
hitting anything. In order to do this you will have to move the arm
to a nearly parked position and then relax it to let it settle. Look
at how the Arm Controller implements the "Relax" button to learn how
to do this; the source is in
What to Hand In
Hand in your source code and posture and motion sequence files for
each of parts II through V or VI. Due Friday, March 2.
Dave Touretzky and