A class representing the robot's pose (i.e. position and orientation) in the underlying SBPL. More precisely a planning state is a discrete representation of the robot's supporting leg. More...
#include <PlanningState.h>
Public Member Functions | |
unsigned int | getHashTag () const |
int | getId () const |
Leg | getLeg () const |
State | getState (double cell_size, int num_angle_bins) const |
Computes the continuous State the PlanningState represents. | |
int | getTheta () const |
int | getX () const |
int | getY () const |
bool | operator!= (const PlanningState &s2) const |
Compare two states on inequality of x, y, theta, leg by comparing the hash tags of the states. | |
bool | operator== (const PlanningState &s2) const |
Compare two states on equality of x, y, theta, leg. Makes first use of the non-unique hash tag to rule out unequal states. | |
PlanningState (double x, double y, double theta, Leg leg, double cell_size, int num_angle_bins, int max_hash_size) | |
x, y and theta represent the global (continuous) position and orientation of the robot's support leg. | |
PlanningState (int x, int y, int theta, Leg leg, int max_hash_size) | |
x, y and theta as discrete bin values (as used internally by the planner). | |
PlanningState (const State &s, double cell_size, int num_angle_bins, int max_hash_size) | |
Create a (discrete) PlanningState from a (continuous) State. | |
PlanningState (const PlanningState &s) | |
Copy constructor. | |
void | setId (unsigned int id) |
Used to attach such an unique ID to the planning state. (This cannot be done in the constructor since often such an ID is not known when the planning state is created.) | |
~PlanningState () | |
Private Attributes | |
unsigned int | ivHashTag |
int | ivId |
The (unique) ID of the planning state. | |
Leg | ivLeg |
The supporting leg. | |
int | ivTheta |
Number of the bin the orientation is fitted into. | |
int | ivX |
Value of the grid cell the position's x value is fitted into. | |
int | ivY |
Value of the grid cell the position's y value is fitted into. |
A class representing the robot's pose (i.e. position and orientation) in the underlying SBPL. More precisely a planning state is a discrete representation of the robot's supporting leg.
Since SBPL is working on discretized states the planning states are also discretized positions and orientations. This is done by fitting the positions into a grid and the orientations into bins. (NOTE: the resolution of the planning cells is likely to differ from the resolution of the grid map.)
The SBPL can access each planning state via an unique ID. Furthermore each planning state can be identified by an (ununique) hash tag generated from its position, location and supporting leg.
Definition at line 48 of file PlanningState.h.
footstep_planner::PlanningState::PlanningState | ( | double | x, |
double | y, | ||
double | theta, | ||
Leg | leg, | ||
double | cell_size, | ||
int | num_angle_bins, | ||
int | max_hash_size | ||
) |
x, y and theta represent the global (continuous) position and orientation of the robot's support leg.
leg | The supporting leg. |
cell_size | The size of each grid cell discretizing the position. |
num_angle_bins | The number of bins discretizing the orientation. |
max_hash_size |
Definition at line 32 of file PlanningState.cpp.
footstep_planner::PlanningState::PlanningState | ( | int | x, |
int | y, | ||
int | theta, | ||
Leg | leg, | ||
int | max_hash_size | ||
) |
x, y and theta as discrete bin values (as used internally by the planner).
Definition at line 44 of file PlanningState.cpp.
footstep_planner::PlanningState::PlanningState | ( | const State & | s, |
double | cell_size, | ||
int | num_angle_bins, | ||
int | max_hash_size | ||
) |
Create a (discrete) PlanningState from a (continuous) State.
Definition at line 55 of file PlanningState.cpp.
Copy constructor.
Definition at line 66 of file PlanningState.cpp.
Definition at line 76 of file PlanningState.cpp.
unsigned int footstep_planner::PlanningState::getHashTag | ( | ) | const [inline] |
Definition at line 108 of file PlanningState.h.
int footstep_planner::PlanningState::getId | ( | ) | const [inline] |
Definition at line 114 of file PlanningState.h.
Leg footstep_planner::PlanningState::getLeg | ( | ) | const [inline] |
Definition at line 99 of file PlanningState.h.
State footstep_planner::PlanningState::getState | ( | double | cell_size, |
int | num_angle_bins | ||
) | const |
Computes the continuous State the PlanningState represents.
Definition at line 103 of file PlanningState.cpp.
int footstep_planner::PlanningState::getTheta | ( | ) | const [inline] |
Definition at line 100 of file PlanningState.h.
int footstep_planner::PlanningState::getX | ( | ) | const [inline] |
Definition at line 101 of file PlanningState.h.
int footstep_planner::PlanningState::getY | ( | ) | const [inline] |
Definition at line 102 of file PlanningState.h.
bool footstep_planner::PlanningState::operator!= | ( | const PlanningState & | s2 | ) | const |
Compare two states on inequality of x, y, theta, leg by comparing the hash tags of the states.
Definition at line 95 of file PlanningState.cpp.
bool footstep_planner::PlanningState::operator== | ( | const PlanningState & | s2 | ) | const |
Compare two states on equality of x, y, theta, leg. Makes first use of the non-unique hash tag to rule out unequal states.
Definition at line 81 of file PlanningState.cpp.
void footstep_planner::PlanningState::setId | ( | unsigned int | id | ) | [inline] |
Used to attach such an unique ID to the planning state. (This cannot be done in the constructor since often such an ID is not known when the planning state is created.)
Definition at line 97 of file PlanningState.h.
unsigned int footstep_planner::PlanningState::ivHashTag [private] |
The (non-unique) hash tag of the planning state. Different hash tags imply that the states differ in x, y, theta, leg.
Definition at line 136 of file PlanningState.h.
int footstep_planner::PlanningState::ivId [private] |
The (unique) ID of the planning state.
Definition at line 130 of file PlanningState.h.
Leg footstep_planner::PlanningState::ivLeg [private] |
The supporting leg.
Definition at line 127 of file PlanningState.h.
int footstep_planner::PlanningState::ivTheta [private] |
Number of the bin the orientation is fitted into.
Definition at line 125 of file PlanningState.h.
int footstep_planner::PlanningState::ivX [private] |
Value of the grid cell the position's x value is fitted into.
Definition at line 121 of file PlanningState.h.
int footstep_planner::PlanningState::ivY [private] |
Value of the grid cell the position's y value is fitted into.
Definition at line 123 of file PlanningState.h.