Abstract base class for all trajectory representations.
More...
#include <TrajectoryBase.h>
Abstract base class for all trajectory representations.
A trajectory is a time-parameterised sequence of States expressed in the world frame. Subclasses implement get_model_world() to evaluate the desired position, velocity, and acceleration at a given time. TrajectoryBase converts that world-frame result to the body frame via the Jacobian transform before returning it to the caller.
◆ ~TrajectoryBase()
| virtual TrajectoryBase::~TrajectoryBase |
( |
| ) |
|
|
virtualdefault |
◆ get_elapsed_time()
| double TrajectoryBase::get_elapsed_time |
( |
double |
t | ) |
const |
|
protected |
Returns elapsed time since start(), or 0 if not yet started.
- Parameters
-
| t | [in] Current ROS time in seconds |
- Returns
- Elapsed time in seconds
◆ get_expected_total_time()
| virtual double TrajectoryBase::get_expected_total_time |
( |
| ) |
const |
|
pure virtual |
◆ get_model()
| State TrajectoryBase::get_model |
( |
double |
t, |
|
|
const State & |
curr_state |
|
) |
| |
Returns the desired body-frame state at time t.
Internally calls get_model_world() and transforms the result to the body frame using the current vehicle orientation.
- Parameters
-
| t | [in] Current ROS time in seconds |
| curr_state | [in] Current vehicle state (orientation used for frame conversion) |
- Returns
- Desired State in the body frame
◆ get_model_world()
| virtual State TrajectoryBase::get_model_world |
( |
double |
t | ) |
const |
|
protectedpure virtual |
Evaluates the desired world-frame state at the given ROS time.
- Parameters
-
| t | [in] Current ROS time in seconds; elapsed time is computed internally |
- Returns
- Desired State expressed in the world frame
Implemented in PolyTrajectory, and EncircleTrajectory.
◆ get_progress()
| virtual double TrajectoryBase::get_progress |
( |
double |
t | ) |
const |
|
pure virtual |
Returns fractional trajectory progress at time t.
- Parameters
-
| t | [in] Current ROS time in seconds |
- Returns
- Progress value; semantics are implementation-defined but typically increases from 0 to the number of segments
Implemented in PolyTrajectory, and EncircleTrajectory.
◆ get_visualization_msg()
| geometry_msgs::msg::PoseArray TrajectoryBase::get_visualization_msg |
( |
double |
t, |
|
|
double |
sample_hz = 20.0 |
|
) |
| const |
Builds a PoseArray message sampling the trajectory for RViz visualisation.
- Parameters
-
| t | [in] Current ROS time used for the message stamp |
| sample_hz | [in] Sampling rate in Hz (default: 20 Hz) |
- Returns
- PoseArray containing sampled world-frame poses along the trajectory
◆ is_finished()
| virtual bool TrajectoryBase::is_finished |
( |
double |
t | ) |
const |
|
pure virtual |
Returns true if the trajectory has completed at time t.
- Parameters
-
| t | [in] Current ROS time in seconds |
- Returns
- True once elapsed time exceeds the trajectory duration
Implemented in PolyTrajectory, and EncircleTrajectory.
◆ start()
| void TrajectoryBase::start |
( |
double |
t | ) |
|
Records the start time of the trajectory.
- Parameters
-
| t | [in] ROS time at which execution begins, in seconds |
◆ start_time_
| double TrajectoryBase::start_time_ = 0.0 |
|
protected |
ROS time at which start() was called.
◆ started_
| bool TrajectoryBase::started_ = false |
|
protected |
True after start() has been called.
◆ vehicle_limits_
Velocity and acceleration limits for trajectory planning.
◆ world_frame_id_
| std::string TrajectoryBase::world_frame_id_ |
|
protected |
TF frame ID embedded in visualisation message headers.
The documentation for this class was generated from the following files: