1 #ifndef TRAJECTORY_BASE_H
2 #define TRAJECTORY_BASE_H
118 static State convert_model_to_body_frame(
const State& model_world,
const State& curr_state);
Abstract base class for all trajectory representations.
Definition: TrajectoryBase.h:18
double start_time_
ROS time at which start() was called.
Definition: TrajectoryBase.h:89
State get_model(double t, const State &curr_state)
Returns the desired body-frame state at time t.
Definition: TrajectoryBase.cpp:13
bool started_
True after start() has been called.
Definition: TrajectoryBase.h:86
virtual bool is_finished(double t) const =0
Returns true if the trajectory has completed at time t.
virtual ~TrajectoryBase()=default
std::shared_ptr< Trajectory6DOFLimits > vehicle_limits_
Velocity and acceleration limits for trajectory planning.
Definition: TrajectoryBase.h:80
void start(double t)
Records the start time of the trajectory.
Definition: TrajectoryBase.cpp:8
geometry_msgs::msg::PoseArray get_visualization_msg(double t, double sample_hz=20.0) const
Builds a PoseArray message sampling the trajectory for RViz visualisation.
Definition: TrajectoryBase.cpp:54
std::string world_frame_id_
TF frame ID embedded in visualisation message headers.
Definition: TrajectoryBase.h:83
virtual State get_model_world(double t) const =0
Evaluates the desired world-frame state at the given ROS time.
double get_elapsed_time(double t) const
Returns elapsed time since start(), or 0 if not yet started.
Definition: TrajectoryBase.cpp:84
virtual double get_expected_total_time() const =0
Returns the total expected duration of the trajectory.
virtual double get_progress(double t) const =0
Returns fractional trajectory progress at time t.
Full kinematic state of the vehicle.
Definition: Types.h:63