人間のあるべき姿の探索

思索・人形・エンジニアリング

MacBook AirのOSアップデートでQiSDKのAnimation Editorが起動できなくなった

発生した問題

タイトルの通りです.OSをBig Surに引き上げたと同時にQiSDKのAnimation Editor(Pepperのモーションをグラフィカルに作成できるソフト,Android Studioから起動できる*1)が起動できなくなりました.

OS:macOS Big Sur バージョン11.3(20E232) 

根本的な解決方法

調べても情報がないようで,2021/06/07時点ではMacOSのバージョンを落とす必要がありそうです.しかし,OSのバージョンを落とすのは結構手間がかかる上に今後サポートされるのを待ってもQiSDKが対応してくれるか分からないので難しいですね…

代替案1:WindowsAndroid Studioを入れる

現状Windows 10では動作しているみたいなので,PCが余っていれば使っても良いかと.ただ,開発用PCをMacで統一した場合に持ち運びなどの問題が生じます.特にロボット開発でPCを一台余分に持ち歩くのは非常にしんどいです.

代替案2: Animation Editorを使用せずにAnimationを作成する

僕はこれでひとまず対応しました.QiSDKでAnimationを作成すると,

[Project Folder]/app/src/main/res/raw/[AnimationName].qianim

にアニメーションファイルが作成されます.ここで.qianim拡張子のファイルの中身がxml形式で書かれているので,エディタから直に変更することで動作を作成できます. 例えば,右を向く動作は以下のように書くと作成できます.

<?xml version="1.0" encoding="utf-8"?>
<Animation xmlns:editor="http://www.aldebaran.com/animation/editor" typeVersion="2.0" editor:fps="25">
  <editor:clip editor:fps="25" editor:startFrame="0" editor:endFrame="31"/>
    <ActuatorCurve fps="25" actuator="HeadYaw" mute="false" unit="degree">
        <Key value="-60.0" frame="30">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
    </ActuatorCurve>
</Animation>

手順は2つ,まずこれを書きます,

<?xml version="1.0" encoding="utf-8"?>
<Animation xmlns:editor="http://www.aldebaran.com/animation/editor" typeVersion="2.0" editor:fps="25">
  <editor:clip editor:fps="25" editor:startFrame="0" editor:endFrame="31"/>
</Animation>

一応ファイル作成時に雛形が自動で生成されますが,これに書き換えてあげた方が良いです.endFrameとfpsを書き換えてあげることで動作の長さを決定できます. 次に実際の動作を書きます.

<ActuatorCurve fps="25" actuator="HeadYaw" mute="false" unit="degree">
    </ActuatorCurve>

<ActuatorCurve>で動かす軸を指定します.actuatorの名称は公式サイトかALMotion 関節の動きメモを参照してください. 次に実際のパラメータを内部に記載します.

        <Key value="-60.0" frame="30">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>

値の範囲について,ALMotionでは-1.0~1.0に変換されるみたいですが,どうやらAnimation EditorではDegreesで記載すれば良いようです.Key value="-60.0"なので,首が右に60度旋回します.

複数の動きを順番に繋げる場合,以下のようにタグを複数記載します.

    <ActuatorCurve fps="25" actuator="HeadYaw" mute="false" unit="degree">
        <Key value="-60.0" frame="30">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
        <Key value="0.0" frame="60">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
    </ActuatorCurve>

これで一度右を向いた後に正面を向きます(endFrame="61"に修正してください).

注意点として,複数の軸を動かす場合はFrameごとに書くのではなく,軸ごとに書くことになります.例えば,右下を向いて正面を向く場合以下のようになります.

<!-- 軸1 -->
    <ActuatorCurve fps="25" actuator="HeadYaw" mute="false" unit="degree">
<!-- 軸1:frame1 -->
        <Key value="-60.0" frame="30">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
<!-- 軸1:frame1 -->
        <Key value="0.0" frame="60">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
    </ActuatorCurve>
<!-- 軸2 -->
    <ActuatorCurve fps="25" actuator="HeadPitch" mute="false" unit="degree">
<!-- 軸2:frame1 -->
        <Key value="30.0" frame="30">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
<!-- 軸2:frame2 -->
        <Key value="0.0" frame="60">
            <Tangent side="left" abscissaParam="-3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
            <Tangent side="right" abscissaParam="3.33333333" ordinateParam="0" editor:interpType="bezier_auto"/>
        </Key>
    </ActuatorCurve>

以上です.

 

*1: Animation Editor — QiSDK