ALMotion 関節の動きメモ


## はじめに

* 頭だと [ヨーイング](http://ja.wikipedia.org/wiki/ヨーイング) の考え方は分かりやすいのだけど、肩・肘だとパッと想像ができないので、確認がてらのメモです。
* 腕は左手のみ確認してます。


## 確認方法

Python から Choregraphe のバーチャルロボットに接続して、関節を動かしてみます。

```bash
$ /usr/bin/python
Python 2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

>>> from naoqi import ALProxy

>>> m = ALProxy("ALMotion", "localhost", 50445)
[I] 3343 qi.eventloop: Creating event loop while no qi::Application() is running
[I] 3343 qimessaging.session: Session listener created on tcp://0.0.0.0:0
[I] 3343 qimessaging.transportserver: TransportServer will listen on: tcp://172.20.10.4:50452
[I] 3343 qimessaging.transportserver: TransportServer will listen on: tcp://172.20.10.3:50452
[I] 3343 qimessaging.transportserver: TransportServer will listen on: tcp://127.0.0.1:50452
```

この状態から確認したい関節のコマンドを入力します。

## 確認

### 頭

```
>>> m.setAngles(["HeadYaw", "HeadPitch"], [0.0, 0.0], 0.1)
```

#### HeadYaw

| ![HeadYaw-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/efa38897-ea3f-df26-25f3-14f7da3482f9.png "HeadYaw-1.png") | ![Head.png](https://qiita-image-store.s3.amazonaws.com/0/20418/6411af3d-db08-452b-73fb-6a6043430f70.png "Head.png") | ![HeadYaw+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/3f457abe-7344-e032-aca7-49f7f2c9b373.png "HeadYaw+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |

#### HeadPitch

| ![HeadPitch-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/b01f506f-d371-7dfc-5ec1-326899d57691.png "HeadPitch-1.png") | ![Head.png](https://qiita-image-store.s3.amazonaws.com/0/20418/6411af3d-db08-452b-73fb-6a6043430f70.png "Head.png") | ![HeadPitch+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/67265ea3-4577-148c-3672-b0a89100f8c3.png "HeadPitch+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |


### 肩

```
>>> m.setAngles(["LShoulderPitch", "LShoulderRoll"], [0.0, 0.0], 0.1)
```

#### LShoulderPitch

| ![LShoulderPitch-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/9f5bcadf-69f6-b186-cb9a-4e6de22e528d.png "LShoulderPitch-1.png") | ![LShoulderPitch.png](https://qiita-image-store.s3.amazonaws.com/0/20418/3b5e8e01-b8b0-fe4a-a81d-38c09d7528d5.png "LShoulderPitch.png") | ![LShoulderPitch+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/1c7d6c26-0ebe-b8c0-f901-539c1ce202a7.png "LShoulderPitch+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |

#### LShoulderRoll

| ![LShoulderRoll-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/36fea3b2-6ad4-6aee-25f9-fe6e87c83178.png "LShoulderRoll-1.png") | ![LShoulderPitch.png](https://qiita-image-store.s3.amazonaws.com/0/20418/3b5e8e01-b8b0-fe4a-a81d-38c09d7528d5.png "LShoulderPitch.png") | ![LShoulderRoll+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/1c159354-01b1-d2c7-f339-e42572470efc.png "LShoulderRoll+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |


### 肘

```
>>> m.setAngles(["LElbowYaw", "LElbowRoll"], [0.0, 0.0], 0.1)
```

#### LElbowYaw

| ![LElbowYaw-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/4cb3eb06-bdc5-99b6-1145-755580786f25.png "LElbowYaw-1.png") | ![LElbow.png](https://qiita-image-store.s3.amazonaws.com/0/20418/b6e39a5c-8b76-84ed-ff64-d8932a1ec845.png "LElbow.png") | ![LElbowYaw+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/952f6b60-9dc8-1e27-f6db-68c671e7cd2f.png "LElbowYaw+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |

#### LElbowRoll

| ![LElbowRoll-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/6436c6b6-9d68-6f0b-adb1-cf924d656452.png "LElbowRoll-1.png") | ![LElbow.png](https://qiita-image-store.s3.amazonaws.com/0/20418/b6e39a5c-8b76-84ed-ff64-d8932a1ec845.png "LElbow.png") | ![LElbowRoll+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/12b9997c-322d-978b-d144-7851c50e0dd5.png "LElbowRoll+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |


### 手首

```
>>> m.setAngles("LWristYaw", 0.0, 0.1)
```

#### LWristYaw

| ![LWristYaw-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/32b03ef3-4fd3-31bd-a8fe-97338767654d.png "LWristYaw-1.png") | ![LWrist.png](https://qiita-image-store.s3.amazonaws.com/0/20418/e4497f1e-685f-93f8-9cac-727aed702fe3.png "LWrist.png") | ![LWristYaw+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/865ff804-0d9c-58a9-d77f-7efb1afa9b4c.png "LWristYaw+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |


### 腰

```
>>> m.setAngles(["HipPitch", "HipRoll"], [0.0, 0.0], 0.1)
```

#### HipPitch

| ![HipPitch-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/5d414ac3-6209-f395-d498-09633f731cab.png "HipPitch-1.png") | ![Hip.png](https://qiita-image-store.s3.amazonaws.com/0/20418/c2ba9b4a-935c-1414-d22b-538cf0f9babe.png "Hip.png") | ![HipPitch+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/4d079520-5129-6036-731b-96e440585fae.png "HipPitch+1.png") |
|:----:|:---:|:---:|
| ![HipPitch-1_left.png](https://qiita-image-store.s3.amazonaws.com/0/20418/0270a727-e82e-5a30-8947-d35f8ac66fbb.png "HipPitch-1_left.png") | | |
| -1.0 | 0.0 | 1.0 |

#### HipRoll

| ![HipRoll-1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/cf0603af-2eb2-dec0-2d00-70ebcf172295.png "HipRoll-1.png") | ![Hip.png](https://qiita-image-store.s3.amazonaws.com/0/20418/c2ba9b4a-935c-1414-d22b-538cf0f9babe.png "Hip.png") | ![HipRoll+1.png](https://qiita-image-store.s3.amazonaws.com/0/20418/71fa4802-c0d1-5a01-b6aa-46b686df65f3.png "HipRoll+1.png") |
|:----:|:---:|:---:|
| -1.0 | 0.0 | 1.0 |


## 感想

* やっぱり手はわかりにくな。