AiboPet's AiboHack Site
http://aibopet.com, http://aibohack.com


ERS-110, 111


ERS-210[A], 220[A]

Programming AIBO with:

YART, RCodePlus
OpenR SDK



ERS-311[B], 312[B], 31L


ERS7
Home
Movies (all)
PDAs: CLIE ( Panel Zipit )
Lesser Robots: Pleo ( RoboSapien ICybie )
Game Hacks: Nintendo Wii Nintendo DS ( PSP )
Email: aibopet@aibohack.com
[AiboHack] RCodePlus Motion control


RCodePlus Motion control


Typically, your RCODE personality will use pre-created .MTN files to perform motions (and perhaps audio and .LED performances). You sometimes want to have more dynamic and low level control over AIBO's servos.
WARNING: advanced and dangerous. You can burn up your AIBO's servos if you aren't careful!!


Servo numbers

The value of iLeg is typically in the range of 0 to 11. Special values exist for the head (12, 13, 14), the mouth (15, ERS-210 only), and the tail (16 and 17, ERS-210 only).
    //REVIEW: add complete list with normal RCode names


AP_GETJOINTS, AP_MOVEJOINTS, AP_Move_Results (2.51)

Once again, arrays to the rescue!
    AP_GETJOINTS array array_offset play_type
    AP_MOVEJOINTS array array_offset play_type frame_count

	'array' contains the new angles (in degrees)
    'array_offset' lets you have multiple values in the same array
        array_offset is added to the array to index the servo values
        [word index]

    'play_type' indicates which servos are specified
        12 = legs only (12 servos)
        15 = full body motion for ERS-220 or ERS-31x
        18 = full body motion for ERS-210
        0xC03 = head only
        [upper byte=start servo, lower byte=servo_count]

    'frame_count' is the number of 32ms frames to perform the move
        [range of 1 to 16, 16 is recommended]

AP_GETJOINTS fill the array with current joint values (in degrees). AP_MOVEJOINTS move the joints to the new values. After calling AP_MOVEJOINTS, you should check the variable "AP_Move_Result". If the value is -1, then AIBO was busy and the move did not occur, so wait a little while and try again.


AP_SETGAIN2

The RCodePlus statement "AP_SETGAIN2:iLeg:p:i:d" will set the specified joint to use the 3 gain coefficients, p, i and d. These are typically in the range of 0 to under 100.
The value of iLeg is typically in the range of 0 to 11. Special values exist for the head (12, 13, 14), the mouth (15, ERS-210 only), and the tail (16 and 17, ERS-210 only).
NOTE: if the joints have been turned completely off (as in a jam condition), they will stay off.

If you wish an updated version of the old "pidWalker" program, or want to experiment with different walking styles (gaits), please send me an email.



//TO DOCUMENT:

Using "INIT MTN", "LOAD SND/MTN/LED", "PLAY MTN"
MTN_MSG strings
AP_Use_Replay_Result
AP_Replay_Result
    start with -1 in your code
    0 = null
    1 = success
    2 = error
    3 = complete
    4 = incomplete
    5 = allocerror

    Side-steps the Wait decrement, but not the increment.
    You should "SUB Wait 1" after AP_Replay_Result is set

AP_Use_Ram
    if != 0 hooks "LOAD SND/MTN/LED"
        file name is not important, but use "ram"

    -1 for uploaded data
    1->? for array data

    Set to 0 when done