24 #ifndef __INTERFACES_MOTORINTERFACE_H_
25 #define __INTERFACES_MOTORINTERFACE_H_
27 #include <interface/interface.h>
28 #include <interface/message.h>
29 #include <interface/field_iterator.h>
53 int64_t timestamp_sec;
54 int64_t timestamp_usec;
100 } MotorInterface_data_t;
103 MotorInterface_data_t *data;
113 int64_t timestamp_sec;
114 int64_t timestamp_usec;
118 } SetMotorStateMessage_data_t;
121 SetMotorStateMessage_data_t *data;
142 int64_t timestamp_sec;
143 int64_t timestamp_usec;
153 } AcquireControlMessage_data_t;
156 AcquireControlMessage_data_t *data;
180 int64_t timestamp_sec;
181 int64_t timestamp_usec;
182 } ResetOdometryMessage_data_t;
185 ResetOdometryMessage_data_t *data;
202 int64_t timestamp_sec;
203 int64_t timestamp_usec;
207 } DriveRPMMessage_data_t;
210 DriveRPMMessage_data_t *data;
213 DriveRPMMessage(
const float ini_front_right,
const float ini_front_left,
const float ini_rear);
226 void set_rear(
const float new_rear);
237 int64_t timestamp_sec;
238 int64_t timestamp_usec;
243 } GotoMessage_data_t;
246 GotoMessage_data_t *data;
249 GotoMessage(
const float ini_x,
const float ini_y,
const float ini_phi,
const float ini_time_sec);
256 void set_x(
const float new_x);
259 void set_y(
const float new_y);
262 void set_phi(
const float new_phi);
276 int64_t timestamp_sec;
277 int64_t timestamp_usec;
280 } TransMessage_data_t;
283 TransMessage_data_t *data;
293 void set_vx(
const float new_vx);
296 void set_vy(
const float new_vy);
307 int64_t timestamp_sec;
308 int64_t timestamp_usec;
313 RotMessage_data_t *data;
334 int64_t timestamp_sec;
335 int64_t timestamp_usec;
339 } TransRotMessage_data_t;
342 TransRotMessage_data_t *data;
345 TransRotMessage(
const float ini_vx,
const float ini_vy,
const float ini_omega);
352 void set_vx(
const float new_vx);
355 void set_vy(
const float new_vy);
369 int64_t timestamp_sec;
370 int64_t timestamp_usec;
374 } OrbitMessage_data_t;
377 OrbitMessage_data_t *data;
380 OrbitMessage(
const float ini_px,
const float ini_py,
const float ini_omega);
387 void set_px(
const float new_px);
390 void set_py(
const float new_py);
404 int64_t timestamp_sec;
405 int64_t timestamp_usec;
409 } LinTransRotMessage_data_t;
412 LinTransRotMessage_data_t *data;
422 void set_vx(
const float new_vx);
425 void set_vy(
const float new_vy);
468 void set_vx(
const float new_vx);
471 void set_vy(
const float new_vy);
485 virtual const char *
enum_tostring(
const char *enumtype,
int val)
const;
~TransMessage()
Destructor.
void set_vy(const float new_vy)
Set vy value.
virtual Message * create_message(const char *type) const
Create message based on type name.
OrbitMessage()
Constructor.
~ResetOdometryMessage()
Destructor.
virtual const char * enum_tostring(const char *enumtype, int val) const
Convert arbitrary enum value to string.
void set_omega(const float new_omega)
Set omega value.
SetMotorStateMessage Fawkes BlackBoard Interface Message.
static const uint32_t DRIVE_MODE_LINE_TRANS_ROT
DRIVE_MODE_LINE_TRANS_ROT constant.
DriveRPMMessage()
Constructor.
RotMessage Fawkes BlackBoard Interface Message.
size_t maxlenof_left_rpm() const
Get maximum length of left_rpm value.
float py() const
Get py value.
Base class for all messages passed through interfaces in Fawkes BlackBoard.
virtual Message * clone() const
Clone this message.
float omega() const
Get omega value.
static const uint32_t MOTOR_ENABLED
MOTOR_ENABLED constant.
void set_rear(const float new_rear)
Set rear value.
float px() const
Get px value.
size_t maxlenof_odometry_path_length() const
Get maximum length of odometry_path_length value.
static const uint32_t DRIVE_MODE_RPM
DRIVE_MODE_RPM constant.
void set_omega(const float new_omega)
Set omega value.
float x() const
Get x value.
void set_vx(const float new_vx)
Set vx value.
size_t maxlenof_y() const
Get maximum length of y value.
TransRotMessage Fawkes BlackBoard Interface Message.
float phi() const
Get phi value.
size_t maxlenof_motor_state() const
Get maximum length of motor_state value.
uint32_t controller() const
Get controller value.
int32_t rear_rpm() const
Get rear_rpm value.
float vy() const
Get vy value.
virtual Message * clone() const
Clone this message.
void set_odometry_position_y(const float new_odometry_position_y)
Set odometry_position_y value.
~AcquireControlMessage()
Destructor.
size_t maxlenof_omega() const
Get maximum length of omega value.
size_t maxlenof_px() const
Get maximum length of px value.
size_t maxlenof_vy() const
Get maximum length of vy value.
TransMessage()
Constructor.
void set_controller(const uint32_t new_controller)
Set controller value.
size_t maxlenof_drive_mode() const
Get maximum length of drive_mode value.
float rear() const
Get rear value.
float time_sec() const
Get time_sec value.
float vx() const
Get vx value.
size_t maxlenof_front_left() const
Get maximum length of front_left value.
void set_vy(const float new_vy)
Set vy value.
void set_motor_state(const uint32_t new_motor_state)
Set motor_state value.
void set_vy(const float new_vy)
Set vy value.
size_t maxlenof_motor_state() const
Get maximum length of motor_state value.
virtual Message * clone() const
Clone this message.
~TransRotMessage()
Destructor.
void set_controller(const uint32_t new_controller)
Set controller value.
void set_odometry_orientation(const float new_odometry_orientation)
Set odometry_orientation value.
void set_rear_rpm(const int32_t new_rear_rpm)
Set rear_rpm value.
void set_front_right(const float new_front_right)
Set front_right value.
ResetOdometryMessage()
Constructor.
OrbitMessage Fawkes BlackBoard Interface Message.
void set_motor_state(const uint32_t new_motor_state)
Set motor_state value.
char * controller_thread_name() const
Get controller_thread_name value.
Base class for all Fawkes BlackBoard interfaces.
uint32_t motor_state() const
Get motor_state value.
AcquireControlMessage()
Constructor.
void set_time_sec(const float new_time_sec)
Set time_sec value.
float odometry_orientation() const
Get odometry_orientation value.
void set_omega(const float new_omega)
Set omega value.
size_t maxlenof_vy() const
Get maximum length of vy value.
void set_right_rpm(const int32_t new_right_rpm)
Set right_rpm value.
void set_left_rpm(const int32_t new_left_rpm)
Set left_rpm value.
float omega() const
Get omega value.
float vy() const
Get vy value.
~SetMotorStateMessage()
Destructor.
ResetOdometryMessage Fawkes BlackBoard Interface Message.
void set_odometry_path_length(const float new_odometry_path_length)
Set odometry_path_length value.
AcquireControlMessage Fawkes BlackBoard Interface Message.
float omega() const
Get omega value.
LinTransRotMessage()
Constructor.
char * controller_thread_name() const
Get controller_thread_name value.
size_t maxlenof_vx() const
Get maximum length of vx value.
virtual Message * clone() const
Clone this message.
float front_right() const
Get front_right value.
size_t maxlenof_odometry_orientation() const
Get maximum length of odometry_orientation value.
static const uint32_t DRIVE_MODE_TRANS_ROT
DRIVE_MODE_TRANS_ROT constant.
float front_left() const
Get front_left value.
~OrbitMessage()
Destructor.
float odometry_position_y() const
Get odometry_position_y value.
size_t maxlenof_controller_thread_name() const
Get maximum length of controller_thread_name value.
void set_vy(const float new_vy)
Set vy value.
size_t maxlenof_omega() const
Get maximum length of omega value.
void set_phi(const float new_phi)
Set phi value.
float vy() const
Get vy value.
void set_vx(const float new_vx)
Set vx value.
size_t maxlenof_omega() const
Get maximum length of omega value.
void set_omega(const float new_omega)
Set omega value.
size_t maxlenof_vx() const
Get maximum length of vx value.
void set_py(const float new_py)
Set py value.
float y() const
Get y value.
static const uint32_t DRIVE_MODE_TRANS
DRIVE_MODE_TRANS constant.
void set_omega(const float new_omega)
Set omega value.
size_t maxlenof_x() const
Get maximum length of x value.
float vx() const
Get vx value.
virtual Message * clone() const
Clone this message.
void set_front_left(const float new_front_left)
Set front_left value.
size_t maxlenof_vy() const
Get maximum length of vy value.
int32_t left_rpm() const
Get left_rpm value.
~LinTransRotMessage()
Destructor.
~DriveRPMMessage()
Destructor.
size_t maxlenof_vx() const
Get maximum length of vx value.
void set_controller_thread_name(const char *new_controller_thread_name)
Set controller_thread_name value.
float vy() const
Get vy value.
LinTransRotMessage Fawkes BlackBoard Interface Message.
GotoMessage()
Constructor.
void set_px(const float new_px)
Set px value.
virtual Message * clone() const
Clone this message.
uint32_t drive_mode() const
Get drive_mode value.
SetMotorStateMessage()
Constructor.
size_t maxlenof_omega() const
Get maximum length of omega value.
size_t maxlenof_time_sec() const
Get maximum length of time_sec value.
float omega() const
Get omega value.
size_t maxlenof_front_right() const
Get maximum length of front_right value.
size_t maxlenof_phi() const
Get maximum length of phi value.
virtual Message * clone() const
Clone this message.
DriveRPMMessage Fawkes BlackBoard Interface Message.
float omega() const
Get omega value.
void set_drive_mode(const uint32_t new_drive_mode)
Set drive_mode value.
size_t maxlenof_vx() const
Get maximum length of vx value.
void set_vx(const float new_vx)
Set vx value.
void set_vx(const float new_vx)
Set vx value.
float vx() const
Get vx value.
virtual Message * clone() const
Clone this message.
float odometry_path_length() const
Get odometry_path_length value.
virtual Message * clone() const
Clone this message.
size_t maxlenof_rear_rpm() const
Get maximum length of rear_rpm value.
size_t maxlenof_odometry_position_y() const
Get maximum length of odometry_position_y value.
static const uint32_t MOTOR_DISABLED
MOTOR_DISABLED constant.
size_t maxlenof_rear() const
Get maximum length of rear value.
void set_odometry_position_x(const float new_odometry_position_x)
Set odometry_position_x value.
uint32_t controller() const
Get controller value.
size_t maxlenof_controller_thread_name() const
Get maximum length of controller_thread_name value.
size_t maxlenof_controller() const
Get maximum length of controller value.
static const uint32_t DRIVE_MODE_ORBIT
DRIVE_MODE_ORBIT constant.
size_t maxlenof_controller() const
Get maximum length of controller value.
MotorInterface Fawkes BlackBoard Interface.
size_t maxlenof_omega() const
Get maximum length of omega value.
TransRotMessage()
Constructor.
float odometry_position_x() const
Get odometry_position_x value.
GotoMessage Fawkes BlackBoard Interface Message.
~GotoMessage()
Destructor.
const char * type() const
Get type of interface.
int32_t right_rpm() const
Get right_rpm value.
void set_controller_thread_name(const char *new_controller_thread_name)
Set controller_thread_name value.
void set_x(const float new_x)
Set x value.
size_t maxlenof_odometry_position_x() const
Get maximum length of odometry_position_x value.
size_t maxlenof_vy() const
Get maximum length of vy value.
static const uint32_t DRIVE_MODE_ROT
DRIVE_MODE_ROT constant.
virtual void copy_values(const Interface *other)
Copy values from other interface.
uint32_t motor_state() const
Get motor_state value.
virtual bool message_valid(const Message *message) const
Check if message is valid and can be enqueued.
TransMessage Fawkes BlackBoard Interface Message.
float vx() const
Get vx value.
size_t maxlenof_py() const
Get maximum length of py value.
size_t maxlenof_right_rpm() const
Get maximum length of right_rpm value.
void set_y(const float new_y)
Set y value.
virtual Message * clone() const
Clone this message.