|
||||||
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 | ||||
RCodePlus Motion control |
//REVIEW: add complete list with normal RCode names
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.
//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