24 #ifndef __INTERFACES_HUMANOIDMOTIONINTERFACE_H_ 25 #define __INTERFACES_HUMANOIDMOTIONINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 58 typedef struct __attribute__((packed)) {
59 int64_t timestamp_sec;
60 int64_t timestamp_usec;
69 } HumanoidMotionInterface_data_t;
71 HumanoidMotionInterface_data_t *data;
81 typedef struct __attribute__((packed)) {
82 int64_t timestamp_sec;
83 int64_t timestamp_usec;
86 StopMessage_data_t *data;
96 virtual Message * clone()
const;
103 typedef struct __attribute__((packed)) {
104 int64_t timestamp_sec;
105 int64_t timestamp_usec;
107 } WalkStraightMessage_data_t;
109 WalkStraightMessage_data_t *data;
121 void set_distance(
const float new_distance);
122 size_t maxlenof_distance()
const;
123 virtual Message * clone()
const;
130 typedef struct __attribute__((packed)) {
131 int64_t timestamp_sec;
132 int64_t timestamp_usec;
134 } WalkSidewaysMessage_data_t;
136 WalkSidewaysMessage_data_t *data;
148 void set_distance(
const float new_distance);
149 size_t maxlenof_distance()
const;
150 virtual Message * clone()
const;
157 typedef struct __attribute__((packed)) {
158 int64_t timestamp_sec;
159 int64_t timestamp_usec;
162 } WalkArcMessage_data_t;
164 WalkArcMessage_data_t *data;
176 void set_angle(
const float new_angle);
177 size_t maxlenof_angle()
const;
178 float radius()
const;
179 void set_radius(
const float new_radius);
180 size_t maxlenof_radius()
const;
181 virtual Message * clone()
const;
188 typedef struct __attribute__((packed)) {
189 int64_t timestamp_sec;
190 int64_t timestamp_usec;
203 } WalkVelocityMessage_data_t;
205 WalkVelocityMessage_data_t *data;
210 WalkVelocityMessage(
const float ini_x,
const float ini_y,
const float ini_theta,
const float ini_speed);
217 void set_x(
const float new_x);
218 size_t maxlenof_x()
const;
220 void set_y(
const float new_y);
221 size_t maxlenof_y()
const;
223 void set_theta(
const float new_theta);
224 size_t maxlenof_theta()
const;
226 void set_speed(
const float new_speed);
227 size_t maxlenof_speed()
const;
228 virtual Message * clone()
const;
235 typedef struct __attribute__((packed)) {
236 int64_t timestamp_sec;
237 int64_t timestamp_usec;
239 } TurnMessage_data_t;
241 TurnMessage_data_t *data;
253 void set_angle(
const float new_angle);
254 size_t maxlenof_angle()
const;
255 virtual Message * clone()
const;
262 typedef struct __attribute__((packed)) {
263 int64_t timestamp_sec;
264 int64_t timestamp_usec;
267 } KickMessage_data_t;
269 KickMessage_data_t *data;
274 KickMessage(
const LegEnum ini_leg,
const float ini_strength);
281 void set_leg(
const LegEnum new_leg);
282 size_t maxlenof_leg()
const;
283 float strength()
const;
284 void set_strength(
const float new_strength);
285 size_t maxlenof_strength()
const;
286 virtual Message * clone()
const;
293 typedef struct __attribute__((packed)) {
294 int64_t timestamp_sec;
295 int64_t timestamp_usec;
296 } ParkMessage_data_t;
298 ParkMessage_data_t *data;
308 virtual Message * clone()
const;
315 typedef struct __attribute__((packed)) {
316 int64_t timestamp_sec;
317 int64_t timestamp_usec;
318 } GetUpMessage_data_t;
320 GetUpMessage_data_t *data;
330 virtual Message * clone()
const;
337 typedef struct __attribute__((packed)) {
338 int64_t timestamp_sec;
339 int64_t timestamp_usec;
341 } StandupMessage_data_t;
343 StandupMessage_data_t *data;
354 StandupEnum from_pos()
const;
355 void set_from_pos(
const StandupEnum new_from_pos);
356 size_t maxlenof_from_pos()
const;
357 virtual Message * clone()
const;
364 typedef struct __attribute__((packed)) {
365 int64_t timestamp_sec;
366 int64_t timestamp_usec;
370 } MoveHeadMessage_data_t;
372 MoveHeadMessage_data_t *data;
377 MoveHeadMessage(
const float ini_yaw,
const float ini_pitch,
const float ini_speed);
384 void set_yaw(
const float new_yaw);
385 size_t maxlenof_yaw()
const;
387 void set_pitch(
const float new_pitch);
388 size_t maxlenof_pitch()
const;
390 void set_speed(
const float new_speed);
391 size_t maxlenof_speed()
const;
392 virtual Message * clone()
const;
408 uint32_t
msgid()
const;
409 void set_msgid(
const uint32_t new_msgid);
414 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
uint32_t msgid() const
Get msgid value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
StandupMessage Fawkes BlackBoard Interface Message.
TurnMessage Fawkes BlackBoard Interface Message.
Standup from lying on the back.
virtual Message * create_message(const char *type) const
Create message based on type name.
KickMessage Fawkes BlackBoard Interface Message.
float distance(float x1, float y1, float x2, float y2)
Get distance between two 2D cartesian coordinates.
Fawkes library namespace.
void set_arms_enabled(const bool new_arms_enabled)
Set arms_enabled value.
bool is_moving() const
Get moving value.
size_t maxlenof_msgid() const
Get maximum length of msgid value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
WalkVelocityMessage Fawkes BlackBoard Interface Message.
void set_moving(const bool new_moving)
Set moving value.
GetUpMessage Fawkes BlackBoard Interface Message.
StandupEnum
From which position to standup.
Base class for all Fawkes BlackBoard interfaces.
LegEnum
Type to determinate leg side.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void set_msgid(const uint32_t new_msgid)
Set msgid value.
WalkArcMessage Fawkes BlackBoard Interface Message.
const char * type() const
Get type of interface.
HumanoidMotionInterface Fawkes BlackBoard Interface.
Standup from lying on the tummy.
size_t maxlenof_moving() const
Get maximum length of moving value.
bool is_arms_enabled() const
Get arms_enabled value.
Detect via accelerometer.
WalkSidewaysMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_arms_enabled() const
Get maximum length of arms_enabled value.
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 void copy_values(const Interface *other)
Copy values from other interface.
ParkMessage Fawkes BlackBoard Interface Message.
WalkStraightMessage Fawkes BlackBoard Interface Message.
MoveHeadMessage Fawkes BlackBoard Interface Message.
StopMessage Fawkes BlackBoard Interface Message.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.