24 #ifndef __INTERFACES_NAOJOINTPOSITIONINTERFACE_H_ 25 #define __INTERFACES_NAOJOINTPOSITIONINTERFACE_H_ 27 #include <interface/interface.h> 28 #include <interface/message.h> 29 #include <interface/field_iterator.h> 85 typedef struct __attribute__((packed)) {
86 int64_t timestamp_sec;
87 int64_t timestamp_usec;
125 } NaoJointPositionInterface_data_t;
127 NaoJointPositionInterface_data_t *data;
136 typedef struct __attribute__((packed)) {
137 int64_t timestamp_sec;
138 int64_t timestamp_usec;
148 } SetServoMessage_data_t;
150 SetServoMessage_data_t *data;
154 SetServoMessage(
const uint32_t ini_servo,
const float ini_value,
const int32_t ini_time);
160 uint32_t servo()
const;
161 void set_servo(
const uint32_t new_servo);
162 size_t maxlenof_servo()
const;
164 void set_value(
const float new_value);
165 size_t maxlenof_value()
const;
166 int32_t
time()
const;
167 void set_time(
const int32_t new_time);
169 virtual Message * clone()
const;
176 typedef struct __attribute__((packed)) {
177 int64_t timestamp_sec;
178 int64_t timestamp_usec;
210 } SetServosMessage_data_t;
212 SetServosMessage_data_t *data;
216 SetServosMessage(
const float ini_head_yaw,
const float ini_head_pitch,
const float ini_l_shoulder_pitch,
const float ini_l_shoulder_roll,
const float ini_l_elbow_yaw,
const float ini_l_elbow_roll,
const float ini_l_hip_yaw_pitch,
const float ini_l_hip_roll,
const float ini_l_hip_pitch,
const float ini_l_knee_pitch,
const float ini_l_ankle_pitch,
const float ini_l_ankle_roll,
const float ini_l_wrist_yaw,
const float ini_l_hand,
const float ini_r_shoulder_pitch,
const float ini_r_shoulder_roll,
const float ini_r_elbow_yaw,
const float ini_r_elbow_roll,
const float ini_r_wrist_yaw,
const float ini_r_hand,
const float ini_r_hip_yaw_pitch,
const float ini_r_hip_roll,
const float ini_r_hip_pitch,
const float ini_r_knee_pitch,
const float ini_r_ankle_pitch,
const float ini_r_ankle_roll,
const int32_t ini_time);
300 int32_t
time()
const;
301 void set_time(
const int32_t new_time);
303 virtual Message * clone()
const;
310 typedef struct __attribute__((packed)) {
311 int64_t timestamp_sec;
312 int64_t timestamp_usec;
322 } MoveServoMessage_data_t;
324 MoveServoMessage_data_t *data;
328 MoveServoMessage(
const uint32_t ini_servo,
const float ini_value,
const float ini_speed);
334 uint32_t servo()
const;
335 void set_servo(
const uint32_t new_servo);
336 size_t maxlenof_servo()
const;
338 void set_value(
const float new_value);
339 size_t maxlenof_value()
const;
341 void set_speed(
const float new_speed);
342 size_t maxlenof_speed()
const;
343 virtual Message * clone()
const;
350 typedef struct __attribute__((packed)) {
351 int64_t timestamp_sec;
352 int64_t timestamp_usec;
382 } MoveServosMessage_data_t;
384 MoveServosMessage_data_t *data;
388 MoveServosMessage(
const float ini_speed,
const float ini_head_yaw,
const float ini_head_pitch,
const float ini_l_shoulder_pitch,
const float ini_l_shoulder_roll,
const float ini_l_elbow_yaw,
const float ini_l_elbow_roll,
const float ini_l_wrist_yaw,
const float ini_l_hand,
const float ini_l_hip_yaw_pitch,
const float ini_l_hip_roll,
const float ini_l_hip_pitch,
const float ini_l_knee_pitch,
const float ini_l_ankle_pitch,
const float ini_l_ankle_roll,
const float ini_r_shoulder_pitch,
const float ini_r_shoulder_roll,
const float ini_r_elbow_yaw,
const float ini_r_elbow_roll,
const float ini_r_wrist_yaw,
const float ini_r_hand,
const float ini_r_hip_yaw_pitch,
const float ini_r_hip_roll,
const float ini_r_hip_pitch,
const float ini_r_knee_pitch,
const float ini_r_ankle_pitch,
const float ini_r_ankle_roll);
395 void set_speed(
const float new_speed);
396 size_t maxlenof_speed()
const;
475 virtual Message * clone()
const;
571 int32_t
time()
const;
572 void set_time(
const int32_t new_time);
577 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
static const uint32_t SERVO_l_shoulder_roll
SERVO_l_shoulder_roll constant.
void set_robot_version(unsigned int index, const uint8_t new_robot_version)
Set robot_version value at given index.
size_t maxlenof_r_knee_pitch() const
Get maximum length of r_knee_pitch value.
RoboCup version with 21 DoF.
size_t maxlenof_l_ankle_roll() const
Get maximum length of l_ankle_roll value.
NaoJointPositionInterface Fawkes BlackBoard Interface.
static const uint32_t SERVO_l_ankle_roll
SERVO_l_ankle_roll constant.
void set_l_ankle_roll(const float new_l_ankle_roll)
Set l_ankle_roll value.
SetServoMessage Fawkes BlackBoard Interface Message.
static const uint32_t SERVO_min
SERVO_min constant.
size_t maxlenof_r_ankle_pitch() const
Get maximum length of r_ankle_pitch value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
size_t maxlenof_l_ankle_pitch() const
Get maximum length of l_ankle_pitch value.
void set_r_shoulder_pitch(const float new_r_shoulder_pitch)
Set r_shoulder_pitch value.
void set_l_shoulder_roll(const float new_l_shoulder_roll)
Set l_shoulder_roll value.
static const uint32_t SERVO_l_hip_yaw_pitch
SERVO_l_hip_yaw_pitch constant.
float l_knee_pitch() const
Get l_knee_pitch value.
int32_t time() const
Get time value.
SetServosMessage Fawkes BlackBoard Interface Message.
float l_shoulder_pitch() const
Get l_shoulder_pitch value.
static const uint32_t SERVO_r_hip_roll
SERVO_r_hip_roll constant.
void set_l_elbow_yaw(const float new_l_elbow_yaw)
Set l_elbow_yaw value.
size_t maxlenof_time() const
Get maximum length of time value.
const char * tostring_RobotType(RobotType value) const
Convert RobotType constant to string.
static const uint32_t SERVO_max
SERVO_max constant.
Fawkes library namespace.
size_t maxlenof_r_ankle_roll() const
Get maximum length of r_ankle_roll value.
static const uint32_t SERVO_l_wrist_yaw
SERVO_l_wrist_yaw constant.
void set_r_hip_yaw_pitch(const float new_r_hip_yaw_pitch)
Set r_hip_yaw_pitch value.
float r_shoulder_roll() const
Get r_shoulder_roll value.
size_t maxlenof_l_hip_pitch() const
Get maximum length of l_hip_pitch value.
size_t maxlenof_l_elbow_roll() const
Get maximum length of l_elbow_roll value.
size_t maxlenof_r_elbow_roll() const
Get maximum length of r_elbow_roll value.
size_t maxlenof_head_yaw() const
Get maximum length of head_yaw value.
void set_r_ankle_roll(const float new_r_ankle_roll)
Set r_ankle_roll value.
MoveServosMessage Fawkes BlackBoard Interface Message.
RobotType robot_type() const
Get robot_type value.
float head_yaw() const
Get head_yaw value.
size_t maxlenof_head_pitch() const
Get maximum length of head_pitch value.
float l_elbow_yaw() const
Get l_elbow_yaw value.
void set_r_elbow_yaw(const float new_r_elbow_yaw)
Set r_elbow_yaw value.
float r_elbow_yaw() const
Get r_elbow_yaw value.
static const uint32_t SERVO_l_elbow_yaw
SERVO_l_elbow_yaw constant.
void set_head_pitch(const float new_head_pitch)
Set head_pitch value.
size_t maxlenof_l_elbow_yaw() const
Get maximum length of l_elbow_yaw value.
size_t maxlenof_r_wrist_yaw() const
Get maximum length of r_wrist_yaw value.
Base class for all Fawkes BlackBoard interfaces.
virtual Message * create_message(const char *type) const
Create message based on type name.
float r_hand() const
Get r_hand value.
void set_l_wrist_yaw(const float new_l_wrist_yaw)
Set l_wrist_yaw value.
size_t maxlenof_l_hip_yaw_pitch() const
Get maximum length of l_hip_yaw_pitch value.
size_t maxlenof_r_elbow_yaw() const
Get maximum length of r_elbow_yaw value.
Academic version with 25 DoF and touch sensors.
float l_hip_pitch() const
Get l_hip_pitch value.
static const uint32_t SERVO_l_ankle_pitch
SERVO_l_ankle_pitch constant.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
static const uint32_t SERVO_l_shoulder_pitch
SERVO_l_shoulder_pitch constant.
void set_l_ankle_pitch(const float new_l_ankle_pitch)
Set l_ankle_pitch value.
float l_wrist_yaw() const
Get l_wrist_yaw value.
size_t maxlenof_r_shoulder_pitch() const
Get maximum length of r_shoulder_pitch value.
float r_ankle_roll() const
Get r_ankle_roll value.
void set_l_hip_pitch(const float new_l_hip_pitch)
Set l_hip_pitch value.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void set_l_elbow_roll(const float new_l_elbow_roll)
Set l_elbow_roll value.
float r_knee_pitch() const
Get r_knee_pitch value.
static const uint32_t SERVO_l_knee_pitch
SERVO_l_knee_pitch constant.
const char * type() const
Get type of interface.
static const uint32_t SERVO_r_hand
SERVO_r_hand constant.
static const uint32_t SERVO_r_ankle_roll
SERVO_r_ankle_roll constant.
float head_pitch() const
Get head_pitch value.
size_t maxlenof_r_hip_yaw_pitch() const
Get maximum length of r_hip_yaw_pitch value.
size_t maxlenof_l_hand() const
Get maximum length of l_hand value.
void set_r_hip_roll(const float new_r_hip_roll)
Set r_hip_roll value.
float l_ankle_roll() const
Get l_ankle_roll value.
void set_robot_type(const RobotType new_robot_type)
Set robot_type value.
float r_wrist_yaw() const
Get r_wrist_yaw value.
float r_hip_yaw_pitch() const
Get r_hip_yaw_pitch value.
float l_shoulder_roll() const
Get l_shoulder_roll value.
void set_l_shoulder_pitch(const float new_l_shoulder_pitch)
Set l_shoulder_pitch value.
void set_r_hip_pitch(const float new_r_hip_pitch)
Set r_hip_pitch value.
size_t maxlenof_l_knee_pitch() const
Get maximum length of l_knee_pitch value.
void set_r_ankle_pitch(const float new_r_ankle_pitch)
Set r_ankle_pitch value.
void set_l_hip_yaw_pitch(const float new_l_hip_yaw_pitch)
Set l_hip_yaw_pitch value.
static const uint32_t SERVO_r_ankle_pitch
SERVO_r_ankle_pitch constant.
static const uint32_t SERVO_r_elbow_yaw
SERVO_r_elbow_yaw constant.
uint8_t * robot_version() const
Get robot_version value.
static const uint32_t SERVO_l_elbow_roll
SERVO_l_elbow_roll constant.
size_t maxlenof_l_shoulder_pitch() const
Get maximum length of l_shoulder_pitch value.
static const uint32_t SERVO_r_knee_pitch
SERVO_r_knee_pitch constant.
static const uint32_t SERVO_l_hand
SERVO_l_hand constant.
static const uint32_t SERVO_r_elbow_roll
SERVO_r_elbow_roll constant.
static const uint32_t SERVO_r_shoulder_pitch
SERVO_r_shoulder_pitch constant.
static const uint32_t SERVO_head_pitch
SERVO_head_pitch constant.
void set_r_elbow_roll(const float new_r_elbow_roll)
Set r_elbow_roll value.
float r_hip_pitch() const
Get r_hip_pitch value.
static const uint32_t SERVO_l_hip_pitch
SERVO_l_hip_pitch constant.
size_t maxlenof_r_shoulder_roll() const
Get maximum length of r_shoulder_roll value.
float l_elbow_roll() const
Get l_elbow_roll value.
void set_r_knee_pitch(const float new_r_knee_pitch)
Set r_knee_pitch value.
float l_ankle_pitch() const
Get l_ankle_pitch value.
float r_hip_roll() const
Get r_hip_roll value.
float r_elbow_roll() const
Get r_elbow_roll value.
size_t maxlenof_r_hand() const
Get maximum length of r_hand value.
void set_l_hand(const float new_l_hand)
Set l_hand value.
MoveServoMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_l_shoulder_roll() const
Get maximum length of l_shoulder_roll value.
void set_r_shoulder_roll(const float new_r_shoulder_roll)
Set r_shoulder_roll value.
static const uint32_t SERVO_r_hip_pitch
SERVO_r_hip_pitch constant.
static const uint32_t SERVO_r_hip_yaw_pitch
SERVO_r_hip_yaw_pitch constant.
size_t maxlenof_l_wrist_yaw() const
Get maximum length of l_wrist_yaw value.
static const uint32_t SERVO_r_wrist_yaw
SERVO_r_wrist_yaw constant.
size_t maxlenof_robot_version() const
Get maximum length of robot_version value.
void set_l_hip_roll(const float new_l_hip_roll)
Set l_hip_roll value.
size_t maxlenof_l_hip_roll() const
Get maximum length of l_hip_roll value.
void set_l_knee_pitch(const float new_l_knee_pitch)
Set l_knee_pitch value.
void set_r_wrist_yaw(const float new_r_wrist_yaw)
Set r_wrist_yaw value.
virtual void copy_values(const Interface *other)
Copy values from other interface.
float r_shoulder_pitch() const
Get r_shoulder_pitch value.
float r_ankle_pitch() const
Get r_ankle_pitch value.
void set_time(const int32_t new_time)
Set time value.
static const uint32_t SERVO_head_yaw
SERVO_head_yaw constant.
std::map< int, std::string > interface_enum_map_t
Map of enum integer to string values.
static const uint32_t SERVO_l_hip_roll
SERVO_l_hip_roll constant.
size_t maxlenof_r_hip_roll() const
Get maximum length of r_hip_roll value.
static const uint32_t SERVO_r_shoulder_roll
SERVO_r_shoulder_roll constant.
void set_r_hand(const float new_r_hand)
Set r_hand value.
void set_head_yaw(const float new_head_yaw)
Set head_yaw value.
float l_hip_yaw_pitch() const
Get l_hip_yaw_pitch value.
size_t maxlenof_robot_type() const
Get maximum length of robot_type value.
RobotType
Enumeration describing the actual version of the robot that's being used.
float l_hip_roll() const
Get l_hip_roll value.
size_t maxlenof_r_hip_pitch() const
Get maximum length of r_hip_pitch value.
float l_hand() const
Get l_hand value.