Fawkes API
Fawkes Development Version
|
HumanoidMotionInterface Fawkes BlackBoard Interface. More...
#include <>>
Classes | |
class | GetUpMessage |
GetUpMessage Fawkes BlackBoard Interface Message. More... | |
struct | HumanoidMotionInterface_data_t |
Internal data storage, do NOT modify! More... | |
class | KickMessage |
KickMessage Fawkes BlackBoard Interface Message. More... | |
class | MoveHeadMessage |
MoveHeadMessage Fawkes BlackBoard Interface Message. More... | |
class | ParkMessage |
ParkMessage Fawkes BlackBoard Interface Message. More... | |
class | StandupMessage |
StandupMessage Fawkes BlackBoard Interface Message. More... | |
class | StopMessage |
StopMessage Fawkes BlackBoard Interface Message. More... | |
class | TurnMessage |
TurnMessage Fawkes BlackBoard Interface Message. More... | |
class | WalkArcMessage |
WalkArcMessage Fawkes BlackBoard Interface Message. More... | |
class | WalkSidewaysMessage |
WalkSidewaysMessage Fawkes BlackBoard Interface Message. More... | |
class | WalkStraightMessage |
WalkStraightMessage Fawkes BlackBoard Interface Message. More... | |
class | WalkVelocityMessage |
WalkVelocityMessage Fawkes BlackBoard Interface Message. More... | |
Public Types | |
enum | LegEnum { LEG_LEFT, LEG_RIGHT } |
Type to determinate leg side. More... | |
enum | StandupEnum { STANDUP_DETECT, STANDUP_BACK, STANDUP_FRONT } |
From which position to standup. More... | |
Public Member Functions | |
const char * | tostring_LegEnum (LegEnum value) const |
Convert LegEnum constant to string. | |
const char * | tostring_StandupEnum (StandupEnum value) const |
Convert StandupEnum constant to string. | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. | |
bool | is_moving () const |
Get moving value. | |
void | set_moving (const bool new_moving) |
Set moving value. | |
size_t | maxlenof_moving () const |
Get maximum length of moving value. | |
bool | is_arms_enabled () const |
Get arms_enabled value. | |
void | set_arms_enabled (const bool new_arms_enabled) |
Set arms_enabled value. | |
size_t | maxlenof_arms_enabled () const |
Get maximum length of arms_enabled value. | |
uint32_t | msgid () const |
Get msgid value. | |
void | set_msgid (const uint32_t new_msgid) |
Set msgid value. | |
size_t | maxlenof_msgid () const |
Get maximum length of msgid value. | |
virtual Message * | create_message (const char *type) const |
Create message based on type name. | |
virtual void | copy_values (const Interface *other) |
Copy values from other interface. | |
virtual const char * | enum_tostring (const char *enumtype, int val) const |
Convert arbitrary enum value to string. |
HumanoidMotionInterface Fawkes BlackBoard Interface.
This interface provides acces to basic humanoid motion patterns.
Type to determinate leg side.
Definition at line 42 of file HumanoidMotionInterface.h.
From which position to standup.
STANDUP_DETECT |
Detect via accelerometer. |
STANDUP_BACK |
Standup from lying on the back. |
STANDUP_FRONT |
Standup from lying on the tummy. |
Definition at line 49 of file HumanoidMotionInterface.h.
void fawkes::HumanoidMotionInterface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other interface to copy values from |
Implements fawkes::Interface.
Definition at line 242 of file HumanoidMotionInterface.cpp.
References fawkes::Interface::type().
Message * fawkes::HumanoidMotionInterface::create_message | ( | const char * | type | ) | const [virtual] |
Create message based on type name.
This will create a new message of the given type. The type must be given without the InterfaceName:: prefix but just the plain class name of the message.
type | message type |
UnknownTypeException | thrown if this interface cannot create a message of the given type. |
Implements fawkes::Interface.
Definition at line 207 of file HumanoidMotionInterface.cpp.
const char * fawkes::HumanoidMotionInterface::enum_tostring | ( | const char * | enumtype, |
int | val | ||
) | const [virtual] |
Convert arbitrary enum value to string.
Given the string representation of the enum type and the value this method returns the string representation of the specific value, or the string UNKNOWN if the value is not defined. An exception is thrown if the enum type is invalid.
enumtype | enum type as string |
val | value to convert |
UnknownTypeException | thrown if enumtype is not specified for interface. |
Implements fawkes::Interface.
Definition at line 253 of file HumanoidMotionInterface.cpp.
bool fawkes::HumanoidMotionInterface::is_arms_enabled | ( | ) | const |
Get arms_enabled value.
If true the arms are controlled during walking for balancing.
Definition at line 140 of file HumanoidMotionInterface.cpp.
bool fawkes::HumanoidMotionInterface::is_moving | ( | ) | const |
Get moving value.
True if the robot is moving.
Definition at line 107 of file HumanoidMotionInterface.cpp.
size_t fawkes::HumanoidMotionInterface::maxlenof_arms_enabled | ( | ) | const |
Get maximum length of arms_enabled value.
Definition at line 150 of file HumanoidMotionInterface.cpp.
size_t fawkes::HumanoidMotionInterface::maxlenof_moving | ( | ) | const |
Get maximum length of moving value.
Definition at line 117 of file HumanoidMotionInterface.cpp.
size_t fawkes::HumanoidMotionInterface::maxlenof_msgid | ( | ) | const |
Get maximum length of msgid value.
Definition at line 186 of file HumanoidMotionInterface.cpp.
bool fawkes::HumanoidMotionInterface::message_valid | ( | const Message * | message | ) | const [virtual] |
Check if message is valid and can be enqueued.
message | Message to check |
Implements fawkes::Interface.
Definition at line 1382 of file HumanoidMotionInterface.cpp.
uint32_t fawkes::HumanoidMotionInterface::msgid | ( | ) | const |
Get msgid value.
The ID of the message that is currently being processed, or 0 if no message is being processed.
Definition at line 176 of file HumanoidMotionInterface.cpp.
void fawkes::HumanoidMotionInterface::set_arms_enabled | ( | const bool | new_arms_enabled | ) |
Set arms_enabled value.
If true the arms are controlled during walking for balancing.
new_arms_enabled | new arms_enabled value |
Definition at line 162 of file HumanoidMotionInterface.cpp.
Referenced by NaoQiMotionThread::loop().
void fawkes::HumanoidMotionInterface::set_moving | ( | const bool | new_moving | ) |
Set moving value.
True if the robot is moving.
new_moving | new moving value |
Definition at line 127 of file HumanoidMotionInterface.cpp.
Referenced by NaoQiMotionThread::loop().
void fawkes::HumanoidMotionInterface::set_msgid | ( | const uint32_t | new_msgid | ) |
Set msgid value.
The ID of the message that is currently being processed, or 0 if no message is being processed.
new_msgid | new msgid value |
Definition at line 199 of file HumanoidMotionInterface.cpp.
const char * fawkes::HumanoidMotionInterface::tostring_LegEnum | ( | LegEnum | value | ) | const |
Convert LegEnum constant to string.
value | value to convert to string |
Definition at line 79 of file HumanoidMotionInterface.cpp.
const char * fawkes::HumanoidMotionInterface::tostring_StandupEnum | ( | StandupEnum | value | ) | const |
Convert StandupEnum constant to string.
value | value to convert to string |
Definition at line 92 of file HumanoidMotionInterface.cpp.