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 <planning_state.h>
Public Types | |
typedef boost::shared_ptr< const PlanningState > | ConstPtr |
typedef boost::shared_ptr< PlanningState > | Ptr |
Public Member Functions | |
unsigned int | getHashTag () const |
int | getId () const |
Leg | getLeg () const |
const PlanningState * | getPredState () const |
const State & | getState () const |
gets the continuous State the PlanningState represents. More... | |
State & | getState () |
double | getStepDuration () const |
const PlanningState * | getSuccState () const |
double | getSwayDuration () const |
double | getSwingHeight () const |
int | getX () const |
int | getY () const |
int | getYaw () 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. More... | |
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. More... | |
PlanningState (double x, double y, double z, double roll, double pitch, double yaw, Leg leg, double cell_size, double angle_bin_size, int max_hash_size, const PlanningState *pred_state=nullptr, const PlanningState *succ_state=nullptr) | |
x, y and theta represent the global (continuous) position and orientation of the robot's support leg. More... | |
PlanningState (int x, int y, double z, double roll, double pitch, int yaw, Leg leg, double cell_size, double angle_bin_size, int max_hash_size, const PlanningState *pred_state=nullptr, const PlanningState *succ_state=nullptr) | |
x, y and theta as discrete bin values (as used internally by the planner). More... | |
PlanningState (const geometry_msgs::Pose &pose, Leg leg, double cell_size, double angle_bin_size, int max_hash_size, const PlanningState *pred_state=nullptr, const PlanningState *succ_state=nullptr) | |
PlanningState (const State &s, double cell_size, double angle_bin_size, int max_hash_size, const PlanningState *pred_state=nullptr, const PlanningState *succ_state=nullptr) | |
Create a (discrete) PlanningState from a (continuous) State. More... | |
PlanningState (const PlanningState &s) | |
Copy constructor. More... | |
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.) More... | |
void | setPredState (const PlanningState *pred_state) |
void | setSuccState (const PlanningState *succ_state) |
~PlanningState () | |
Private Attributes | |
unsigned int | ivHashTag |
int | ivId |
The (unique) ID of the planning state. More... | |
const PlanningState * | ivpPredState |
const PlanningState * | ivpSuccState |
State | ivState |
pointer to original state More... | |
int | ivX |
Value of the grid cell the position's x value is fitted into. More... | |
int | ivY |
Value of the grid cell the position's y value is fitted into. More... | |
int | ivYaw |
The robot's orientation. More... | |
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 49 of file planning_state.h.
Definition at line 54 of file planning_state.h.
Definition at line 53 of file planning_state.h.
vigir_footstep_planning::PlanningState::PlanningState | ( | double | x, |
double | y, | ||
double | z, | ||
double | roll, | ||
double | pitch, | ||
double | yaw, | ||
Leg | leg, | ||
double | cell_size, | ||
double | angle_bin_size, | ||
int | max_hash_size, | ||
const PlanningState * | pred_state = nullptr , |
||
const PlanningState * | succ_state = nullptr |
||
) |
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 33 of file planning_state.cpp.
vigir_footstep_planning::PlanningState::PlanningState | ( | int | x, |
int | y, | ||
double | z, | ||
double | roll, | ||
double | pitch, | ||
int | yaw, | ||
Leg | leg, | ||
double | cell_size, | ||
double | angle_bin_size, | ||
int | max_hash_size, | ||
const PlanningState * | pred_state = nullptr , |
||
const PlanningState * | succ_state = nullptr |
||
) |
x, y and theta as discrete bin values (as used internally by the planner).
Definition at line 49 of file planning_state.cpp.
vigir_footstep_planning::PlanningState::PlanningState | ( | const geometry_msgs::Pose & | pose, |
Leg | leg, | ||
double | cell_size, | ||
double | angle_bin_size, | ||
int | max_hash_size, | ||
const PlanningState * | pred_state = nullptr , |
||
const PlanningState * | succ_state = nullptr |
||
) |
Definition at line 64 of file planning_state.cpp.
vigir_footstep_planning::PlanningState::PlanningState | ( | const State & | s, |
double | cell_size, | ||
double | angle_bin_size, | ||
int | max_hash_size, | ||
const PlanningState * | pred_state = nullptr , |
||
const PlanningState * | succ_state = nullptr |
||
) |
Create a (discrete) PlanningState from a (continuous) State.
Definition at line 80 of file planning_state.cpp.
vigir_footstep_planning::PlanningState::PlanningState | ( | const PlanningState & | s | ) |
Copy constructor.
Definition at line 94 of file planning_state.cpp.
vigir_footstep_planning::PlanningState::~PlanningState | ( | ) |
Definition at line 105 of file planning_state.cpp.
|
inline |
Definition at line 127 of file planning_state.h.
|
inline |
Definition at line 133 of file planning_state.h.
|
inline |
Definition at line 115 of file planning_state.h.
|
inline |
Definition at line 118 of file planning_state.h.
const State & vigir_footstep_planning::PlanningState::getState | ( | ) | const |
gets the continuous State the PlanningState represents.
Definition at line 133 of file planning_state.cpp.
State & vigir_footstep_planning::PlanningState::getState | ( | ) |
Definition at line 138 of file planning_state.cpp.
|
inline |
Definition at line 113 of file planning_state.h.
|
inline |
Definition at line 121 of file planning_state.h.
|
inline |
Definition at line 112 of file planning_state.h.
|
inline |
Definition at line 110 of file planning_state.h.
|
inline |
Definition at line 106 of file planning_state.h.
|
inline |
Definition at line 107 of file planning_state.h.
|
inline |
Definition at line 108 of file planning_state.h.
bool vigir_footstep_planning::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 128 of file planning_state.cpp.
bool vigir_footstep_planning::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.
TODO: Comment this in to plan with full steps (slower)! Check hashtag for performance improvements!
Definition at line 108 of file planning_state.cpp.
|
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 104 of file planning_state.h.
|
inline |
Definition at line 117 of file planning_state.h.
|
inline |
Definition at line 120 of file planning_state.h.
|
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 160 of file planning_state.h.
|
private |
The (unique) ID of the planning state.
Definition at line 154 of file planning_state.h.
|
private |
Definition at line 150 of file planning_state.h.
|
private |
Definition at line 151 of file planning_state.h.
|
private |
pointer to original state
Definition at line 141 of file planning_state.h.
|
private |
Value of the grid cell the position's x value is fitted into.
Definition at line 144 of file planning_state.h.
|
private |
Value of the grid cell the position's y value is fitted into.
Definition at line 146 of file planning_state.h.
|
private |
The robot's orientation.
Definition at line 148 of file planning_state.h.