home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2003 March / VPR0303A.ISO / AIBO / MoNet / common / libMTN / MTN-FFORM-E.txt < prev    next >
Text File  |  2002-12-19  |  13KB  |  267 lines

  1.  
  2.                 MTN File Format
  3.  
  4. - function
  5.    Provides motion data information for a robot.
  6.  
  7. - byte order
  8.    little endian
  9.  
  10. - data type definition
  11.  
  12.    type : Strings are composed by the following definition.
  13.  
  14.       offset  size    type    contents                        data
  15.       -------+-------+-------+-------------------------------+-------
  16.          0      1     uc      length
  17.          1      x     ch      characters
  18.  
  19.     length:
  20.         The number of characters in a string
  21.     characters:
  22.         String data
  23.  
  24. - File Format
  25.  
  26.       offset  size    type    contents                        data
  27.       -------+-------+-------+-------------------------------+-------
  28.          0      1     ch      magic 0                         'O'
  29.          1      1     ch      magic 1                         'M'
  30.          2      1     ch      magic 2                         'T'
  31.          3      1     ch      magic 3                         'N'
  32.          4      24    cp      Section 0
  33.          28     x     cp      Section 1
  34.          x      x     cp      Section 2
  35.          x      x     cp      Section 3
  36.  
  37.     magic 0-3:
  38.         file magic
  39.  
  40.     1. Section 0
  41.          Section0 is the header of fundamental items.  It has a fixed
  42. length.
  43.  
  44.       offset  size    type    contents                        data
  45.       -------+-------+-------+-------------------------------+-------
  46.       0       4       lw      Section Number                  0
  47.       4       4       lw      Section Size                    24
  48.       8       4       lw      Number of Sections              4
  49.       12      2       wd      Major Version                   1
  50.       14      2       wd      Minor Version                   2
  51.       16      2       wd      Number of keyframes
  52.       18      2       wd      Frame Rate                      16
  53.       20      4       lw      Reserved                        0
  54.  
  55.     Section Number:
  56.         Serial Number of this section
  57.     Section Size:
  58.         The size of this section (in bytes)
  59.     Number of Sections:
  60.         The number of sections contained in this file
  61.     Major Version:
  62.         The major version number of Format
  63.     Minor Version:
  64.         The minor version number of Format
  65.     Number of keyframes:
  66.         The number of keyframes in this file
  67.     Frame Rate:
  68.         Motion replay speed [msec/frame]
  69.  
  70.     2. Section 1
  71.     This header describes the fundamental names. It has a variable length.
  72.     Note: Use padding when the Section Size is less than 4 bytes.
  73.  
  74.       offset  size    type    contents                        data
  75.       -------+-------+-------+-------------------------------+-------
  76.       0       4       lw      Section Number                  1
  77.       4       4       lw      Section Size
  78.       8       x       Strings Motion Name
  79.       x       x       Strings Creator
  80.       x       x       Strings Design Label
  81.       x       0-3             Padding                         0
  82.  
  83.     Section Number:
  84.         Serial Number of this section
  85.     Section Size:
  86.         The size of this section (in bytes)
  87.     Motion Name:
  88.         Motion Name is the file name without the mtn extension
  89.     Creator:
  90.         Author name
  91.     Design Label:
  92.         The design label of the robot
  93.  
  94.     3. Section 2
  95.     This header describes the Joint list.  It has a variable length.
  96.     Note: Use padding when the Section Size is less than 4 bytes.
  97.  
  98.       offset  size    type    contents                        data
  99.       -------+-------+-------+-------------------------------+-------
  100.       0       4       lw      Section Number                  2
  101.       4       4       lw      Section Size
  102.       8       2       wd      Number of Joints
  103.       x       x       Strings PRM 0
  104.       x       x       Strings PRM 1
  105.       x       x       ....
  106.       x       x       Strings PRM (Number of Joints -1)
  107.       x       0-3             Padding                         0
  108.  
  109.     Section Number:
  110.         Serial Number of this section
  111.     Section Size:
  112.         The size of this section (in bytes)
  113.     Number of Joints:
  114.         The number of Joints used in this file
  115.     PRM:
  116.         The CPC Primitive Locator name of a Joint used in this file
  117.  
  118.     9.4. Section 3
  119.     This head describes the type of motion data. It has a variable length.
  120.     Note: Use padding when the section Size is less than 4 bytes.
  121.  
  122.       offset  size    type    contents                        data
  123.       -------+-------+-------+-------------------------------+-------
  124.       0       4       lw      Section Number                  3
  125.       4       4       lw      Section Size
  126.       8       4       lw      Data Type                       0
  127.       12      x       cp      Data Section
  128.  
  129.     Section Number:
  130.         Serial Number of this section
  131.     Section Size:
  132.         The size of this section (in bytes)
  133.     Data Type:
  134.         The kind of Motion Data
  135.         0 : angle line data
  136.  
  137.     4-1. Data Section
  138.     The following is the data format when the Data Type is 0.
  139.  
  140.     [Roll] [Pitch] [Yaw]
  141.     [Joint Data]
  142.     {
  143.       [Number of Interpolate frame]
  144.       [Roll] [Pitch] [Yaw]
  145.       [Joint Data]
  146.     }  X (Number of Keyframes - 1)
  147.  
  148.       offset  size    type    contents                        data
  149.       -------+-------+-------+-------------------------------+-------
  150.       0       4       lw      Roll
  151.       4       4       lw      Pitch
  152.       8       4       lw      Yaw
  153.       12      x       cp      Joint Data Section
  154.       x       4       lw      Number of Interpolation frames
  155.                               .....
  156.     Roll:
  157.         Robot's BODY roll (in Micro radian)
  158.         (when it leans to the right, plus)
  159.  
  160.     Pitch:
  161.         Robot's BODY pitch (in Micro radian)
  162.         (when it leans backward, plus)
  163.  
  164.     Yaw:
  165.         Robot's BODY yaw (in Micro radian)
  166.         (when it turns to the left, plus)
  167.  
  168.     Joint Data Section:
  169.         The joint data is associated with the corresponding PRM
  170.         String in Section 2.
  171.  
  172.     Number of Interpolation frames:
  173.         The number of interpolation frames with the former frame.
  174.  
  175.     9.4-1-1. Joint Data Section
  176.  
  177.       offset  size    type    contents                        data
  178.       -------+-------+-------+-------------------------------+-------
  179.       0       4       lw      Joint Data 0
  180.       4       4       lw      Joint Data 1
  181.                               .....
  182.       x       4       lw      Joint Data (Number of Joints 窶1)
  183.  
  184.     Joint data:
  185.     The position of a joint (in Micro radians)
  186.  
  187. Example
  188.  
  189.  ADDRESS : +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F 0123456789ABCDEF
  190.            +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  191.           -------------------------------------------------
  192. 00000000 : 4F 4D 54 4E 00 00 00 00 18 00 00 00 04 00 00 00 : OMTN............
  193. 00000010 : 01 00 02 00 06 00 10 00 00 00 00 00 01 00 00 00 : ................
  194. 00000020 : 30 00 00 00 0D 61 5F 73 74 61 6E 64 23 73 69 74 : 0....a_stand#sit
  195. 00000030 : 5F 53 10 53 6F 6E 79 20 43 6F 72 70 6F 72 61 74 : _S.Sony Corporat
  196. 00000040 : 69 6F 6E 07 44 52 58 2D 39 31 30 00 02 00 00 00 : ion.DRX-910.....
  197. 00000050 : F8 01 00 00 14 00 14 50 52 4D 3A 2F 72 31 2F 63 : .......PRM:/r1/c
  198. 00000060 : 31 2D 4A 6F 69 6E 74 32 3A 6A 31 17 50 52 4D 3A : 1-Joint2:j1.PRM:
  199. 00000070 : 2F 72 31 2F 63 31 2F 63 32 2D 4A 6F 69 6E 74 32 : /r1/c1/c2-Joint2
  200. 00000080 : 3A 6A 32 1A 50 52 4D 3A 2F 72 31 2F 63 31 2F 63 : :j2.PRM:/r1/c1/c
  201. 00000090 : 32 2F 63 33 2D 4A 6F 69 6E 74 32 3A 6A 33 1D 50 : 2/c3-Joint2:j3.P
  202. 000000A0 : 52 4D 3A 2F 72 31 2F 63 31 2F 63 32 2F 63 33 2F : RM:/r1/c1/c2/c3/
  203. 000000B0 : 63 34 2D 4A 6F 69 6E 74 32 3A 6A 34 1D 50 52 4D : c4-Joint2:j4.PRM
  204. 000000C0 : 3A 2F 72 31 2F 63 31 2F 63 32 2F 63 33 2F 65 31 : :/r1/c1/c2/c3/e1
  205. 000000D0 : 2D 4A 6F 69 6E 74 33 3A 6A 35 1D 50 52 4D 3A 2F : -Joint3:j5.PRM:/
  206. 000000E0 : 72 31 2F 63 31 2F 63 32 2F 63 33 2F 65 32 2D 4A : r1/c1/c2/c3/e2-J
  207. 000000F0 : 6F 69 6E 74 33 3A 6A 36 14 50 52 4D 3A 2F 72 32 : oint3:j6.PRM:/r2
  208. 00000100 : 2F 63 31 2D 4A 6F 69 6E 74 32 3A 6A 31 17 50 52 : /c1-Joint2:j1.PR
  209. 00000110 : 4D 3A 2F 72 32 2F 63 31 2F 63 32 2D 4A 6F 69 6E : M:/r2/c1/c2-Join
  210. 00000120 : 74 32 3A 6A 32 1A 50 52 4D 3A 2F 72 32 2F 63 31 : t2:j2.PRM:/r2/c1
  211. 00000130 : 2F 63 32 2F 63 33 2D 4A 6F 69 6E 74 32 3A 6A 33 : /c2/c3-Joint2:j3
  212. 00000140 : 14 50 52 4D 3A 2F 72 33 2F 63 31 2D 4A 6F 69 6E : .PRM:/r3/c1-Join
  213. 00000150 : 74 32 3A 6A 31 17 50 52 4D 3A 2F 72 33 2F 63 31 : t2:j1.PRM:/r3/c1
  214. 00000160 : 2F 63 32 2D 4A 6F 69 6E 74 32 3A 6A 32 1A 50 52 : /c2-Joint2:j2.PR
  215. 00000170 : 4D 3A 2F 72 33 2F 63 31 2F 63 32 2F 63 33 2D 4A : M:/r3/c1/c2/c3-J
  216. 00000180 : 6F 69 6E 74 32 3A 6A 33 14 50 52 4D 3A 2F 72 34 : oint2:j3.PRM:/r4
  217. 00000190 : 2F 63 31 2D 4A 6F 69 6E 74 32 3A 6A 31 17 50 52 : /c1-Joint2:j1.PR
  218. 000001A0 : 4D 3A 2F 72 34 2F 63 31 2F 63 32 2D 4A 6F 69 6E : M:/r4/c1/c2-Join
  219. 000001B0 : 74 32 3A 6A 32 1A 50 52 4D 3A 2F 72 34 2F 63 31 : t2:j2.PRM:/r4/c1
  220. 000001C0 : 2F 63 32 2F 63 33 2D 4A 6F 69 6E 74 32 3A 6A 33 : /c2/c3-Joint2:j3
  221. 000001D0 : 14 50 52 4D 3A 2F 72 35 2F 63 31 2D 4A 6F 69 6E : .PRM:/r5/c1-Join
  222. 000001E0 : 74 32 3A 6A 31 17 50 52 4D 3A 2F 72 35 2F 63 31 : t2:j1.PRM:/r5/c1
  223. 000001F0 : 2F 63 32 2D 4A 6F 69 6E 74 32 3A 6A 32 1A 50 52 : /c2-Joint2:j2.PR
  224. 00000200 : 4D 3A 2F 72 35 2F 63 31 2F 63 32 2F 63 33 2D 4A : M:/r5/c1/c2/c3-J
  225. 00000210 : 6F 69 6E 74 32 3A 6A 33 14 50 52 4D 3A 2F 72 36 : oint2:j3.PRM:/r6
  226. 00000220 : 2F 63 31 2D 4A 6F 69 6E 74 32 3A 6A 31 14 50 52 : /c1-Joint2:j1.PR
  227. 00000230 : 4D 3A 2F 72 36 2F 63 32 2D 4A 6F 69 6E 74 32 3A : M:/r6/c2-Joint2:
  228. 00000240 : 6A 32 00 00 03 00 00 00 48 02 00 00 00 00 00 00 : j2......H.......
  229. 00000250 : 00 00 00 00 5A 88 00 00 00 00 00 00 00 00 00 00 : ....Z...........
  230. 00000260 : 00 00 00 00 00 00 00 00 78 33 FF FF 00 00 00 00 : ........x3......
  231. 00000270 : 00 00 00 00 3B 56 FD FF 00 00 00 00 50 FD 07 00 : ....;V......P...
  232. 00000280 : D3 BB FF FF 00 00 00 00 6D A8 06 00 3B 56 FD FF : ........m...;V..
  233. 00000290 : 00 00 00 00 51 FD 07 00 00 00 00 00 00 00 00 00 : ....Q...........
  234. 000002A0 : 6E A8 06 00 00 00 00 00 00 00 00 00 3C 00 00 00 : n...........<...
  235. 000002B0 : 00 00 00 00 F0 66 FE FF 00 00 00 00 28 36 F7 FF : .....f......(6..
  236. 000002C0 : 00 00 00 00 00 00 00 00 78 33 FF FF 00 00 00 00 : ........x3......
  237. 000002D0 : 00 00 00 00 BE 14 F5 FF 00 00 00 00 5D A0 1E 00 : ............]...
  238. 000002E0 : CD AD F6 FF 00 00 00 00 D2 4C 19 00 EB 58 F5 FF : .........L......
  239. 000002F0 : 00 00 00 00 5D A0 1E 00 CE AD F6 FF 00 00 00 00 : ....]...........
  240. 00000300 : D2 4C 19 00 00 00 00 00 00 00 00 00 32 00 00 00 : .L..........2...
  241. 00000310 : 00 00 00 00 A8 FE 03 00 00 00 00 00 28 36 F7 FF : ............(6..
  242. 00000320 : 00 00 00 00 00 00 00 00 78 33 FF FF 00 00 00 00 : ........x3......
  243. 00000330 : 00 00 00 00 CE AD F6 FF 00 00 00 00 0D A3 16 00 : ................
  244. 00000340 : 26 AF F2 FF 00 00 00 00 08 26 27 00 CE AD F6 FF : &........&'.....
  245. 00000350 : 00 00 00 00 0D A3 16 00 26 AF F2 FF 00 00 00 00 : ........&.......
  246. 00000360 : 08 26 27 00 00 00 00 00 00 00 00 00 28 00 00 00 : .&'.........(...
  247. 00000370 : 00 00 00 00 E2 54 01 00 00 00 00 00 80 43 F8 FF : .............C..
  248. 00000380 : 00 00 00 00 00 00 00 00 78 33 FF FF 00 00 00 00 : ........x3......
  249. 00000390 : 00 00 00 00 11 F6 F7 FF 00 00 00 00 99 D9 1E 00 : ................
  250. 000003A0 : AA 50 ED FF 00 00 00 00 05 92 25 00 B0 02 F8 FF : .P........%.....
  251. 000003B0 : 00 00 00 00 5D A0 1E 00 9B 5B ED FF 00 00 00 00 : ....]...........
  252. 000003C0 : 05 92 25 00 00 00 00 00 00 00 00 00 32 00 00 00 : ..%.........2...
  253. 000003D0 : 00 00 00 00 30 CB 04 00 00 00 00 00 70 C9 F8 FF : ....0.......p...
  254. 000003E0 : 00 00 00 00 00 00 00 00 78 33 FF FF 00 00 00 00 : ........x3......
  255. 000003F0 : 00 00 00 00 95 87 FA FF 00 00 00 00 B2 6F 15 00 : .............o..
  256. 00000400 : 78 C0 EA FF 00 00 00 00 21 C9 24 00 76 AC FA FF : x.......!.$.v...
  257. 00000410 : 00 00 00 00 2A 4E 15 00 15 C6 EA FF 00 00 00 00 : ....*N..........
  258. 00000420 : 21 C9 24 00 00 00 00 00 00 00 00 00 64 00 00 00 : !.$.........d...
  259. 00000430 : 00 00 00 00 AA 85 08 00 00 00 00 00 93 57 F9 FF : ................
  260. 00000440 : 00 00 00 00 00 00 00 00 78 33 FF FF 00 00 00 00 : ........x3......
  261. 00000450 : 00 00 00 00 00 00 00 00 00 00 00 00 C4 A9 02 00 : ................
  262. 00000460 : 12 08 E8 FF 00 00 00 00 E4 F3 23 00 19 D7 FF FF : ..........#.....
  263. 00000470 : 00 00 00 00 AE D2 02 00 0F 08 E8 FF 00 00 00 00 : ................
  264. 00000480 : EC F3 23 00 00 00 00 00 00 00 00 00             : ..#.........
  265.           -------------------------------------------------
  266.            +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F
  267.