Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the actor tension parameter #1091

Merged
merged 3 commits into from
Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ set(IGN_MSGS_VER ${ignition-msgs8_VERSION_MAJOR})
#--------------------------------------
# Find ignition-common
# Always use the profiler component to get the headers, regardless of status.
ign_find_package(ignition-common4 VERSION 4.2
ign_find_package(ignition-common4 VERSION 4.4
COMPONENTS
profiler
events
Expand Down
54 changes: 54 additions & 0 deletions examples/worlds/actor.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,59 @@
</link>
</model>

<actor name="actor_walking">
<skin>
<filename>https://fuel.ignitionrobotics.org/1.0/Mingfei/models/actor/tip/files/meshes/walk.dae</filename>
<scale>1.0</scale>
</skin>
<animation name="walk">
<filename>https://fuel.ignitionrobotics.org/1.0/Mingfei/models/actor/tip/files/meshes/walk.dae</filename>
<interpolate_x>true</interpolate_x>
</animation>
<script>
<loop>true</loop>
<delay_start>0.000000</delay_start>
<auto_start>true</auto_start>
<trajectory id="0" type="walk" tension="0.6">
<waypoint>
<time>0</time>
<pose>3 4 1.0 0 0 0</pose>
</waypoint>
<waypoint>
<time>2</time>
<pose>5 4 1.0 0 0 0</pose>
</waypoint>
<waypoint>
<time>2.5</time>
<pose>5 4 1.0 0 0 1.57</pose>
</waypoint>
<waypoint>
<time>4</time>
<pose>5 6 1.0 0 0 1.57</pose>
</waypoint>
<waypoint>
<time>4.5</time>
<pose>5 6 1.0 0 0 3.142</pose>
</waypoint>
<waypoint>
<time>6</time>
<pose>3 6 1 0 0 3.142</pose>
</waypoint>
<waypoint>
<time>6.5</time>
<pose>3 6 1 0 0 -1.57</pose>
</waypoint>
<waypoint>
<time>8</time>
<pose>3 4 1.0 0 0 -1.57</pose>
</waypoint>
<waypoint>
<time>8.5</time>
<pose>3 4 1.0 0 0 0</pose>
</waypoint>
</trajectory>
</script>
</actor>

</world>
</sdf>
2 changes: 1 addition & 1 deletion src/rendering/SceneManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -894,7 +894,7 @@ rendering::VisualPtr SceneManager::CreateActor(Entity _id,
static_cast<int>(point->Time()*1000)));
waypoints[pointTp] = point->Pose();
}
trajInfo.SetWaypoints(waypoints);
trajInfo.SetWaypoints(waypoints, trajSdf->Tension());
// Animations are offset by 1 because index 0 is taken by the mesh name
auto animation = _actor.AnimationByIndex(trajInfo.AnimIndex()-1);

Expand Down