Home






Motion Command Line Tools
Contents of this website are freeware and/or copyrighted material, and may not be sold under any circumstances.
Email: dogsbody@dogsbodynet.com     Home: https://dogsbodynet.com


Download Here:  Motion Command Line Tools v1.10  (273 KBytes)


Introduction:

The following motion file tools were originally developed while creating DogsBody's contest entry.  They saved a huge amount of time by automating time-consuming steps encountered in making the various skits.  The tools are DOS command line programs, and are most useful in batch files.  They should work on all versions of Windows.

TAILWAG
AIBOCVT
MCOPYJOINT
MCONCAT
MMIRROR
MREFLECT
MRENAME
MSCALE
To add tail wagging once your masterpiece is complete.
Convert AIBO platform (ie: ERS-210 to ERS-7).
Copy head/tail/leg joint movements from one keyframe to another.
Concatenate motion files (combine two or more into one).
Mirror head/tail/leg movements left to right & visa versa.
Reflect a motion file around a keyframe (to make a motion file "unwind").
Change motion start#stop chunk name.
Adjusting motion file speed -- make faster/slower -- for matching sound files.

The Skitter AIBO performance editor can do all these operations also -- but with a nice Windows GUI interface.    In addition, the OdaBuild action compiler tool (included with both Skitter & Aibnet) can perform these operations with user action files (*.uac) files.


Revision History:

   Version 1.00:   Initial Release
   Version 1.10:   Added support all AIBO platforms (110/210/220/310/7)





 TAILWAG 

Generates tail wagging in your motion files.   You give as parameters the motion filename, the speed of wagging, and the angle amount the tail must move. 

NOTE:  This program might make motions faster than Action Composer permits!   If you load a tailwag motion file, Action Composer may not allow saving changes until various minor adjustments are made.

Usage (from the dos prompt) is:


TAILWAG    target.mtn    [options]

 
The command line options are:

-outfile [filename] Filename to write changes to.  Default is to modify original file.

-hspeed [#value] Horizontal speed of tail wagging.  Valid values are 0 to 10.  Default is 10 (for maximum speed).

-vspeed [#value] Vertical speed of tail wagging.  Valid values are 0 to 10.  Default is 0 (for no vertical movement).

-hangle [#value] Horizontal angle to swing between.    Default is zero.

-vangle [#value] Vertical angle to swing between.    Default is zero.

-start [#frame] Frame to start wagging at.    Default finds the first existing frame with tail wagging.

-stop [#frame] Frame to stop wagging at.    Default finds the last existing frame with tail wagging.

 
Saving Changes:
Changes are normally saved to the original motion file by default.   To specify a different output file, use the "-outfile" option.    If the output file already exists, it is renamed with a ".bak" extension added  (ie: "test.mtn" becomes "test.mtn.bak").   The following applies default tail wagging to a new output file: 
    TAILWAG  test.mtn  -outfile newtest.mtn 
 
Speed and Angle Values:
The speed values are 1/10ths of the maximum permitted by Master Studio.   A value of 5 is half speed.  A value of 10 makes the tail move at the fastest speed. 

The angle values correspond to those seen in Action Composer.  The tail movement limit is 22 degrees. 

 
Starting & Stopping Tail Wagging:
TailWag supports using Action Composer to specify the start & stop points.   Choose the keyframes where you want tail wagging to start, and edit the tail positions in those frames to be non-zero.   TailWag will find the first & last frames with non-zero tail positions and fill in the space between. 

Alternatively, you can use the -start/-stop command line options.    First, figure out where you want tag wagging to occur.  In Action Composer, choose frame mode (in upper-left corner above the word "Key Frame").   Find the frames of interest and write down the keyframe positions.   Use those values as parameters for -start  & -stop. 

There does not need to be existing keyframes at the start/stop times.  TailWag will create them for you if needed, and also interpolates any new keyframes between your existing keyframes. 

The following example fills the time between 100 & 200 with default horizontal tail wagging in "test.mtn": 
    TAILWAG  test.mtn  -start 100  -stop 200 

 
Static Tail Positions:
One additional capability is moving the tail to a fixed (static) position.   This is normally used to position the tail in one axis, while wagging occurs in the other.   To specify a static position, give a tail speed of 0. 

This example fills the time between 100 & 200 with default horizontal tail wagging, but also lifts the tail up vertically:
    TAILWAG  test.mtn  -start 100  -stop 200  -vspeed 0  -vangle 22 

 




AIBOCVT

Converts AIBO motion or LED file formats between 110/210/220/310/7 platforms.   There are no restrictions on conversion direction, though there might be loss of data (especially converting to/from the 310).

Usage (from the dos prompt) is:


AIBOCVT [MTN/LED] <source-platform> <target-platform> <srcfile> <targetfile>
 
Example usage:
    AIBOCVT MTN 210 7 beethoven5.mtn beethoven7-7.mtn




 MCOPYJOINT 

Copies joint settings between keyframes.    If you've created a motion file, and realize the head position is off slightly, you can edit the first keyframe then copy just the head positions to all other keyframes.   You can copy as few or as many joints as needed.   You give as parameters the motion filename, the target keyframe, the start/stop keyframes to be altered, and finally a list of target joints. 

Usage (from the dos prompt) is:


MCOPYJOINT    target.mtn    [options]

The command line options are:

-outfile [filename] Filename to write changes to.  Default is to modify original file.

-target [#frame] Target keyframe to copy.

-start [#frame] First keyframe to receive copied joint settings.  Default is first keyframe in file.

-stop [#frame] Last keyframe to receive copied joint settings.   Default is last keyframe in file.




-all Copy all joints.

-head Copy all head, ear, mouth joints.

-legs Copy joints in all four legs.

-tail Copy all tail joints.




-legfr Copy all front-right leg joints.

-legfl Copy all front-left leg joints.

-legbr Copy all back-right leg joints.

-legbl Copy all back-left leg joint.




-head_tilt Copy up/down neck joint.

-head_pan Copy left/right head joint.

-head_roll Copy roll side-to-side head joint.

-mouth Copy mouth.

-ear_left Left ear.

-ear_right Right ear.

-legfr_vert Front right vertical joint (shoulder).

-legfr_tilt Front right tilt joint (shoulder).

-legfr_knee Front right knee.

-legfl_vert Front left vertical joint (shoulder).

-legfl_tilt Front left tilt joint (shoulder).

-legfl_knee Front left knee.

-legbr_vert Back right vertical joint (hip).

-legbr_tilt Back right tilt joint (hip).

-legbr_knee Back right knee.

-legbl_vert Back left vertical joint (hip).

-legbl_tilt Back left tilt joint (hip).

-legbl_knee Back left knee.

-tail_horz Tail horizontal.

-tail_vert Tail vertical.

 
Saving Changes:
Changes are normally saved to the original motion file by default.   To specify a different output file, use the "-outfile" option.    If the output file already exists, it is renamed with a ".bak" extension added  (ie: "test.mtn" becomes "test.mtn.bak"). 
 
Target, Start & Stop Keyframes:
You need to note the keyframes of interest while in Action Composer.   First, make sure you are in frame mode (click tab in upper-left corner above word "Key Frame").   Highlight the keyframe to copy from, and copy down the frame number shown above it.   Do the same for the first & last keyframes to be modified with copied joints.
 
Hmm....  What to Copy...  Options, Options, Options...
You can copy just one specific joint, or everything.   More than one joint option can be listed at once (the command line options are cumulative).   Some of the options cover multiple joints.  For example, the "-head" option copies all neck, head, ear, and mouth joints.   The "-body" option copies all leg joints. 

The following copies the head & front legs from keyframe 10 to all keyframes 100 through 800: 
    MCOPYJOINT  test.mtn  -target 10  -start 100  -stop 800  -head  -legfr  -legfl 

 



 MCONCAT 

Combines two or more motion files to form one output file.   Last frame of previous, and first two frames of each concatenated motion file are removed.

Usage (from the dos prompt) is:


MCONCAT  outfile.mtn  target1.mtn [target2.mtn] [target3.mtn] etc...






 MMIRROR 

Mirrors or exchanges left for right various body motions.   You give as parameters the motion filename, the body parts to mirror, and optionally start/stop keyframes to be changed. 

Usage (from the dos prompt) is:


MMIRROR    target.mtn    [options]

The command line options are:

-outfile [filename] Filename to write changes to.  Default is to modify original file.

-start [#frame] First keyframe to be mirrored.   Default is first keyframe.

-stop [#frame] Last keyframe to be mirrored.   Default is last keyframe.




-all Mirror all joints left to right.

-head Mirror head pan & ear joints.

-legs Mirror joints in all four legs.

-tail Mirror tail (affects horizontal axis only)..




-front Mirror front legs.

-rear Mirror rear legs.
   
Saving Changes:
Changes are normally saved to the original motion file by default.   To specify a different output file, use the "-outfile" option.    If the output file already exists, it is renamed with a ".bak" extension added  (ie: "test.mtn" becomes "test.mtn.bak"). 
 
Start & Stop Keyframes:
To control the range of mirroring, you need to note the keyframes of interest while in Action Composer.   First, make sure you are in frame mode (click tab in upper-left corner above word "Key Frame").   Highlight the first keyframe to mirror, and copy down the frame number shown above it.   Do the same for the last keyframes to be mirrored.   The following only mirrors between keyframe times 100 and 200: 
     MMIRROR  test.mtn  -start 100  -stop 200 
 
Mirror Options:
You can mirror the entire body, or just certain parts.   More than one option can be listed, and the are cumulative. The following mirrors head & tail movements (but not legs) over the entire motion file. 
     MMIRROR  test.mtn  -head -tail 
 



 MREFLECT 

This program reflects motion files around an arbitrary keyframe.   It's quite useful when developing new motion files.  You create your performance, and then have this program create the reverse to undo it back to the starting point.   Parameters are the motion filename, and the reflection keyframe. 

Usage (from the dos prompt) is:


MREFLECT    target.mtn    [options]

The command line options are:

-outfile [filename] Filename to write changes to.  Default is to modify original file.

-time [#frame] Keyframe to be reflection point.   Default is reflect around last keyframe.

 
Saving Changes:
Changes are normally saved to the original motion file by default.   To specify a different output file, use the "-outfile" option.    If the output file already exists, it is renamed with a ".bak" extension added  (ie: "test.mtn" becomes "test.mtn.bak"). 
 
Reflection Keyframe:
MReflect uses this keyframe as the focal point.    The program copies keyframes from time to the reflection point, then appends them in reverse order after the reflect point.    NOTE:  Any original keyframes after the reflection time in your motion file will be lost!   The following reflects all keyframes from time 0 to 1000: 
     MREFLECT  test.mtn  -time 1000
 



 MRENAME 

Renames motion start#stop chunk names.

Usage (from the dos prompt) is:


MRENAME    target.mtn    [options]

The command line options are:

-outfile [filename] Filename to write changes to.  Default is to modify original file.

-name newname Replace entire start#stop chunk name with specified value.

-stand
Change chunk name postures to 'a_stand#stand_OLDNAME'

-sleep
Change chunk name postures to 'a_sleep#sleep_OLDNAME'

-sit
Change chunk name postures to 'a_sit#sit_OLDNAME'




 MSCALE 

This program adjusts the spacing between keyframes.   Unfortunately, Master Studio doesn't accurately estimate the speed at which AIBO plays motion files.   Thus, motions, sounds, and LED's diverge over time on AIBO verses the Action Composer simulation.   The "Test Action" command helps (if you have a wireless LAN).  However, motion files played under RCode behaviors run slightly slower than when tested stand-alone.   What a headache....  MScale can adjust motions easily to compensate for these variations. 

NOTE:  This program might make motions faster than Action Composer permits!   If you load a scaled motion file, Action Composer may not allow saving changes until various adjustments are made. 

Usage (from the dos prompt) is:


MSCALE    target.mtn    [options]

The command line options are:

-outfile [filename] Filename to write changes to.  Default is to modify original file.

-scale [percentage] Amount to scale motion file by.  Default is 100 percent (ie: no change). 
Valid values are 50 to 200.

 
Saving Changes:
Changes are normally saved to the original motion file by default.   To specify a different output file, use the "-outfile" option.    If the output file already exists, it is renamed with a ".bak" extension added  (ie: "test.mtn" becomes "test.mtn.bak"). 
 
Scaling Value:
This value is a percentage of the original run time.   A motion file exactly 1000 keyframe time units long, scaled by 75% would become 750 keyframes long.    A scaling value of 100 has no effect (output is 100% of the original motion file).   A scaling value of 200 makes the motion file twice as long. 

Typical adjustments for running under an RCode behavior are: 
     Action Composer Preview Window to RCode needs a motion scaling value of 105. 
     Action Composer Test Action to RCode needs a motion scaling value of 95. 

Your mileage will vary slightly, depending on the speed of your computer, the music source (MIDI or WAV), the length and dynamics of your motion files, if a wireless network is being used, the phase of the moon, etc... 

The following makes the motion file 5% faster (95% of the original). 
     MSCALE  test.mtn  -scale 95 

 


Legalese: These programs are provided AS IS without any warranty, expressed or implied.  This includes without limitation the fitfulness for a particular purpose or application.    People using the software bear all risk as to its quality and performance.   The user of the software is responsible for any damages whether direct, indirect, special, incidental or consequential arising from a failure of these programs to operate in any manner desired.   Etc, etc...

"AIBO" is a registered trademark of Sony Corporation.  "AIBO Master Studio", "R-Code", and "Memory Stick" are trademarks of Sony Corporation.