Trajectory animation for non-skeletal actors
Gazebo classic 11 supported actor class with trajectory with simpler object such as box, but now this function is not available in ignition gazebo. Relevant questions can also be found here; https://answers.gazebosim.org/questio... https://github.com/ignitionrobotics/i...
To elaborate this, the actor class works with human mesh provided from gazebo;
<actor name="actor_talking">
<skin>
<filename>models://actor/meshes/talk_b.dae</filename>
<scale>1.0</scale>
</skin>
<animation name="talk_b">
<filename>models://actor/meshes/talk_b.dae</filename>
<scale>0.055</scale>
<interpolate_x>true</interpolate_x>
</animation>
<script>
<loop>true</loop>
<auto_start>true</auto_start>
<trajectory id="0" type="talk_b">
<waypoint>
<time>0</time>
<pose>2 -2 1.0 0 0 0</pose>
</waypoint>
<waypoint>
<time>30</time>
<pose>2 -2 1.0 0 0 0</pose>
</waypoint>
</trajectory>
</script>
</actor>
However, if I just replace this mesh file with a simple box object, I ended up with some error message below;
<actor name="actor_talking">
<skin>
<filename>models://actor/meshes/shapes.dae</filename>
<scale>1.0</scale>
</skin>
<animation name="talk_b">
<filename>models://actor/meshes/shapes.dae</filename>
<scale>0.055</scale>
<interpolate_x>true</interpolate_x>
</animation>
<script>
<loop>true</loop>
<auto_start>true</auto_start>
<trajectory id="0" type="talk_b">
<waypoint>
<time>0</time>
<pose>2 -2 1.0 0 0 0</pose>
</waypoint>
<waypoint>
<time>30</time>
<pose>2 -2 1.0 0 0 0</pose>
</waypoint>
</trajectory>
</script>
</actor>
[GUI] [Err] [SceneManager.cc:944] Mesh skeleton in [models://actor/meshes/shapes.dae] not found.
I think this happens because the actor class requires a mesh skeleton in <skin> </skin>, which was not the case for gazebo classic.
I am attaching the working example code in gazebo classic for your reference. This only works in gazebo classic now. (relevant link)
<?xml version="1.0" ?>
<sdf version="1.6">
<world name="default">
<include>
<uri>model://ground_plane</uri>
</include>
<include>
<uri>model://sun</uri>
</include>
<actor name="animated_box">
<link name="box_link">
<visual name="visual">
<geometry>
<box>
<size>.2 .2 .2</size>
</box>
</geometry>
</visual>
</link>
<script>
<loop>true</loop>
<auto_start>true</auto_start>
<trajectory id="0" type="square">
<waypoint>
<time>0.0</time>
<pose>-1 -1 1 0 0 0</pose>
</waypoint>
<waypoint>
<time>1.0</time>
<pose>-1 1 1 0 0 0</pose>
</waypoint> <waypoint>
<time>2.0</time>
<pose>1 1 1 0 0 0</pose>
</waypoint>
<waypoint>
<time>3.0</time>
<pose>1 -1 1 0 0 0</pose>
</waypoint>
<waypoint>
<time>4.0</time>
<pose>-1 -1 1 0 0 0</pose>
</waypoint>
</trajectory>
</script>
</actor>
</world>
</sdf>
I am now working my simulation by artificially creating the animation mesh from blender, but this limits some features which are available from gazebo classic. e.g. Actor collision, 3d plot using dynamic marker (since we do not have a link object for actors)
Is there any workaround for this?