gusimplewhiteboard
|
Internal class for cost based graph search paths, in this case motion paths. More...
#include <MOTION_Interface.hpp>
Public Member Functions | |
Stance_Path () | |
Constructor. More... | |
int | offset () |
offset getter More... | |
bool | valid () |
is this a valid motion transition More... | |
void | invalidate () |
set this path in invalid More... | |
void | reached () |
did this path get to the desired stance More... | |
int | cost () |
getter for the path cost (aka time) More... | |
void | add_stance (stance s, int cost) |
Add the first stance to this path. More... | |
void | add_stance (stance s, int cost, int transition) |
Add the first stance to this path. More... | |
void | pretty_print () |
pretty print of the stance path (mainly for debugging) More... | |
bool | contains (stance s) |
Check if the current stance path includes the passed in stance. More... | |
Public Attributes | |
u_int8_t | _stances [10] |
the path taken More... | |
Internal class for cost based graph search paths, in this case motion paths.
This is used to find a valid motion path from one stance to another based on the 'cost' aka the duration of time the motions will take.
Definition at line 215 of file MOTION_Interface.hpp.
|
inline |
Constructor.
Definition at line 227 of file MOTION_Interface.hpp.
|
inline |
Add the first stance to this path.
s | the stance |
cost | the transition cost from the current stance to the new stance 's' |
Definition at line 239 of file MOTION_Interface.hpp.
References _stances, cost(), invalidate(), JOINT_CHAIN_MAXSIZE, and u_int8_t.
Referenced by guWhiteboard::MOTION_Commands::DoAction(), and guWhiteboard::MOTION_Commands::GoToStance().
|
inline |
Add the first stance to this path.
s | the stance |
cost | the transition cost from the current stance to the new stance 's' |
transition | the index of the transition in the _transitions vector |
Definition at line 246 of file MOTION_Interface.hpp.
References _stances, cost(), invalidate(), JOINT_CHAIN_MAXSIZE, guWhiteboard::Motions::NUM_OF_ACTIONS, guWhiteboard::Motions::NUM_OF_STANCES, and u_int8_t.
|
inline |
Check if the current stance path includes the passed in stance.
s | the stance to check for |
Definition at line 268 of file MOTION_Interface.hpp.
References _stances.
|
inline |
getter for the path cost (aka time)
Definition at line 232 of file MOTION_Interface.hpp.
Referenced by add_stance(), guWhiteboard::MOTION_Commands::DoAction(), and guWhiteboard::MOTION_Commands::GoToStance().
|
inline |
set this path in invalid
Definition at line 230 of file MOTION_Interface.hpp.
Referenced by add_stance().
|
inline |
offset getter
Definition at line 228 of file MOTION_Interface.hpp.
Referenced by guWhiteboard::MOTION_Commands::DoAction(), and guWhiteboard::MOTION_Commands::GoToStance().
|
inline |
pretty print of the stance path (mainly for debugging)
Definition at line 250 of file MOTION_Interface.hpp.
References _stances, and guWhiteboard::Motions::NUM_OF_STANCES.
Referenced by guWhiteboard::MOTION_Commands::GoToStance().
|
inline |
did this path get to the desired stance
Definition at line 231 of file MOTION_Interface.hpp.
|
inline |
is this a valid motion transition
Definition at line 229 of file MOTION_Interface.hpp.
u_int8_t guWhiteboard::Motions::Stance_Path::_stances[10] |
the path taken
Definition at line 222 of file MOTION_Interface.hpp.
Referenced by add_stance(), contains(), guWhiteboard::MOTION_Commands::DoAction(), guWhiteboard::MOTION_Commands::GoToStance(), and pretty_print().