Base class for turn planners.
More...
#include <turning_base.h>
|
virtual F2CPath | createSimpleTurn (const F2CRobot &robot, double dist_start_pos, double start_angle, double end_angle)=0 |
| Create a turn. More...
|
|
F2CPath | createTurn (const F2CRobot &robot, const F2CPoint &start_pos, double start_angle, const F2CPoint &end_pos, double end_angle) |
| Create a turn that goes from one point with a certain angle to another point. More...
|
|
F2CPath | createTurnIfNotCached (const F2CRobot &robot, double dist_start_pos, double start_angle, double end_angle) |
| Generate a turn if it has not been computed before. More...
|
|
double | getDiscretization () const |
| Get discretization distance from points in the turn. More...
|
|
bool | getUsingCache () const |
| Get if turns are being cached or not. More...
|
|
void | setDiscretization (double d) |
| Set discretization distance from points in the turn. More...
|
|
void | setUsingCache (bool c) |
| Set if cache should be used when planning same turn as before. More...
|
|
virtual | ~TurningBase ()=default |
|
|
static bool | isTurnValid (const F2CPath &path, double dist_start_end, double end_angle, double max_dist_error=0.05, double max_rot_error=0.1) |
| Check if turn is valid. More...
|
|
static std::vector< double > | transformToNormalTurn (const F2CPoint &start_pos, double start_angle, const F2CPoint &end_pos, double end_angle) |
| Transform the turn parameters representation from two points with two angles to one distance and two angles. More...
|
|
Base class for turn planners.
Definition at line 22 of file turning_base.h.
◆ ~TurningBase()
virtual f2c::pp::TurningBase::~TurningBase |
( |
| ) |
|
|
virtualdefault |
◆ correctPath()
void f2c::pp::TurningBase::correctPath |
( |
F2CPath & |
path, |
|
|
const F2CPoint & |
start_pos, |
|
|
const F2CPoint & |
end_pos, |
|
|
float |
max_error_dist = 0.05 |
|
) |
| |
|
staticprivate |
◆ createSimpleTurn()
virtual F2CPath f2c::pp::TurningBase::createSimpleTurn |
( |
const F2CRobot & |
robot, |
|
|
double |
dist_start_pos, |
|
|
double |
start_angle, |
|
|
double |
end_angle |
|
) |
| |
|
pure virtual |
◆ createTurn()
F2CPath f2c::pp::TurningBase::createTurn |
( |
const F2CRobot & |
robot, |
|
|
const F2CPoint & |
start_pos, |
|
|
double |
start_angle, |
|
|
const F2CPoint & |
end_pos, |
|
|
double |
end_angle |
|
) |
| |
Create a turn that goes from one point with a certain angle to another point.
Start and end point are connected with a line that creates the inferior border of the turn.
- Parameters
-
start_pos | Start point |
start_angle | Start angle |
end_pos | End point |
end_angle | End angle |
- Returns
- Path with the computed turn
Definition at line 30 of file turning_base.cpp.
◆ createTurnIfNotCached()
F2CPath f2c::pp::TurningBase::createTurnIfNotCached |
( |
const F2CRobot & |
robot, |
|
|
double |
dist_start_pos, |
|
|
double |
start_angle, |
|
|
double |
end_angle |
|
) |
| |
Generate a turn if it has not been computed before.
- Parameters
-
dist_start_pos | Distance between start and end point |
start_angle | Angle when going into the headland (0 deg is the angle of the headland) |
end_angle | Angle when going out of the headland |
Definition at line 81 of file turning_base.cpp.
◆ getDiscretization()
double f2c::pp::TurningBase::getDiscretization |
( |
| ) |
const |
Get discretization distance from points in the turn.
Definition at line 114 of file turning_base.cpp.
◆ getUsingCache()
bool f2c::pp::TurningBase::getUsingCache |
( |
| ) |
const |
◆ isTurnValid()
bool f2c::pp::TurningBase::isTurnValid |
( |
const F2CPath & |
path, |
|
|
double |
dist_start_end, |
|
|
double |
end_angle, |
|
|
double |
max_dist_error = 0.05 , |
|
|
double |
max_rot_error = 0.1 |
|
) |
| |
|
static |
◆ setDiscretization()
void f2c::pp::TurningBase::setDiscretization |
( |
double |
d | ) |
|
Set discretization distance from points in the turn.
Definition at line 118 of file turning_base.cpp.
◆ setUsingCache()
void f2c::pp::TurningBase::setUsingCache |
( |
bool |
c | ) |
|
Set if cache should be used when planning same turn as before.
Definition at line 126 of file turning_base.cpp.
◆ transformToNormalTurn()
std::vector< double > f2c::pp::TurningBase::transformToNormalTurn |
( |
const F2CPoint & |
start_pos, |
|
|
double |
start_angle, |
|
|
const F2CPoint & |
end_pos, |
|
|
double |
end_angle |
|
) |
| |
|
static |
Transform the turn parameters representation from two points with two angles to one distance and two angles.
- Parameters
-
start_pos | Start point |
start_angle | Start angle |
end_pos | End point |
end_angle | End angle |
- Returns
- Vector with the values of the new representation
Definition at line 11 of file turning_base.cpp.
◆ discretization
double f2c::pp::TurningBase::discretization {0.01} |
|
protected |
◆ path_cache_
std::map<std::vector<int>, F2CPath> f2c::pp::TurningBase::path_cache_ |
|
protected |
◆ using_cache
bool f2c::pp::TurningBase::using_cache {true} |
|
protected |
The documentation for this class was generated from the following files: