1. Aibo's Diary
This is the page for the Aibo project at Bryn Mawr College. Participating robots: K-8 and K-91.1. Phase I
Writing a Python based robot controller for the Aibo that is goign to be integrated with Pyro.1.1.1. Daily Log
1.1.1.1. Wed Jan 26 2005
1.1.1.2. Fri Jan 28 2005
-
num PIDjoints = the number of joints which use PID motion
-
leg joints -> 3 joints per leg
-
the ordering of legs:
enum LegOrder_t {
00009 LFrLegOrder = 0, //!< left front leg
00010 RFrLegOrder, //!< right front leg
00011 LBkLegOrder, //!< left back leg
00012 RBkLegOrder //!< right back leg
00013 };
RotatorOffset moves leg forward or backward along body
ElevatorOffset moves leg toward or away from body
KneeOffset moves knee
head joints -> 3 joints
enum TPROffset_t {
00024 TiltOffset = 0, //!< tilt/elevation (vertical)
00025 PanOffset, //!< pan/heading (horizontal)
00026 RollOffset, //!< roll (rotational)
00027 NodOffset=RollOffset //!< nod (second tilt)
00028 };
tail joints -> 2 joints
-
tilt
-
pan
mouth joints -> 1 joint
num Sensors = 3 IR + 3 accel(force) + 5 power
-
for description see link
http://tekkotsu.no-ip.org/dox/namespaceERS7Info.html#a165
num Buttons = 2 head, 4 paws, 3 back, 1 underbelly
00173 //! holds offsets to different buttons in WorldState::buttons[]
00174 /*! Should be a straight mapping to the ButtonSourceIDs
00175 *
00176 * Note that the chest (power) button is not a normal button. It kills
00177 * power to the motors at a hardware level, and isn't sensed in the
00178 * normal way. If you want to know when it is pressed (and you are
00179 * about to shut down) see PowerSourceID::PauseSID.
00180 *
00181 * @see WorldState::buttons @see ButtonSourceID_t */
00182 enum ButtonOffset_t {
00183 LFrPawOffset = LFrLegOrder,
00184 RFrPawOffset = RFrLegOrder,
00185 LBkPawOffset = LBkLegOrder,
00186 RBkPawOffset = RBkLegOrder,
00187 ChinButOffset= 4,
00188 HeadButOffset,
00189 HeadFrButOffset=HeadButOffset,
00190 FrontBackButOffset,
00191 MiddleBackButOffset,
00192 BackButOffset = MiddleBackButOffset,
00193 RearBackButOffset,
00194 WirelessSwOffset
00195 };
00196
00197 //! Provides a string name for each button
00198 const char* const buttonNames[NumButtons] = {
00199 "LFrPaw","RFrPaw","LBkPaw","RBkPaw",
00200 "ChinBut","HeadBut",
00201 "FrontBackBut","MiddleBackBut","RearBackBut",
00202 "WirelessSw"
00203 };
duty cycles = (-1) means the motor is trying to move full power in negative direction, 1 means full power in positive direction, in practice, these values stay rather small - 0.15 is significant force. (same ordering as the outputs)
Doug
Made some changes to the Tekkotsu server code:
-
Added a !cmd "Head Remote Control" command that turns on this server. Use !cmd "#Head Remote Control" to turn it off.
-
Added three throttle settings in tekkotsu.cfg: vision.rawcam_interval, vision.rle_interval, and main.worldState_interval. These three values take 0 to run as fast as possible, or an integer in milliseconds to insert a pause between image grabs. Set them to 100 for 10 FPS, 200 for 5 FPS, or 1000 for a frame/reading a second.
-
I'm going to change Pyro now to work with the new commands; we'll need to update k-8 on Monday.
1.1.1.3. Mon Jan 31 2005
Doug: All the following applies to k-9
-
Got the interval working on "World State Serializer" via the config. Interactively, you can "!set main.worldState_interval=100" on the main_control socket to dynamically speed-up or slow down the feed.
-
Even with the interval set slow enough, anytime we have data stream into Pyro and we need it to be synched, we need to have a separate thread. This is easy to do. See ListenerThread in aibo.py. Takes a listener and a callback function.
-
Maybe the vision port changed in Tekkotsu 2.3? I still haven't been able to start a vision connection. Will try again later.
1.1.1.4. Tue Feb 1 2005
Doug: k-8 and k-9 are both working, and have the newest BMC Tekkotsu loaded on them. The problems with the vision were many: looks like BMC IT is blocking UDP packets on the wireless, and a couple of bugs in Tekkotsu. The toggling on/off of services is now fixed with an addition to "!select" which allows you to name a controller/file from the control menu. This works with servers, as well as files (like loading a Walk file. The timing interval pause hack doesn't seem to be working right yet. I suspect a problem with event.timeStamp() --- it might be a real, in seconds? You can get a strange behavior in Pyro or ControllerGUI by saying "!set vision.rawcam_interval=1"... it seems to pause 1 second between images, with a few all at once.
1.1.1.5. Thr Feb 3 2005
Ioana :1.1.1.5.1. getJoint(joint)
robot.getJoint("leg back left rotator")
robot.getJoint("right leg front knee")
robot.getJoint("mouth")
The words that can be used in the query are:
-
for leg: leg, right, left, front, back, knee, rotator, elevator
-
for head: head, tilt, pan, roll, nod
-
for tail: tail, tilt, pan
-
for mouth: mouth
The function returns the raw value of the joint and the duty cycle.
1.1.1.5.2. getButton(button)
robot.getButton("chin")
robot.getButton("left front paw")
robot.getButton("paw right back")
robot.getButton("body middle")
The words that can be used in the query are:
-
for paws: paw, left, right, front, back
-
for body: body, front, middle, back
-
for head: head
-
for chin: chin
-
for wireless: wireless
-
-these are on/off buttons
-
-these are pressure buttons
-
-this is a pressure button
-
-this is a pressure button
The function returns the raw value of the button.
1.1.1.5.3. getSensor(sensor)
The robot has 11 sensors:-
ir sensors(3): 2 in the head(near and far) and one in the chest.
-
acceleration sensors(3): front-back, left-right and down-up. Measured in m/s^2
-
power sensors(5):
-
-near : ranges from 50 to 500 in millimeters
-far : ranges from 200 to 1500 in millimeters
-chest: ranges from 100 to 900 in millimeters
-
-front-back: positive if the robot is inclined forward and negative if it is sitting on butt
-right-left: positive if lying on robot's right side and negative if lying on robots's left side
-up-down: negative if the robot is standing up, positive otherwise
-
-remaining: measured in percentage 0-1
-thermo: measured in degrees Celcius
-capacity: measured in milli-amp hours
-voltage: measured in volts
-current: measured in milli-amp; negative values
1.1.1.6. Fri Feb 4 2005
Looking at joint movement in Aibo3DController //! sends the new joint commands to the motion command
00067 void updateRC() {
00068 RemoteControllerMC *rcontrol = (RemoteControllerMC*)motman->checkoutMotion(rcontrol_id);
00069 for (unsigned int i=0; i<NumPIDJoints; i++)
00070 rcontrol->cmds[i]=val[i];
00071 rcontrol->setDirty();
00072 motman->checkinMotion(rcontrol_id);
00073 }
1.1.1.7. Mon Feb 7 2005
1.1.1.7.1. Update time
There is an option in the controller to change the update time. Maybe this is goign to help Root -> Status Report -> Sensor Observer -> Real-time Update Period It takes in a number and then you can observe the outcome using Real-time View More infor in SensorObserverControlrtCtl->setPeriod(fr<100?100:fr); //limit to minimum period of 100ms
1.1.1.7.2. Tail Wag
There is a class that can do this TailWagMC1.1.1.7.3. Moving Joints
Apparently this motion manager does everything in terms of moving joints.1.1.1.8. Fri Feb 11 2005
I found this class that I think is goign to help up move whatever joint we want (WorldStateJointsWriter.java).All we need to do is to fiure out the port. Port might be 10051.
void mirrorWriter(WorldStateJointsWriter wsj) {
if (wsj.isConnected()) {
float[] p=new float[18];
p[0]=-forward.thigh_fl.x;
p[1]=forward.thigh_fl.z;
p[2]=-forward.knee_fl.x;
p[3]=-forward.thigh_fr.x;
p[4]=-forward.thigh_fr.z;
p[5]=-forward.knee_fr.x;
p[6]=forward.thigh_bl.x;
p[7]=forward.thigh_bl.z;
p[8]=forward.knee_bl.x;
p[9]=forward.thigh_br.x;
p[10]=-forward.thigh_br.z;
p[11]=forward.knee_br.x;
p[12]=-forward.neck.x;
p[13]=forward.head.y;
p[14]=forward.head.z;
p[15]=forward.tail.x;
p[16]=forward.tail.y;
p[17]=-forward.jaw.x;
wsj.write(p);
}
}
1.1.1.9. Mon Feb 14 2005
We can move the following joints-
mouth : Use: robot.setPose("mouth", amount) where amount is between 0.0(close) and -1.0(open)
-
tail : Use: robot.setPose("tail", amountx, amounty)
-
legs: Use robot.setPose(leg name,amtElevate, amtRotate, amtKnee) where amtElevate is between -0.3 and 1.6 ; amtRotate is between -2.2 and 2.4; and amtKnee is between -0.6 and 2.3; leg name can be "front left leg", "front right leg", "back left leg", "back right leg"
1.1.1.10. Thr Feb 17 2005
Chnaged all the code for getButton, getSensor, getJoint, setPose to be protected against usage errors. Also changed the interface to setPose. You can specify the values for the whole leg or just for a specific joint. Values are normalized, between -1.0 and 1.0. The normalized values can be found on the pyro modules aibo page. I also normalized the position returned by getJoint to be consistent with setPose().I haven't figured out exactly the range of tail movement. values between -1.0 and 1.0 work might we might need to do some scalling.
I updated the pyro modules.
I tested the TrackBall behavior and it works with the new architecture.
1.1.1.11. Fri Feb 25 2005
2 new functions playSound(file)>>> robot.playSound("3barks")
None
>>> robot.playSound("mew")
None
inverseKinematics(joint) : returns the value of pan, tilt or roll for the head
>>> robot.inverseKinematics("pan tilt roll")
{'tilt': -0.53099393844604492, 'roll': 1.0896310000352456, 'pan': 0.0}
>>> robot.inverseKinematics("tilt")
{'tilt': -0.53099393844604492}
>>> robot.inverseKinematics("roll pan")
{'roll': 1.0896310000352456, 'pan': -0.0050429529791710358}
2. Wish List
-
Move mouth
-
Move tail
-
Move ears
-
Be able to move joints - define a walk sequence
-
Microphone working
-
Speakers working
