#include <cstring>#include <cmath>#include <cassert>#include <stdlib.h>#include <vector>#include <iostream>#include <fstream>#include "conf.H"Classes | |
| struct | xy_t |
| struct | pos_t |
| struct | s_curve_seg_t |
| struct | curve_t |
Defines | |
| #define | D2R (M_PI / 180.0) |
Typedefs | |
| typedef vector< s_curve_seg_t > | s_curve_t |
Functions | |
| void | push_path (vector< xy_t > &path_, const xy_t &xy_) |
| void | push_line_segment (vector< xy_t > &path_, int dx, int dy, int sx, int sy, float orient_) |
| void | gen_path_line (vector< xy_t > &path_, double cell_size_, double distance_, double angle_) |
| void | push_seg (xy_t &xy_, xy_t &prev_xy_, vector< xy_t > &path_, double cell_size_, double orient_) |
| bool | path_match (vector< xy_t > const &p1_, vector< xy_t > const &p2_) |
| void | output_vpath (vector< xy_t > const &path_) |
| bool | segment_okay (vector< xy_t > &path_, unsigned s, unsigned e) |
| void | set_publish_flag (vector< xy_t > &path_) |
| bool | read_s_curve (ifstream &infile_) |
| bool | read_3p_curve (ifstream &infile_, vector< curve_t > &curve_set_) |
| bool | read_vpath_conf (std::string const &filename) |
| void | get_s_curve_seg (vector< xy_t > &path_, double cell_size_, s_curve_t &s_curve_) |
| void | gen_s_curves (double cell_size_) |
| void | get_curve_seg (vector< xy_t > &path_, double steering_pos_, double start_ang_, double distance_, double cell_size_) |
| void | gen_curves (double cell_size_, double distance_) |
| void | gen_lines (double cell_size_, double distance_) |
| int | main (int argc, char **argv) |
Variables | |
| double | axle_dis = 2 |
| double | st_rate = M_PI / 4 |
| vector< s_curve_t > | g_s_curves |
| vector< curve_t > | g_line_sets |
| vector< curve_t > | g_curve_sets |
| #define D2R (M_PI / 180.0) |
Referenced by cajun::route_t::read_RDDF(), and cajun::route_t::read_relative().
| typedef vector<s_curve_seg_t> s_curve_t |
| void gen_curves | ( | double | cell_size_, | |
| double | distance_ | |||
| ) |
References g_curve_sets, get_curve_seg(), curve_t::max_angle, curve_t::min_angle, output_vpath(), path_match(), set_publish_flag(), and curve_t::steps.
Referenced by main().
| void gen_lines | ( | double | cell_size_, | |
| double | distance_ | |||
| ) |
References g_line_sets, gen_path_line(), curve_t::max_angle, curve_t::min_angle, output_vpath(), path_match(), and curve_t::steps.
Referenced by main().
| void gen_path_line | ( | vector< xy_t > & | path_, | |
| double | cell_size_, | |||
| double | distance_, | |||
| double | angle_ | |||
| ) |
References dx, dy, and push_line_segment().
Referenced by gen_lines().
| void gen_s_curves | ( | double | cell_size_ | ) |
References g_s_curves, get_s_curve_seg(), output_vpath(), and set_publish_flag().
Referenced by main().
| void get_curve_seg | ( | vector< xy_t > & | path_, | |
| double | steering_pos_, | |||
| double | start_ang_, | |||
| double | distance_, | |||
| double | cell_size_ | |||
| ) |
References axle_dis, push_seg(), xy_t::x, and xy_t::y.
Referenced by gen_curves().
References axle_dis, push_seg(), st_rate, xy_t::x, pos_t::x, xy_t::y, and pos_t::y.
Referenced by gen_s_curves().
| int main | ( | int | argc, | |
| char ** | argv | |||
| ) |
References gen_curves(), gen_lines(), gen_s_curves(), cajun::make_bot_config_filename(), and read_vpath_conf().
| void output_vpath | ( | vector< xy_t > const & | path_ | ) |
Referenced by gen_curves(), gen_lines(), and gen_s_curves().
Referenced by gen_curves(), and gen_lines().
| void push_line_segment | ( | vector< xy_t > & | path_, | |
| int | dx, | |||
| int | dy, | |||
| int | sx, | |||
| int | sy, | |||
| float | orient_ | |||
| ) |
References push_path().
Referenced by gen_path_line(), and push_seg().
References xy_t::x, and xy_t::y.
Referenced by push_line_segment().
| void push_seg | ( | xy_t & | xy_, | |
| xy_t & | prev_xy_, | |||
| vector< xy_t > & | path_, | |||
| double | cell_size_, | |||
| double | orient_ | |||
| ) |
References dx, dy, push_line_segment(), xy_t::x, and xy_t::y.
Referenced by get_curve_seg(), and get_s_curve_seg().
| bool read_3p_curve | ( | ifstream & | infile_, | |
| vector< curve_t > & | curve_set_ | |||
| ) |
References curve_t::max_angle, curve_t::min_angle, and curve_t::steps.
Referenced by read_vpath_conf().
| bool read_s_curve | ( | ifstream & | infile_ | ) |
References s_curve_seg_t::angle, g_s_curves, and s_curve_seg_t::period.
Referenced by read_vpath_conf().
| bool read_vpath_conf | ( | std::string const & | filename | ) |
References axle_dis, g_curve_sets, g_line_sets, read_3p_curve(), read_s_curve(), and st_rate.
Referenced by main().
| bool segment_okay | ( | vector< xy_t > & | path_, | |
| unsigned | s, | |||
| unsigned | e | |||
| ) |
Referenced by set_publish_flag().
| void set_publish_flag | ( | vector< xy_t > & | path_ | ) |
References segment_okay().
Referenced by gen_curves(), and gen_s_curves().
| double axle_dis = 2 |
Referenced by get_curve_seg(), get_s_curve_seg(), and read_vpath_conf().
| vector<curve_t> g_curve_sets |
Referenced by gen_curves(), and read_vpath_conf().
| vector<curve_t> g_line_sets |
Referenced by gen_lines(), and read_vpath_conf().
| vector<s_curve_t> g_s_curves |
Referenced by gen_s_curves(), and read_s_curve().
| double st_rate = M_PI / 4 |
Referenced by get_s_curve_seg(), and read_vpath_conf().
1.6.1