gen_vpath.C File Reference

#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_ts_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_tg_s_curves
vector< curve_tg_line_sets
vector< curve_tg_curve_sets

Define Documentation

#define D2R   (M_PI / 180.0)

Typedef Documentation

typedef vector<s_curve_seg_t> s_curve_t

Function Documentation

void gen_curves ( double  cell_size_,
double  distance_ 
)
void gen_lines ( double  cell_size_,
double  distance_ 
)
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_  ) 
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().

void get_s_curve_seg ( vector< xy_t > &  path_,
double  cell_size_,
s_curve_t s_curve_ 
)

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 
)
void output_vpath ( vector< xy_t > const &  path_  ) 

References dx, and dy.

Referenced by gen_curves(), gen_lines(), and gen_s_curves().

bool path_match ( vector< xy_t > const &  p1_,
vector< xy_t > const &  p2_ 
)

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().

void push_path ( vector< xy_t > &  path_,
const xy_t xy_ 
)

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_ 
)
bool read_s_curve ( ifstream &  infile_  ) 
bool read_vpath_conf ( std::string const &  filename  ) 
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().


Variable Documentation

double axle_dis = 2

Referenced by gen_curves(), and read_vpath_conf().

Referenced by gen_lines(), and read_vpath_conf().

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().


Generated on Fri Apr 9 10:45:11 2010 for cbutils by  doxygen 1.6.1