Enables the ability to play a trajectory provided by the set program.
More...
#include <trajectory_player.h>
Enables the ability to play a trajectory provided by the set program.
◆ TrajectoryPlayer()
tesseract_visualization::TrajectoryPlayer::TrajectoryPlayer |
( |
| ) |
|
|
default |
◆ currentDuration()
double tesseract_visualization::TrajectoryPlayer::currentDuration |
( |
| ) |
const |
Get the current duration populated by the last call to getNext()
- Returns
- The current duration
◆ enableLoop()
void tesseract_visualization::TrajectoryPlayer::enableLoop |
( |
bool |
loop | ) |
|
Enable looping playback of the trajectory.
- Parameters
-
loop | True to enable looping play, otherwise single playback. |
◆ getByIndex()
Get move instruction by index.
- Parameters
-
index | The index of the input program to extract the move instruction from |
- Returns
- The move instruction at the input index
◆ getNext()
Get the next move instruction from the player.
- Returns
- The move instruction at the next time interval
◆ 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.
◆ isLoopEnabled()
bool tesseract_visualization::TrajectoryPlayer::isLoopEnabled |
( |
| ) |
const |
Get if looping playback is enabled.
- Returns
- True if looping playback is enabled otherwise false.
◆ reset()
void tesseract_visualization::TrajectoryPlayer::reset |
( |
| ) |
|
Reset the state of the trajectory player.
◆ setCurrentDuration()
Set the current time for the player by duration.
- Parameters
-
duration | The duration for which to set the current time from |
- Returns
- The trajectory state at the provided duration
◆ setCurrentDurationByIndex()
Set the current time for the player by index of the input trajectoy.
- Parameters
-
index | The input trajectory index for which to set the current time from |
- Returns
- The trajectory state at the input trajectory index
◆ setScale()
void tesseract_visualization::TrajectoryPlayer::setScale |
( |
double |
scale | ) |
|
Set the scale factor for the play back of the trajectory.
- Parameters
-
scale | The scale playback of the trajectory |
◆ setTrajectory()
Set the the trajectory for the trajectory player.
- Parameters
-
program | The trajectory to play |
◆ size()
long tesseract_visualization::TrajectoryPlayer::size |
( |
| ) |
const |
The size of the tajectory.
◆ trajectoryDuration()
double tesseract_visualization::TrajectoryPlayer::trajectoryDuration |
( |
| ) |
const |
Get the trajectory duration.
- Returns
- The trajectory duration
◆ current_duration_
double tesseract_visualization::TrajectoryPlayer::current_duration_ { 0 } |
|
private |
◆ finished_
bool tesseract_visualization::TrajectoryPlayer::finished_ { false } |
|
private |
◆ loop_
bool tesseract_visualization::TrajectoryPlayer::loop_ { false } |
|
private |
◆ scale_
double tesseract_visualization::TrajectoryPlayer::scale_ { 1 } |
|
private |
◆ start_time_
std::chrono::time_point<std::chrono::high_resolution_clock> tesseract_visualization::TrajectoryPlayer::start_time_ |
|
private |
◆ trajectory_
◆ trajectory_duration_
double tesseract_visualization::TrajectoryPlayer::trajectory_duration_ { 0 } |
|
private |
The documentation for this class was generated from the following files: