====== Differences ====== This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
specifications:protocol [2015/10/12 02:13] Guvalif |
specifications:protocol [2015/11/16 03:50] Guvalif |
||
---|---|---|---|
Line 3: | Line 3: | ||
======== | ======== | ||
- | Translate me. | + | ## Basic Specification |
+ | In sending a command, firstly send header that defined as 3 characters. | ||
+ | Secondly formatting and send each argument. | ||
- | ## 基本仕様 | + | Before sending a command, client must convert binary-expression to ascii-expression. |
- | 命令を送信するにあたり、3文字で定義されたヘッダをまず送信し、 | + | (If the client sending a command without conversion, PLEN's moving is different from you intended.) |
- | それに続いて各構成要素を定められたフォーマットのもと順次送信していきます。 | + | |
- | クライアント側では全ての表現を文字列にしてから送信する必要があります。 | + | No differences the command line made of upper case or lower case. |
- | (バイナリをそのまま送信した場合、意図しない動作をすることがあります。) | + | |
- | なお、コマンドラインが大文字か小文字かは区別されません。 | ||
+ | ## Group of Controller Command | ||
+ | ### $AN (Apply Native Value) | ||
- | ## Controller関連のコマンド | + | |Args |Roles |Min (dec)|Max (dec)|Format |
- | ### $AN (指示値の適用) | + | |: |
- | + | |DEVICE_ID|Set a device id. | |
- | |タグ | + | |VALUE |
- | |: | + | |
- | |DEVICE_ID|デバイス番号の指定 | + | |
- | |VALUE | + | |
*example*: | *example*: | ||
- | デバイス**10**に**1000**を出力したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to apply **1000** to device |
``` | ``` | ||
Line 30: | Line 28: | ||
``` | ``` | ||
- | ### $AD (指示値差分の適用) | + | ### $AD (Apply Diff Value) |
- | |タグ | + | |Args |Roles |Min (dec)|Max (dec)|Format |
- | |: | + | |: |
- | |DEVICE_ID|デバイス番号の指定 | + | |DEVICE_ID|Set a device id. |
- | |VALUE | + | |VALUE |
*example*: | *example*: | ||
- | デバイス**4**の初期値に**-100**した値を出力したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to apply **home value - 100** to device |
``` | ``` | ||
Line 44: | Line 42: | ||
``` | ``` | ||
- | ### $PM (モーションの再生) | + | ### $PM (Play a Motion) |
**Attention!** | **Attention!** | ||
- | 後方互換性のために**$MP**も利用可能ですが、[[deprecated]]扱いです。 | + | You could also use "$MP", but this is **[[deprecated]]**. |
- | |タグ|役割 | + | |Args|Roles |
- | |:---|:---------------------|: | + | |: |
- | |SLOT|読み出しスロットの指定|0 |89 | + | |SLOT|Set to read slot.|0 |89 |
*example*: | *example*: | ||
- | スロット**4**のモーションを再生したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to play slot **4**, send command below. |
``` | ``` | ||
Line 60: | Line 58: | ||
``` | ``` | ||
- | ### $SM (モーションの停止) | + | ### $SM (Stop a Motion) |
**Attention!** | **Attention!** | ||
- | 後方互換性のために**$MS**も利用可能ですが、[[deprecated]]扱いです。 | + | You could also use "$MS", but this is **[[deprecated]]**. |
*example*: | *example*: | ||
- | モーションを停止したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to stop a motion, send command below. |
``` | ``` | ||
Line 72: | Line 70: | ||
``` | ``` | ||
- | ### $HP (初期姿勢への移行) | + | ### $HP (Apply Home Position) |
*example*: | *example*: | ||
- | 初期姿勢に移行したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to apply home position, send command below. |
``` | ``` | ||
Line 82: | Line 80: | ||
- | ## Interpreter関連のコマンド | + | ## Group of Interpreter |
- | ### #PU (関数のプッシュ) | + | ### #PU (Push a Function) |
- | |タグ | + | |Args |Roles |
- | |: | + | |: |
- | |SLOT |読出しスロットの指定 | + | |SLOT |Set to read slot. |
- | |LOOP_COUNT|ループ回数の指定 | + | |LOOP_COUNT|Set number of play.|0 |255 |0 padding,hex,2byte| |
*example*: | *example*: | ||
- | スロット**10**のモーションを**3**回再生する関数をプッシュしたい場合、送信するコマンドラインは以下の通りです。 | + | If you want to push function that plays slot **10** **three** times, send command below. |
``` | ``` | ||
Line 97: | Line 95: | ||
``` | ``` | ||
- | ### #PO (関数のポップ) | + | ### #PO (Pop a Function) |
*example*: | *example*: | ||
- | 関数をポップしたい場合、送信するコマンドラインは以下の通りです。 | + | If you want to pop a function, send command below. |
``` | ``` | ||
Line 106: | Line 104: | ||
``` | ``` | ||
- | ### #RI (インタプリタの初期化) | + | ### #RI (Reset the Interpreter) |
*example*: | *example*: | ||
- | インタプリタを初期化したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to reset the interpreter, |
``` | ``` | ||
Line 116: | Line 114: | ||
- | ## Setter関連のコマンド | + | ## Group of Setter |
- | ### >IN (モーションのインストール) | + | ### >IN (Install a Motion) |
**Attention!** | **Attention!** | ||
- | [[deprecated]]扱いです。ver.1.2.0では廃止予定なので、基本的に後述の**>MH**,**>MF**を使用してください。 | + | This is **[[deprecated]]**. Obsolescent at firmware version |
+ | Please using **> | ||
- | |タグ | + | |Args |Roles |
- | |: | + | |: |
- | |SLOT |書き込みスロットの指定 | + | |SLOT |Set to write slot. |0 |89 |
- | |NAME |モーション名の指定 | + | |NAME |Set a motion name. |--- |--- |white space padding,20byte| |
- | |FUNC |関数の指定 | + | |FUNC |Set a function. |
- | |ARG0 |制御機能に渡す引数0 (*1) |0 |255 |0埋め,16進数表現,2byte| | + | |ARG0 |Set a function' |
- | |ARG1 |制御機能に渡す引数1 (*1) |0 |255 |0埋め,16進数表現,2byte| | + | |ARG1 |Set a function' |
- | |FRAME_LENGTH | + | |FRAME_LENGTH |
- | |TRANSITION_TIME_MS|遷移時間の指定 | + | |TRANSITION_TIME_MS|Set a transition time (msec).|32 |
- | |VALUE[DEVICE_ID] | + | |VALUE[DEVICE_ID] |
- | **(*1) | + | **(*1) |
- | |" | + | |" |
- | |:---------|:-------------------------------------------------------------| | + | |: |
- | |0 | + | |0 |--- | |
- | |1 | + | |1 |Play a motion with infinite |
- | |2 | + | |2 |Jump to arg 0 if then stopped the motion. |
- | **(*2) | + | **(*2) |
*example*: | *example*: | ||
- | 以下のようなモーションをインストールするとします。 | + | Let install a motion below. |
- | |タグ | + | |Args |Values| |
- | |: | + | |: |
- | |SLOT |0 | + | |SLOT |0 |
- | |NAME |Test| | + | |NAME |Test | |
- | |FUNC |0 | + | |FUNC |0 |
- | |ARG0 |0 | + | |ARG0 |0 |
- | |ARG1 |0 | + | |ARG1 |0 |
- | |FRAME_LENGTH | + | |FRAME_LENGTH |
- | |TRANSITION_TIME_MS|100 | | + | |TRANSITION_TIME_MS|100 |
- | |OUTPUT[EVEN] | + | |OUTPUT[EVEN] |
- | |OUTPUT[ODD] | + | |OUTPUT[ODD] |
- | その際、送信するコマンドラインは以下の通りです。(改行は実際には必要ありません。) | + | Please send command below. |
``` | ``` | ||
Line 173: | Line 172: | ||
``` | ``` | ||
- | ### >MH (モーションヘッダの設定) | + | ### >MH (Set a Motion Header) |
- | |タグ | + | |Args |Roles |Min (dec)|Max (dec)|Format |
- | |: | + | |: |
- | |SLOT |書き込みスロットの指定|0 |89 | + | |SLOT |Set to write slot. |
- | |NAME |モーション名の指定 | + | |NAME |Set a motion name. |
- | |FUNC |関数の指定 | + | |FUNC |Set a function. |
- | |ARG0 |制御機能に渡す引数0 | + | |ARG0 |Set a function' |
- | |ARG1 |制御機能に渡す引数1 | + | |ARG1 |Set a function' |
- | |FRAME_LENGTH|フレーム総数の指定 | + | |FRAME_LENGTH|Set a frame length |
- | 細かい仕様については、"> | + | Please get more detail at "> |
- | ### >MF (モーションフレームの設定) | + | ### >MF (Set a Motion Frame) |
- | |タグ | + | |Args |Roles |
- | |: | + | |: |
- | |SLOT |書き込みスロットの指定 | + | |SLOT |Set to write slot. |0 |89 |
- | |FRAME_ID | + | |FRAME_ID |
- | |TRANSITION_TIME_MS|遷移時間の指定 | + | |TRANSITION_TIME_MS|Set a transition time (msec).|32 |
- | |VALUE[DEVICE_ID] | + | |VALUE[DEVICE_ID] |
- | 細かい仕様については、"> | + | Please get more detail at "> |
- | ### >JS (関節設定の初期化) | + | ### >JS (Reset the Joint Settings) |
*example*: | *example*: | ||
- | 関節設定を初期化したい場合に、送信するコマンドラインは以下の通りです。 | + | If you want to reset the joint settings, send command below. |
``` | ``` | ||
Line 206: | Line 205: | ||
``` | ``` | ||
- | ### >HO (初期値の設定) | + | ### >HO (Set a Home Value) |
- | |タグ | + | |Args |Roles |Min (dec)|Max (dec)|Format |
- | |: | + | |: |
- | |DEVICE_ID|デバイス番号の指定|0 |23 | + | |DEVICE_ID|Set a device id. |
- | |VALUE | + | |VALUE |
- | *example* | + | *example*: |
- | デバイス**0**の初期値を**100**に設定したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to apply **100** as home value to device |
``` | ``` | ||
Line 220: | Line 219: | ||
``` | ``` | ||
- | ### >MA (最大値の設定) | + | ### >MA (Set a Max Value) |
- | |タグ | + | |Args |Roles |
- | |: | + | |: |
- | |DEVICE_ID|デバイス番号の指定|0 |23 | + | |DEVICE_ID|Set a device id. |0 |23 |
- | |VALUE | + | |VALUE |
- | *example* | + | *example*: |
- | デバイス**0**の最大値を**100**に設定したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to apply **100** as max value to device |
``` | ``` | ||
Line 234: | Line 233: | ||
``` | ``` | ||
- | ### >MI (最小値の設定) | + | ### >MI (Set a Min Value) |
- | |タグ | + | |Args |Roles |
- | |: | + | |: |
- | |DEVICE_ID|デバイス番号の指定|0 |23 | + | |DEVICE_ID|Set a device id. |0 |23 |
- | |VALUE | + | |VALUE |
- | *example* | + | *example*: |
- | デバイス**10**の最小値を**-1**に設定したい場合、送信するコマンドラインは以下の通りです。 | + | If you want to apply **-1** as min value to device |
``` | ``` | ||
Line 248: | Line 247: | ||
``` | ``` | ||
- | ## Getter関連のコマンド | + | ## Group of Getter |
- | ### <JS (関節設定のダンプ) | + | ### <JS (Dump the Joint Settings) |
*example*: | *example*: | ||
- | 関節設定をダンプしたい場合、送信するコマンドラインは以下の通りです。 | + | If you want to dump the joint settings, send command below. |
``` | ``` | ||
Line 258: | Line 257: | ||
``` | ``` | ||
- | その際、以下のような書式のJSONが出力されます。 | + | At that time, outputting result like json below. |
``` | ``` | ||
- | { | + | [ |
- | " | + | { |
- | { | + | "max": < |
- | "joint": < | + | "min": < |
- | "MAX": < | + | "home": < |
- | "MIN": < | + | }, |
- | " | + | ... |
- | }, | + | ] |
- | ... | + | |
- | ] | + | |
- | } | + | |
``` | ``` | ||
- | ### <MO (モーションのダンプ) | + | ### <MO (Dump a Motion) |
- | |タグ|役割 | + | |Args|Roles |
- | |:---|:-------------------|: | + | |: |
- | |SLOT|読出しスロットの指定|0 |89 | + | |SLOT|Set to read slot.|0 |89 |
- | *example* | + | *example*: |
- | スロット**0**のモーションをダンプしたい場合、送信するコマンドラインは以下の通りです。 | + | If you want to dump slot **0**, send command below. |
``` | ``` | ||
Line 287: | Line 283: | ||
``` | ``` | ||
- | その際、motion.jsonと同様な形式のJSONが出力されます。 | + | At that time, outputting result like "motion.json". ([See also...](https:// |
- | ただし、" | + | However, property |
- | device_map.jsonで定義されているようなIDの**ineteger**です。 | + | |
- | ### <VI (バージョン情報のダンプ) | + | ### <VI (Dump the Version Information) |
*example*: | *example*: | ||
- | バージョン情報をダンプしたい場合、送信するコマンドラインは以下の通りです。 | + | If you want to dump the version information, |
``` | ``` | ||
Line 300: | Line 295: | ||
``` | ``` | ||
- | その際、以下のような書式のJSONが出力されます。 | + | At that time, outputting result like json below. |
``` | ``` |