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

Update tension for common5 #260

Merged
merged 1 commit into from
Oct 15, 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
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