Gazebo Common

API Reference

6.0.1

A pose animation. More...

#include <Animation.hh>

Public Member Functions

 PoseAnimation (const std::string &_name, const double _length, const bool _loop, double _tension=0.0)
 Constructor.
 
PoseKeyFrameCreateKeyFrame (const double _time)
 Create a pose keyframe at the given time.
 
void InterpolatedKeyFrame (PoseKeyFrame &_kf)
 Get a keyframe using the animation's current time.
 
- Public Member Functions inherited from Animation
 Animation (const std::string &_name, const double _length, const bool _loop)
 Constructor.
 
void AddTime (const double _time)
 Add time to the animation.
 
bool InterpolateX () const
 Return the interpolateX value.
 
common::KeyFrameKeyFrame (const unsigned int _index) const
 Get a key frame using an index value.
 
unsigned int KeyFrameCount () const
 Return the number of key frames in the animation.
 
double Length () const
 Return the duration of the animation.
 
void Length (const double _len)
 Set the duration of the animation.
 
void SetInterpolateX (const bool _interpolateX)
 Set the interpolateX value.
 
double Time () const
 Return the current time position.
 
void Time (const double _time)
 Set the current time position of the animation.
 

Protected Member Functions

void BuildInterpolationSplines ()
 Update the pose splines.
 
void InterpolatedKeyFrame (const double _time, PoseKeyFrame &_kf)
 Get a keyframe using a passed in time.
 
- Protected Member Functions inherited from Animation
template<typename KeyFrameType >
KeyFrameType * CreateKeyFrame (const double _time)
 Create a keyframe at the given time.
 
double KeyFramesAtTime (double _time, common::KeyFrame **_kf1, common::KeyFrame **_kf2, unsigned int &_firstKeyIndex) const
 Get the two key frames that bound a time value.
 

Detailed Description

A pose animation.

Constructor & Destructor Documentation

◆ PoseAnimation()

PoseAnimation ( const std::string _name,
const double  _length,
const bool  _loop,
double  _tension = 0.0 
)

Constructor.

Parameters
[in]_nameString name of the animation. This should be unique.
[in]_lengthLength of the animation in seconds
[in]_loopTrue == loop the animation
[in]_tensionThe tension of the trajectory spline. The default value of zero equates to a Catmull-Rom spline, which may 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.

Member Function Documentation

◆ BuildInterpolationSplines()

void BuildInterpolationSplines ( )
protected

Update the pose splines.

◆ CreateKeyFrame()

PoseKeyFrame * CreateKeyFrame ( const double  _time)

Create a pose keyframe at the given time.

Parameters
[in]_timeTime at which to create the keyframe
Returns
Pointer to the new keyframe

◆ InterpolatedKeyFrame() [1/2]

void InterpolatedKeyFrame ( const double  _time,
PoseKeyFrame _kf 
)
protected

Get a keyframe using a passed in time.

Parameters
[in]_timeTime in seconds
[out]_kfPoseKeyFrame reference to hold the interpolated result

◆ InterpolatedKeyFrame() [2/2]

void InterpolatedKeyFrame ( PoseKeyFrame _kf)

Get a keyframe using the animation's current time.

Parameters
[out]_kfPoseKeyFrame reference to hold the interpolated result

The documentation for this class was generated from the following file: