Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::visualization::TrajectoryPlayer Class Reference

Enables the ability to play a trajectory provided by the set program. More...

#include <trajectory_player.h>

Public Member Functions

 TrajectoryPlayer (const TrajectoryPlayer &)=delete
TrajectoryPlayer & operator= (const TrajectoryPlayer &)=delete
 TrajectoryPlayer (TrajectoryPlayer &&)=default
TrajectoryPlayer & operator= (TrajectoryPlayer &&)=default
void setTrajectory (const tesseract::common::JointTrajectory &trajectory)
 Set the the trajectory for the trajectory player.
void setScale (double scale)
 Set the scale factor for the play back of the trajectory.
tesseract::common::JointState setCurrentDurationByIndex (long index)
 Set the current time for the player by index of the input trajectoy.
tesseract::common::JointState setCurrentDuration (double duration)
 Set the current time for the player by duration.
tesseract::common::JointState getNext ()
 Get the next move instruction from the player.
tesseract::common::JointState getByIndex (long index) const
 Get move instruction by index.
double currentDuration () const
 Get the current duration populated by the last call to getNext().
double trajectoryDurationBegin () const
 Get the trajectory duration at the begin state.
double trajectoryDurationEnd () const
 Get the trajectory duration at the end state.
bool isFinished () const
 Check if the player has the reached the end of the trajectory.
void enableLoop (bool loop)
 Enable looping playback of the trajectory.
bool isLoopEnabled () const
 Get if looping playback is enabled.
void reset ()
 Reset the state of the trajectory player.
long size () const
 The size of the tajectory.

Detailed Description

Enables the ability to play a trajectory provided by the set program.

Member Function Documentation

◆ setTrajectory()

void tesseract::visualization::TrajectoryPlayer::setTrajectory ( const tesseract::common::JointTrajectory & trajectory)

Set the the trajectory for the trajectory player.

Parameters
programThe trajectory to play

◆ setScale()

void tesseract::visualization::TrajectoryPlayer::setScale ( double scale)

Set the scale factor for the play back of the trajectory.

Parameters
scaleThe scale playback of the trajectory

◆ setCurrentDurationByIndex()

tesseract::common::JointState tesseract::visualization::TrajectoryPlayer::setCurrentDurationByIndex ( long index)

Set the current time for the player by index of the input trajectoy.

Parameters
indexThe input trajectory index for which to set the current time from
Returns
The trajectory state at the input trajectory index

◆ setCurrentDuration()

tesseract::common::JointState tesseract::visualization::TrajectoryPlayer::setCurrentDuration ( double duration)

Set the current time for the player by duration.

Parameters
durationThe duration for which to set the current time from
Returns
The trajectory state at the provided duration

◆ getNext()

tesseract::common::JointState tesseract::visualization::TrajectoryPlayer::getNext ( )

Get the next move instruction from the player.

Returns
The move instruction at the next time interval

◆ getByIndex()

tesseract::common::JointState tesseract::visualization::TrajectoryPlayer::getByIndex ( long index) const

Get move instruction by index.

Parameters
indexThe index of the input program to extract the move instruction from
Returns
The move instruction at the input index

◆ currentDuration()

double tesseract::visualization::TrajectoryPlayer::currentDuration ( ) const

Get the current duration populated by the last call to getNext().

Returns
The current duration

◆ trajectoryDurationBegin()

double tesseract::visualization::TrajectoryPlayer::trajectoryDurationBegin ( ) const

Get the trajectory duration at the begin state.

Returns
The trajectory duration

◆ trajectoryDurationEnd()

double tesseract::visualization::TrajectoryPlayer::trajectoryDurationEnd ( ) const

Get the trajectory duration at the end state.

Returns
The trajectory duration

◆ isFinished()

bool tesseract::visualization::TrajectoryPlayer::isFinished ( ) const

Check if the player has the reached the end of the trajectory.

Returns
True if end has been reached, otherwise false.

◆ enableLoop()

void tesseract::visualization::TrajectoryPlayer::enableLoop ( bool loop)

Enable looping playback of the trajectory.

Parameters
loopTrue to enable looping play, otherwise single playback.

◆ isLoopEnabled()

bool tesseract::visualization::TrajectoryPlayer::isLoopEnabled ( ) const

Get if looping playback is enabled.

Returns
True if looping playback is enabled otherwise false.