#include <speed_planner.H>
Public Member Functions | |
speed_planner_t (const conf_t &conf) | |
~speed_planner_t () | |
double | desired_speed (double tstamp, double present_speed, double safety_speed_limit, uniform_path_t &path, int goal_index, double bx, double by, double &desired_speed_rate, bool pause) |
Returns desired speed based on its present status (pause) and also so as to respect the speed limits on the path. | |
void | set_consistent_speed_limits (uniform_path_t &path) |
Private Member Functions | |
double | safe_approach_speed (double present_speed, double distance_between_points) |
double | next_lower_speed (double min_speed, double present_speed) |
bool | read_config (const conf_t &conf) |
double | speed_at_LA_point (double pres_speed, double bx, double by, uniform_path_t &path, int goal_index, int &v_gi) |
Provide safe speed at LA point infront of the vehicle. LA is computed as expected position of the vehicle m_LA_time in future. | |
void | compute_speed_rate (double target_speed, double present_speed, double &desired_speed_rate) |
Compute desire_speed_rate based on target_speed and present speed. | |
double | speed_at_point (uniform_path_t &path, int goal_index, double x_, double y_) |
Speed at point x_,y_ on path just before goal_index. | |
void | compute_LA_point (double LA_dis, double pres_x, double pres_y, uniform_path_t &path, unsigned gi, double &LA_x, double &LA_y, int &LA_gi) |
Computes coordinates (LA_x, LA_y) on 'path' at index LA_gi which is LA_dis after pres_x, pres_y on the path. | |
Private Attributes | |
double | m_suggested_deceleration |
double | m_max_acceleration |
double | m_max_deceleration |
double | m_pause_deceleration |
bool | m_already_paused |
double | m_tstamp_when_paused |
double | m_speed_when_paused |
double | m_speed_look_ahead_time |
double | m_LA_time |
speed_planner_t::speed_planner_t | ( | const conf_t & | conf | ) |
References m_pause_deceleration, m_suggested_deceleration, and read_config().
speed_planner_t::~speed_planner_t | ( | ) |
void speed_planner_t::compute_LA_point | ( | double | LA_dis, | |
double | pres_x, | |||
double | pres_y, | |||
uniform_path_t & | path, | |||
unsigned | gi, | |||
double & | LA_x, | |||
double & | LA_y, | |||
int & | LA_gi | |||
) | [private] |
Computes coordinates (LA_x, LA_y) on 'path' at index LA_gi which is LA_dis after pres_x, pres_y on the path.
Referenced by speed_at_LA_point().
void speed_planner_t::compute_speed_rate | ( | double | target_speed, | |
double | present_speed, | |||
double & | desired_speed_rate | |||
) | [private] |
Compute desire_speed_rate based on target_speed and present speed.
References m_max_acceleration, m_max_deceleration, and m_speed_look_ahead_time.
Referenced by desired_speed().
double speed_planner_t::desired_speed | ( | double | tstamp, | |
double | present_speed, | |||
double | safety_speed_limit, | |||
uniform_path_t & | path, | |||
int | goal_index, | |||
double | bx, | |||
double | by, | |||
double & | desired_speed_rate, | |||
bool | pause | |||
) |
Returns desired speed based on its present status (pause) and also so as to respect the speed limits on the path.
References compute_speed_rate(), m_already_paused, m_pause_deceleration, m_speed_when_paused, m_tstamp_when_paused, and speed_at_LA_point().
Referenced by cajun::drive_t::drive_the_bot().
double speed_planner_t::next_lower_speed | ( | double | min_speed, | |
double | present_speed | |||
) | [private] |
References m_speed_look_ahead_time, and m_suggested_deceleration.
bool speed_planner_t::read_config | ( | const conf_t & | conf | ) | [private] |
References m_LA_time, m_max_acceleration, m_max_deceleration, m_pause_deceleration, m_speed_look_ahead_time, and m_suggested_deceleration.
Referenced by speed_planner_t().
double speed_planner_t::safe_approach_speed | ( | double | present_speed, | |
double | distance_between_points | |||
) | [private] |
References m_suggested_deceleration.
Referenced by speed_at_point().
void cajun::speed_planner_t::set_consistent_speed_limits | ( | uniform_path_t & | path | ) |
double speed_planner_t::speed_at_LA_point | ( | double | pres_speed, | |
double | bx, | |||
double | by, | |||
uniform_path_t & | path, | |||
int | goal_index, | |||
int & | v_gi | |||
) | [private] |
Provide safe speed at LA point infront of the vehicle. LA is computed as expected position of the vehicle m_LA_time in future.
References compute_LA_point(), m_LA_time, and speed_at_point().
Referenced by desired_speed().
double speed_planner_t::speed_at_point | ( | uniform_path_t & | path, | |
int | goal_index, | |||
double | x_, | |||
double | y_ | |||
) | [private] |
Speed at point x_,y_ on path just before goal_index.
References cajun::waypoint_t::max_speed, safe_approach_speed(), cajun::waypoint_t::x, and cajun::waypoint_t::y.
Referenced by speed_at_LA_point().
bool cajun::speed_planner_t::m_already_paused [private] |
Referenced by desired_speed().
double cajun::speed_planner_t::m_LA_time [private] |
Referenced by read_config(), and speed_at_LA_point().
double cajun::speed_planner_t::m_max_acceleration [private] |
Referenced by compute_speed_rate(), and read_config().
double cajun::speed_planner_t::m_max_deceleration [private] |
Referenced by compute_speed_rate(), and read_config().
double cajun::speed_planner_t::m_pause_deceleration [private] |
Referenced by desired_speed(), read_config(), and speed_planner_t().
double cajun::speed_planner_t::m_speed_look_ahead_time [private] |
Referenced by compute_speed_rate(), next_lower_speed(), and read_config().
double cajun::speed_planner_t::m_speed_when_paused [private] |
Referenced by desired_speed().
double cajun::speed_planner_t::m_suggested_deceleration [private] |
Referenced by next_lower_speed(), read_config(), safe_approach_speed(), and speed_planner_t().
double cajun::speed_planner_t::m_tstamp_when_paused [private] |
Referenced by desired_speed().