Gazebo Common

API Reference

3.17.0
TrajectoryInfo Class Reference

Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information. More...

#include <Animation.hh>

Public Member Functions

 TrajectoryInfo ()
 Constructor. More...
 
 TrajectoryInfo (const TrajectoryInfo &_trajInfo)
 Copy constructor. More...
 
 TrajectoryInfo (TrajectoryInfo &&_trajInfo) noexcept
 Move constructor. More...
 
 ~TrajectoryInfo ()
 Destructor. More...
 
unsigned int AnimIndex () const
 Return the animation index. More...
 
void CopyFrom (const TrajectoryInfo &_trajInfo)
 Copy TrajectoryInfo from a TrajectoryInfo instance. More...
 
double DistanceSoFar (const std::chrono::steady_clock::duration &_time) const
 Get the distance covered by the trajectory by a given time. More...
 
std::chrono::steady_clock::duration Duration () const
 Return the duration of the trajectory. More...
 
std::chrono::steady_clock::time_point EndTime () const
 Return the end time of the trajectory. More...
 
unsigned int Id () const
 Return the id of the trajectory. More...
 
TrajectoryInfooperator= (const TrajectoryInfo &_trajInfo)
 Assignment operator. More...
 
void SetAnimIndex (unsigned int _index)
 Set the animation index. More...
 
void SetEndTime (const std::chrono::steady_clock::time_point &_endTime)
 Set the end time of the trajectory. More...
 
void SetId (unsigned int _id)
 Set the id of the trajectory. More...
 
void SetStartTime (const std::chrono::steady_clock::time_point &_startTime)
 Set the start time of the trajectory. More...
 
void SetTranslated (bool _translated)
 Set whether the trajectory is translated. More...
 
void SetWaypoints (std::map< std::chrono::steady_clock::time_point, math::Pose3d > _waypoints)
 Load all waypoints in the trajectory. More...
 
std::chrono::steady_clock::time_point StartTime () const
 Return the start time of the trajectory. More...
 
bool Translated () const
 Return whether the trajectory is translated. More...
 
common::PoseAnimationWaypoints () const
 Return the waypoints in the trajectory. More...
 

Detailed Description

Information about a trajectory for an animation (e.g., Actor) This contains the keyframe information.

Constructor & Destructor Documentation

◆ TrajectoryInfo() [1/3]

Constructor.

◆ TrajectoryInfo() [2/3]

TrajectoryInfo ( const TrajectoryInfo _trajInfo)

Copy constructor.

Parameters
[in]_trajInfoTrajectoryInfo to copy.

◆ TrajectoryInfo() [3/3]

TrajectoryInfo ( TrajectoryInfo &&  _trajInfo)
noexcept

Move constructor.

Parameters
[in]_trajInfoTrajectoryInfo to move.

◆ ~TrajectoryInfo()

Destructor.

Member Function Documentation

◆ AnimIndex()

unsigned int AnimIndex ( ) const

Return the animation index.

Returns
Index of the associated animation

◆ CopyFrom()

void CopyFrom ( const TrajectoryInfo _trajInfo)

Copy TrajectoryInfo from a TrajectoryInfo instance.

Parameters
[in]_trajInfoThe TrajectoryInfo to set values from.

◆ DistanceSoFar()

double DistanceSoFar ( const std::chrono::steady_clock::duration &  _time) const

Get the distance covered by the trajectory by a given time.

Parameters
[in]_timeTime from trajectory start to check the distance.
Returns
Distance in meters covered by the trajectory.

◆ Duration()

std::chrono::steady_clock::duration Duration ( ) const

Return the duration of the trajectory.

Returns
Duration of the animation.

◆ EndTime()

std::chrono::steady_clock::time_point EndTime ( ) const

Return the end time of the trajectory.

Returns
End time of the trajectory in seconds

◆ Id()

unsigned int Id ( ) const

Return the id of the trajectory.

Returns
Id of the trajectory

◆ operator=()

TrajectoryInfo& operator= ( const TrajectoryInfo _trajInfo)

Assignment operator.

Parameters
[in]_trajInfoThe TrajectoryInfo to set values from.
Returns
*this

◆ SetAnimIndex()

void SetAnimIndex ( unsigned int  _index)

Set the animation index.

Parameters
[in]_indexAnimation index (auto-generated according to the type)

◆ SetEndTime()

void SetEndTime ( const std::chrono::steady_clock::time_point &  _endTime)

Set the end time of the trajectory.

Parameters
[in]_endTimeTrajectory end time.

◆ SetId()

void SetId ( unsigned int  _id)

Set the id of the trajectory.

Parameters
[in]_idId for the trajectory

◆ SetStartTime()

void SetStartTime ( const std::chrono::steady_clock::time_point &  _startTime)

Set the start time of the trajectory.

Parameters
[in]_startTimeTrajectory start time.

◆ SetTranslated()

void SetTranslated ( bool  _translated)

Set whether the trajectory is translated.

Parameters
[in]_translatedTrue if the trajectory is translated

◆ SetWaypoints()

void SetWaypoints ( std::map< std::chrono::steady_clock::time_point, math::Pose3d _waypoints)

Load all waypoints in the trajectory.

Parameters
[in]_waypointsMap of waypoints, where the key is the absolute time of the waypoint and the value is the pose.

◆ StartTime()

std::chrono::steady_clock::time_point StartTime ( ) const

Return the start time of the trajectory.

Returns
Start time of the trajectory.

◆ Translated()

bool Translated ( ) const

Return whether the trajectory is translated.

Returns
True if the trajectory is translated

◆ Waypoints()

common::PoseAnimation* Waypoints ( ) const

Return the waypoints in the trajectory.

Returns
Waypoints represented in pose animation format

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