Skip to content

Commit

Permalink
Update tension for common5 (#260)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <nate@openrobotics.org>
  • Loading branch information
nkoenig authored Oct 15, 2021
1 parent c5da532 commit 92abc29
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 33 deletions.
20 changes: 2 additions & 18 deletions graphics/include/ignition/common/Animation.hh
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,6 @@ namespace ignition
/// \brief A pose animation.
class IGNITION_COMMON_GRAPHICS_VISIBLE PoseAnimation : public Animation
{
/// \brief Constructor
/// \param[in] _name String name of the animation. This should be unique.
/// \param[in] _length Length of the animation in seconds
/// \param[in] _loop True == loop the animation
public: PoseAnimation(const std::string &_name,
const double _length, const bool _loop);

/// \brief Constructor
/// \param[in] _name String name of the animation. This should be unique.
/// \param[in] _length Length of the animation in seconds
Expand All @@ -126,11 +119,9 @@ namespace ignition
/// also cause the animation to overshoot keyframes. A value of one will
/// cause the animation to stick to the keyframes. This value should
/// be in the range 0..1.
/// \todo(nkoenig) Remove this in ign-common5, and use a single
/// consutrctory with a default _tension of 0.
public: PoseAnimation(const std::string &_name,
const double _length, const bool _loop,
double _tension);
double _tension = 0.0);

/// \brief Create a pose keyframe at the given time
/// \param[in] _time Time at which to create the keyframe
Expand Down Expand Up @@ -242,13 +233,6 @@ namespace ignition
/// \return Waypoints represented in pose animation format
public: common::PoseAnimation *Waypoints() const;

/// \brief Load all waypoints in the trajectory
/// \param[in] _waypoints Map of waypoints, where the key is the absolute
/// time of the waypoint and the value is the pose.
public: void SetWaypoints(
std::map<std::chrono::steady_clock::time_point, math::Pose3d>
_waypoints);

/// \brief Load all waypoints in the trajectory
/// \param[in] _waypoints Map of waypoints, where the key is the absolute
/// time of the waypoint and the value is the pose.
Expand All @@ -259,7 +243,7 @@ namespace ignition
/// be in the range 0..1.
public: void SetWaypoints(
std::map<std::chrono::steady_clock::time_point, math::Pose3d>
_waypoints, double _tension);
_waypoints, double _tension = 0.0);

/// \brief Private data pointer.
IGN_UTILS_IMPL_PTR(dataPtr)
Expand Down
15 changes: 0 additions & 15 deletions graphics/src/Animation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ double Animation::KeyFramesAtTime(double _time, common::KeyFrame **_kf1,
return (_time - t1) / (t2 - t1);
}

/////////////////////////////////////////////////
PoseAnimation::PoseAnimation(const std::string &_name, const double _length,
const bool _loop)
: Animation(_name, _length, _loop),
dataPtr(ignition::utils::MakeImpl<Implementation>())
{
}

/////////////////////////////////////////////////
PoseAnimation::PoseAnimation(const std::string &_name, const double _length,
const bool _loop, double _tension)
Expand Down Expand Up @@ -520,13 +512,6 @@ common::PoseAnimation *TrajectoryInfo::Waypoints() const
return this->dataPtr->waypoints.get();
}

/////////////////////////////////////////////////
void TrajectoryInfo::SetWaypoints(
std::map<std::chrono::steady_clock::time_point, math::Pose3d> _waypoints)
{
this->SetWaypoints(_waypoints, 0.0);
}

/////////////////////////////////////////////////
void TrajectoryInfo::SetWaypoints(
std::map<std::chrono::steady_clock::time_point, math::Pose3d> _waypoints,
Expand Down

0 comments on commit 92abc29

Please sign in to comment.