Provides instantaneous drive point which is certain distance away on the path from the bot's projected position onto the path. More...
#include <ftc_guide.H>
Public Member Functions | |
ftc_guide_t (const conf_t &conf) | |
void | guide (guide_data_t &gd, const uniform_path_t &goal_data, unsigned goal_index, double x, double y, double heading, double speed, bool valid_path, bool forward, bool tight_path, double tstamp) |
Private Member Functions | |
bool | read_conf (const conf_t &conf) |
void | get_drive_point_position (waypoint_t &goal_wp) |
bool | can_look_beyond_wp (const uniform_path_t &goal_data, unsigned goal_index) |
void | track_with_drive_point (double look_ahead_distance, const uniform_path_t &goal_data, unsigned &goal_index, double x, double y, double &distance_from_next_wp, double heading) |
Determines the drive point on the input path (goal_data) which is at a distance 'look_head_distance' ahead of given point (x,y). The drive point is provided as the track on which the drive point is lies and distance from the end point of the track segment. | |
void | get_drive_point (waypoint_t &goal_wp, waypoint_t next_path_wp, double distance_from_next_wp) |
Given the drive point in terms of distance (distance_from_next_wp) from a specified waypoint (next_path_wp), the function sets the coordinates of the goal_wp point to point to this drive point. | |
Private Attributes | |
double | m_look_ahead_time |
double | m_min_LH_distance |
double | m_max_LH_distance |
bool | m_selective_rounding |
Provides instantaneous drive point which is certain distance away on the path from the bot's projected position onto the path.
The drive point and bot's position is used to compute parameters like 'desired_heading', 'heading_error', etc
cajun::ftc_guide_t::ftc_guide_t | ( | const conf_t & | conf | ) | [inline] |
References read_conf().
bool cajun::ftc_guide_t::can_look_beyond_wp | ( | const uniform_path_t & | goal_data, | |
unsigned | goal_index | |||
) | [private] |
void ftc_guide_t::get_drive_point | ( | waypoint_t & | goal_wp, | |
waypoint_t | next_path_wp, | |||
double | distance_from_next_wp | |||
) | [private] |
Given the drive point in terms of distance (distance_from_next_wp) from a specified waypoint (next_path_wp), the function sets the coordinates of the goal_wp point to point to this drive point.
References cajun::waypoint_t::azimuth, cajun::waypoint_t::x, and cajun::waypoint_t::y.
Referenced by guide().
void cajun::ftc_guide_t::get_drive_point_position | ( | waypoint_t & | goal_wp | ) | [private] |
void ftc_guide_t::guide | ( | guide_data_t & | gd, | |
const uniform_path_t & | goal_data, | |||
unsigned | goal_index, | |||
double | x, | |||
double | y, | |||
double | heading, | |||
double | speed, | |||
bool | valid_path, | |||
bool | forward, | |||
bool | tight_path, | |||
double | tstamp | |||
) | [virtual] |
bool ftc_guide_t::read_conf | ( | const conf_t & | conf | ) | [private] |
References m_look_ahead_time, m_max_LH_distance, and m_min_LH_distance.
Referenced by ftc_guide_t().
void ftc_guide_t::track_with_drive_point | ( | double | look_ahead_distance, | |
const uniform_path_t & | goal_data, | |||
unsigned & | goal_index, | |||
double | x, | |||
double | y, | |||
double & | distance_from_next_wp, | |||
double | heading | |||
) | [private] |
Determines the drive point on the input path (goal_data) which is at a distance 'look_head_distance' ahead of given point (x,y). The drive point is provided as the track on which the drive point is lies and distance from the end point of the track segment.
Referenced by guide().
double cajun::ftc_guide_t::m_look_ahead_time [private] |
Referenced by guide(), and read_conf().
double cajun::ftc_guide_t::m_max_LH_distance [private] |
Referenced by guide(), and read_conf().
double cajun::ftc_guide_t::m_min_LH_distance [private] |
Referenced by guide(), and read_conf().
bool cajun::ftc_guide_t::m_selective_rounding [private] |