26#ifndef TESSERACT_VISUALIZATION_TRAJECTORY_PLAYER_H
27#define TESSERACT_VISUALIZATION_TRAJECTORY_PLAYER_H
127 std::chrono::time_point<std::chrono::high_resolution_clock>
start_time_;
Definition: joint_state.h:39
Represents a joint trajectory.
Definition: joint_state.h:78
std::unique_ptr< TrajectoryInterpolator > UPtr
Definition: trajectory_interpolator.h:45
Enables the ability to play a trajectory provided by the set program.
Definition: trajectory_player.h:40
void setTrajectory(const tesseract_common::JointTrajectory &trajectory)
Set the the trajectory for the trajectory player.
Definition: trajectory_player.cpp:36
void reset()
Reset the state of the trajectory player.
Definition: trajectory_player.cpp:137
long size() const
The size of the tajectory.
Definition: trajectory_player.cpp:149
void setScale(double scale)
Set the scale factor for the play back of the trajectory.
Definition: trajectory_player.cpp:48
tesseract_common::JointState getNext()
Get the next move instruction from the player.
Definition: trajectory_player.cpp:95
double currentDuration() const
Get the current duration populated by the last call to getNext()
Definition: trajectory_player.cpp:127
double current_duration_
Definition: trajectory_player.h:122
tesseract_common::JointState setCurrentDurationByIndex(long index)
Set the current time for the player by index of the input trajectoy.
Definition: trajectory_player.cpp:50
tesseract_common::JointState setCurrentDuration(double duration)
Set the current time for the player by duration.
Definition: trajectory_player.cpp:71
tesseract_common::JointState getByIndex(long index) const
Get move instruction by index.
Definition: trajectory_player.cpp:122
TrajectoryInterpolator::UPtr trajectory_
Definition: trajectory_player.h:120
bool isFinished() const
Check if the player has the reached the end of the trajectory.
Definition: trajectory_player.cpp:131
double scale_
Definition: trajectory_player.h:123
std::chrono::time_point< std::chrono::high_resolution_clock > start_time_
Definition: trajectory_player.h:127
double trajectoryDuration() const
Get the trajectory duration.
Definition: trajectory_player.cpp:129
void enableLoop(bool loop)
Enable looping playback of the trajectory.
Definition: trajectory_player.cpp:133
bool loop_
Definition: trajectory_player.h:124
bool finished_
Definition: trajectory_player.h:125
TrajectoryPlayer()=default
double trajectory_duration_
Definition: trajectory_player.h:121
bool isLoopEnabled() const
Get if looping playback is enabled.
Definition: trajectory_player.cpp:135
double scale
Definition: collision_margin_data_unit.cpp:133
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: conversions.h:39
JointTrajectory trajectory
Definition: tesseract_common_serialization_unit.cpp:95
Trajectory interpolator class.