Actor's animation stops working when trajectory is added

asked 2020-12-14 15:29:34 -0500

I am following the official tutorial Make an animated model (actor). I can successfully load a model and override its animation with the <animation> tag, like in the following code:

<?xml version="1.0" ?>
<sdf version="1.6">
  <world name="default">
    <include>
      <uri>model://sun</uri>
    </include>
    <actor name="actor">
      <skin>
        <filename>sitting.dae</filename>
      </skin>
      <animation name="animation">
        <filename>walk.dae</filename>
      </animation>
    </actor>
  </world>
</sdf>

However after adding a trajectory, all animations stop and the model ends doing a T pose (standing with open arms) without any animation. If I remove the <animation> tag, the animation is loaded properly and the model follows the trajectory. The provided sample code has the same behavior:

<sdf version="1.6">
<world name="default">
    <include>
    <uri>model://sun</uri>
    </include>
    <actor name="actor">
    <skin>
        <filename>walk.dae</filename>
    </skin>
    <animation name="animation">
        <filename>walk.dae</filename>
    </animation>
    <script>
        <trajectory id="0" type="walking">
        <waypoint>
            <time>0</time>
            <pose>0 2 0 0 0 -1.57</pose>
        </waypoint>
        <waypoint>
            <time>2</time>
            <pose>0 -2 0 0 0 -1.57</pose>
        </waypoint>
        <waypoint>
            <time>2.5</time>
            <pose>0 -2 0 0 0 1.57</pose>
        </waypoint>
        <waypoint>
            <time>7</time>
            <pose>0 2 0 0 0 1.57</pose>
        </waypoint>
        <waypoint>
            <time>7.5</time>
            <pose>0 2 0 0 0 -1.57</pose>
        </waypoint>
        </trajectory>
    </script>
    </actor>
</world>
</sdf>

I am using Ubuntu 16.04 and I tried Gazebo versions 8, 9 (both from PPA) and 10 (compiling from source). The error happen to all three versions. Any ideas?

edit retag flag offensive close merge delete