Autoware.Auto
motion::planning::recordreplay_planner::RecordReplayPlanner Class Reference

A class for recording trajectories and replaying them as plans. More...

#include <recordreplay_planner.hpp>

Public Member Functions

 RecordReplayPlanner ()
 
bool8_t is_recording () const noexcept
 
bool8_t is_replaying () const noexcept
 
void start_recording () noexcept
 
void stop_recording () noexcept
 
void start_replaying () noexcept
 
void stop_replaying () noexcept
 
void clear_record () noexcept
 
bool record_state (const State &state_to_record)
 Add a new state to the record buffer. More...
 
const Trajectory & plan (const State &current_state)
 Generates a trajectory from the recorded path. More...
 
std::size_t get_record_length () const noexcept
 
void set_heading_weight (float64_t heading_weight)
 
float64_t get_heading_weight ()
 
void set_min_record_distance (float64_t min_record_distance)
 
float64_t get_min_record_distance () const
 
void set_skip_first_velocity (const bool8_t skip_first_velocity)
 
void writeTrajectoryBufferToFile (const std::string &record_path)
 
void readTrajectoryBufferFromFile (const std::string &replay_path)
 
void set_loop (const bool8_t loop)
 
bool8_t get_loop () const
 
bool8_t reached_goal (const State &current_state, const float64_t &distance_thresh, const float64_t &angle_thresh) const
 Judges whether current_state has reached the last point in record buffer. More...
 
bool8_t is_loop (const float64_t &distance_thresh) const
 Judges whether the trajectory is a loop. More...
 
auto get_record_buffer ()
 

Detailed Description

A class for recording trajectories and replaying them as plans.

Constructor & Destructor Documentation

◆ RecordReplayPlanner()

motion::planning::recordreplay_planner::RecordReplayPlanner::RecordReplayPlanner ( )

Member Function Documentation

◆ clear_record()

void motion::planning::recordreplay_planner::RecordReplayPlanner::clear_record ( )
noexcept

◆ get_heading_weight()

float64_t motion::planning::recordreplay_planner::RecordReplayPlanner::get_heading_weight ( )

◆ get_loop()

bool8_t motion::planning::recordreplay_planner::RecordReplayPlanner::get_loop ( ) const

◆ get_min_record_distance()

float64_t motion::planning::recordreplay_planner::RecordReplayPlanner::get_min_record_distance ( ) const

◆ get_record_buffer()

auto motion::planning::recordreplay_planner::RecordReplayPlanner::get_record_buffer ( )
inline

◆ get_record_length()

std::size_t motion::planning::recordreplay_planner::RecordReplayPlanner::get_record_length ( ) const
noexcept

◆ is_loop()

bool8_t motion::planning::recordreplay_planner::RecordReplayPlanner::is_loop ( const float64_t &  distance_thresh) const

Judges whether the trajectory is a loop.

Parameters
distance_threshthreshold of euclidean state between the first and last points in meters
Returns
true if the distance threshold is met

◆ is_recording()

bool8_t motion::planning::recordreplay_planner::RecordReplayPlanner::is_recording ( ) const
noexcept

◆ is_replaying()

bool8_t motion::planning::recordreplay_planner::RecordReplayPlanner::is_replaying ( ) const
noexcept

◆ plan()

const Trajectory & motion::planning::recordreplay_planner::RecordReplayPlanner::plan ( const State current_state)

Generates a trajectory from the recorded path.

Parameters
current_statecurrent state of the vehicle
Returns
a trajectory that replays the stored path from the current point

◆ reached_goal()

bool8_t motion::planning::recordreplay_planner::RecordReplayPlanner::reached_goal ( const State current_state,
const float64_t &  distance_thresh,
const float64_t &  angle_thresh 
) const

Judges whether current_state has reached the last point in record buffer.

Parameters
current_statecurrent state of the vehicle
distance_threshthreshold of euclidean distance between the current state the and the last point in meters
angle_threshthreshold of difference in the headings of the current_state and the last point in radians
Returns
true if both distance and angle conditions are satisfied

◆ readTrajectoryBufferFromFile()

void motion::planning::recordreplay_planner::RecordReplayPlanner::readTrajectoryBufferFromFile ( const std::string &  replay_path)

◆ record_state()

bool motion::planning::recordreplay_planner::RecordReplayPlanner::record_state ( const State state_to_record)

Add a new state to the record buffer.

Parameters
[in]state_to_recordA state to attempt to add to the recording buffer
Returns
True if state was added to record buffer, False otherwise

◆ set_heading_weight()

void motion::planning::recordreplay_planner::RecordReplayPlanner::set_heading_weight ( float64_t  heading_weight)

◆ set_loop()

void motion::planning::recordreplay_planner::RecordReplayPlanner::set_loop ( const bool8_t  loop)

◆ set_min_record_distance()

void motion::planning::recordreplay_planner::RecordReplayPlanner::set_min_record_distance ( float64_t  min_record_distance)

◆ set_skip_first_velocity()

void motion::planning::recordreplay_planner::RecordReplayPlanner::set_skip_first_velocity ( const bool8_t  skip_first_velocity)

◆ start_recording()

void motion::planning::recordreplay_planner::RecordReplayPlanner::start_recording ( )
noexcept

◆ start_replaying()

void motion::planning::recordreplay_planner::RecordReplayPlanner::start_replaying ( )
noexcept

◆ stop_recording()

void motion::planning::recordreplay_planner::RecordReplayPlanner::stop_recording ( )
noexcept

◆ stop_replaying()

void motion::planning::recordreplay_planner::RecordReplayPlanner::stop_replaying ( )
noexcept

◆ writeTrajectoryBufferToFile()

void motion::planning::recordreplay_planner::RecordReplayPlanner::writeTrajectoryBufferToFile ( const std::string &  record_path)

The documentation for this class was generated from the following files: