Fawkes API Fawkes Development Version
|
KatanaInterface Fawkes BlackBoard Interface. More...
#include <>>
Classes | |
class | CalibrateMessage |
CalibrateMessage Fawkes BlackBoard Interface Message. More... | |
class | CloseGripperMessage |
CloseGripperMessage Fawkes BlackBoard Interface Message. More... | |
class | FlushMessage |
FlushMessage Fawkes BlackBoard Interface Message. More... | |
struct | KatanaInterface_data_t |
Internal data storage, do NOT modify! | |
class | LinearGotoMessage |
LinearGotoMessage Fawkes BlackBoard Interface Message. More... | |
class | OpenGripperMessage |
OpenGripperMessage Fawkes BlackBoard Interface Message. More... | |
class | ParkMessage |
ParkMessage Fawkes BlackBoard Interface Message. More... | |
class | SetEnabledMessage |
SetEnabledMessage Fawkes BlackBoard Interface Message. More... | |
class | SetMaxVelocityMessage |
SetMaxVelocityMessage Fawkes BlackBoard Interface Message. More... | |
class | StopMessage |
StopMessage Fawkes BlackBoard Interface Message. More... | |
Public Member Functions | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. | |
uint8_t * | sensor_value () const |
Get sensor_value value. | |
uint8_t | sensor_value (unsigned int index) const |
Get sensor_value value at given index. | |
void | set_sensor_value (unsigned int index, const uint8_t new_sensor_value) |
Set sensor_value value at given index. | |
void | set_sensor_value (const uint8_t *new_sensor_value) |
Set sensor_value value. | |
size_t | maxlenof_sensor_value () const |
Get maximum length of sensor_value value. | |
float | x () const |
Get x value. | |
void | set_x (const float new_x) |
Set x value. | |
size_t | maxlenof_x () const |
Get maximum length of x value. | |
float | y () const |
Get y value. | |
void | set_y (const float new_y) |
Set y value. | |
size_t | maxlenof_y () const |
Get maximum length of y value. | |
float | z () const |
Get z value. | |
void | set_z (const float new_z) |
Set z value. | |
size_t | maxlenof_z () const |
Get maximum length of z value. | |
float | phi () const |
Get phi value. | |
void | set_phi (const float new_phi) |
Set phi value. | |
size_t | maxlenof_phi () const |
Get maximum length of phi value. | |
float | theta () const |
Get theta value. | |
void | set_theta (const float new_theta) |
Set theta value. | |
size_t | maxlenof_theta () const |
Get maximum length of theta value. | |
float | psi () const |
Get psi value. | |
void | set_psi (const float new_psi) |
Set psi value. | |
size_t | maxlenof_psi () const |
Get maximum length of psi 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. | |
bool | is_final () const |
Get final value. | |
void | set_final (const bool new_final) |
Set final value. | |
size_t | maxlenof_final () const |
Get maximum length of final value. | |
uint32_t | error_code () const |
Get error_code value. | |
void | set_error_code (const uint32_t new_error_code) |
Set error_code value. | |
size_t | maxlenof_error_code () const |
Get maximum length of error_code value. | |
bool | is_enabled () const |
Get enabled value. | |
void | set_enabled (const bool new_enabled) |
Set enabled value. | |
size_t | maxlenof_enabled () const |
Get maximum length of enabled value. | |
bool | is_calibrated () const |
Get calibrated value. | |
void | set_calibrated (const bool new_calibrated) |
Set calibrated value. | |
size_t | maxlenof_calibrated () const |
Get maximum length of calibrated value. | |
uint8_t | max_velocity () const |
Get max_velocity value. | |
void | set_max_velocity (const uint8_t new_max_velocity) |
Set max_velocity value. | |
size_t | maxlenof_max_velocity () const |
Get maximum length of max_velocity value. | |
uint8_t | num_motors () const |
Get num_motors value. | |
void | set_num_motors (const uint8_t new_num_motors) |
Set num_motors value. | |
size_t | maxlenof_num_motors () const |
Get maximum length of num_motors 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. | |
Static Public Attributes | |
static const uint32_t | SENSOR_IR_RIGHT_INNER_MIDDLE = 0u |
SENSOR_IR_RIGHT_INNER_MIDDLE constant. | |
static const uint32_t | SENSOR_IR_RIGHT_INNER_FRONT = 1u |
SENSOR_IR_RIGHT_INNER_FRONT constant. | |
static const uint32_t | SENSOR_RESERVED_2 = 2u |
SENSOR_RESERVED_2 constant. | |
static const uint32_t | SENSOR_COND_BOTH = 3u |
SENSOR_COND_BOTH constant. | |
static const uint32_t | SENSOR_IR_RIGHT_OUTER_FRONT = 4u |
SENSOR_IR_RIGHT_OUTER_FRONT constant. | |
static const uint32_t | SENSOR_IR_RIGHT_BOTTOM_FRONT = 5u |
SENSOR_IR_RIGHT_BOTTOM_FRONT constant. | |
static const uint32_t | SENSOR_FORCE_RIGHT_REAR = 6u |
SENSOR_FORCE_RIGHT_REAR constant. | |
static const uint32_t | SENSOR_FORCE_RIGHT_FRONT = 7u |
SENSOR_FORCE_RIGHT_FRONT constant. | |
static const uint32_t | SENSOR_IR_LEFT_INNER_MIDDLE = 8u |
SENSOR_IR_LEFT_INNER_MIDDLE constant. | |
static const uint32_t | SENSOR_IR_LEFT_INNER_FRONT = 9u |
SENSOR_IR_LEFT_INNER_FRONT constant. | |
static const uint32_t | SENSOR_RESERVED_10 = 10u |
SENSOR_RESERVED_10 constant. | |
static const uint32_t | SENSOR_IR_CENTER_GRIPPER = 11u |
SENSOR_IR_CENTER_GRIPPER constant. | |
static const uint32_t | SENSOR_IR_LEFT_OUTER_FRONT = 12u |
SENSOR_IR_LEFT_OUTER_FRONT constant. | |
static const uint32_t | SENSOR_IR_LEFT_BOTTOM_FRONT = 13u |
SENSOR_IR_LEFT_BOTTOM_FRONT constant. | |
static const uint32_t | SENSOR_FORCE_LEFT_REAR = 14u |
SENSOR_FORCE_LEFT_REAR constant. | |
static const uint32_t | SENSOR_FORCE_LEFT_FRONT = 15u |
SENSOR_FORCE_LEFT_FRONT constant. | |
static const uint32_t | ERROR_NONE = 0u |
ERROR_NONE constant. | |
static const uint32_t | ERROR_UNSPECIFIC = 1u |
ERROR_UNSPECIFIC constant. | |
static const uint32_t | ERROR_CMD_START_FAILED = 2u |
ERROR_CMD_START_FAILED constant. | |
static const uint32_t | ERROR_NO_SOLUTION = 4u |
ERROR_NO_SOLUTION constant. | |
static const uint32_t | ERROR_COMMUNICATION = 8u |
ERROR_COMMUNICATION constant. | |
static const uint32_t | ERROR_MOTOR_CRASHED = 16u |
ERROR_MOTOR_CRASHED constant. |
KatanaInterface Fawkes BlackBoard Interface.
Interface to access component providing access to a Neuronics Katana arm.
Definition at line 33 of file KatanaInterface.h.
void fawkes::KatanaInterface::copy_values | ( | const Interface * | other | ) | [virtual] |
Copy values from other interface.
other | other interface to copy values from |
Implements fawkes::Interface.
Definition at line 642 of file KatanaInterface.cpp.
References fawkes::Interface::type().
Message * fawkes::KatanaInterface::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 611 of file KatanaInterface.cpp.
const char * fawkes::KatanaInterface::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 653 of file KatanaInterface.cpp.
uint32_t fawkes::KatanaInterface::error_code | ( | ) | const |
Get error_code value.
Failure code set if final is true. 0 if no error occured, an error code from ERROR_* constants otherwise (or a bit-wise combination).
Definition at line 457 of file KatanaInterface.cpp.
bool fawkes::KatanaInterface::is_calibrated | ( | ) | const |
Get calibrated value.
Has arm been calibrated?
Definition at line 521 of file KatanaInterface.cpp.
bool fawkes::KatanaInterface::is_enabled | ( | ) | const |
Get enabled value.
Are motors enabled?
Definition at line 490 of file KatanaInterface.cpp.
bool fawkes::KatanaInterface::is_final | ( | ) | const |
Get final value.
True, if the last goto command has been finished, false if it is still running
Definition at line 423 of file KatanaInterface.cpp.
uint8_t fawkes::KatanaInterface::max_velocity | ( | ) | const |
Get max_velocity value.
Maximum velocity
Definition at line 552 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_calibrated | ( | ) | const |
Get maximum length of calibrated value.
Definition at line 531 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_enabled | ( | ) | const |
Get maximum length of enabled value.
Definition at line 500 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_error_code | ( | ) | const |
Get maximum length of error_code value.
Definition at line 467 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_final | ( | ) | const |
Get maximum length of final value.
Definition at line 433 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_max_velocity | ( | ) | const |
Get maximum length of max_velocity value.
Definition at line 562 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_msgid | ( | ) | const |
Get maximum length of msgid value.
Definition at line 400 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_num_motors | ( | ) | const |
Get maximum length of num_motors value.
Definition at line 593 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_phi | ( | ) | const |
Get maximum length of phi value.
Definition at line 306 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_psi | ( | ) | const |
Get maximum length of psi value.
Definition at line 368 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_sensor_value | ( | ) | const |
Get maximum length of sensor_value value.
Definition at line 161 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_theta | ( | ) | const |
Get maximum length of theta value.
Definition at line 337 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_x | ( | ) | const |
Get maximum length of x value.
Definition at line 208 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_y | ( | ) | const |
Get maximum length of y value.
Definition at line 241 of file KatanaInterface.cpp.
size_t fawkes::KatanaInterface::maxlenof_z | ( | ) | const |
Get maximum length of z value.
Definition at line 274 of file KatanaInterface.cpp.
bool fawkes::KatanaInterface::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 1386 of file KatanaInterface.cpp.
uint32_t fawkes::KatanaInterface::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 390 of file KatanaInterface.cpp.
uint8_t fawkes::KatanaInterface::num_motors | ( | ) | const |
Get num_motors value.
Number of motors
Definition at line 583 of file KatanaInterface.cpp.
float fawkes::KatanaInterface::phi | ( | ) | const |
Get phi value.
Euler angle Phi of tool orientation.
Definition at line 296 of file KatanaInterface.cpp.
float fawkes::KatanaInterface::psi | ( | ) | const |
Get psi value.
Euler angle Psi of tool orientation..
Definition at line 358 of file KatanaInterface.cpp.
uint8_t * fawkes::KatanaInterface::sensor_value | ( | ) | const |
Get sensor_value value.
Sensor values. Use SENSOR_* indexes for accessing the values.
Definition at line 135 of file KatanaInterface.cpp.
uint8_t fawkes::KatanaInterface::sensor_value | ( | unsigned int | index | ) | const |
Get sensor_value value at given index.
Sensor values. Use SENSOR_* indexes for accessing the values.
index | index of value |
Exception | thrown if index is out of bounds |
Definition at line 148 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_calibrated | ( | const bool | new_calibrated | ) |
Set calibrated value.
Has arm been calibrated?
new_calibrated | new calibrated value |
Definition at line 541 of file KatanaInterface.cpp.
Referenced by KatanaActThread::loop().
void fawkes::KatanaInterface::set_enabled | ( | const bool | new_enabled | ) |
Set enabled value.
Are motors enabled?
new_enabled | new enabled value |
Definition at line 510 of file KatanaInterface.cpp.
Referenced by KatanaActThread::loop().
void fawkes::KatanaInterface::set_error_code | ( | const uint32_t | new_error_code | ) |
Set error_code value.
Failure code set if final is true. 0 if no error occured, an error code from ERROR_* constants otherwise (or a bit-wise combination).
new_error_code | new error_code value |
Definition at line 479 of file KatanaInterface.cpp.
Referenced by KatanaActThread::loop().
void fawkes::KatanaInterface::set_final | ( | const bool | new_final | ) |
Set final value.
True, if the last goto command has been finished, false if it is still running
new_final | new final value |
Definition at line 444 of file KatanaInterface.cpp.
Referenced by KatanaActThread::loop().
void fawkes::KatanaInterface::set_max_velocity | ( | const uint8_t | new_max_velocity | ) |
Set max_velocity value.
Maximum velocity
new_max_velocity | new max_velocity value |
Definition at line 572 of file KatanaInterface.cpp.
Referenced by KatanaActThread::loop().
void fawkes::KatanaInterface::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 411 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_num_motors | ( | const uint8_t | new_num_motors | ) |
Set num_motors value.
Number of motors
new_num_motors | new num_motors value |
Definition at line 603 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_phi | ( | const float | new_phi | ) |
Set phi value.
Euler angle Phi of tool orientation.
new_phi | new phi value |
Definition at line 316 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_psi | ( | const float | new_psi | ) |
Set psi value.
Euler angle Psi of tool orientation..
new_psi | new psi value |
Definition at line 378 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_sensor_value | ( | const uint8_t * | new_sensor_value | ) |
Set sensor_value value.
Sensor values. Use SENSOR_* indexes for accessing the values.
new_sensor_value | new sensor_value value |
Definition at line 172 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_sensor_value | ( | unsigned int | index, |
const uint8_t | new_sensor_value | ||
) |
Set sensor_value value at given index.
Sensor values. Use SENSOR_* indexes for accessing the values.
new_sensor_value | new sensor_value value |
index | index for of the value |
Definition at line 185 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_theta | ( | const float | new_theta | ) |
Set theta value.
Euler angle Theta of tool orientation.
new_theta | new theta value |
Definition at line 347 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_x | ( | const float | new_x | ) |
Set x value.
X-Coordinate for tool position compared to base coordinate system.
new_x | new x value |
Definition at line 219 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_y | ( | const float | new_y | ) |
Set y value.
Y-Coordinate for tool position compared to base coordinate system.
new_y | new y value |
Definition at line 252 of file KatanaInterface.cpp.
void fawkes::KatanaInterface::set_z | ( | const float | new_z | ) |
Set z value.
Z-Coordinate for tool position compared to base coordinate system.
new_z | new z value |
Definition at line 285 of file KatanaInterface.cpp.
float fawkes::KatanaInterface::theta | ( | ) | const |
Get theta value.
Euler angle Theta of tool orientation.
Definition at line 327 of file KatanaInterface.cpp.
float fawkes::KatanaInterface::x | ( | ) | const |
Get x value.
X-Coordinate for tool position compared to base coordinate system.
Definition at line 198 of file KatanaInterface.cpp.
float fawkes::KatanaInterface::y | ( | ) | const |
Get y value.
Y-Coordinate for tool position compared to base coordinate system.
Definition at line 231 of file KatanaInterface.cpp.
float fawkes::KatanaInterface::z | ( | ) | const |
Get z value.
Z-Coordinate for tool position compared to base coordinate system.
Definition at line 264 of file KatanaInterface.cpp.
const uint32_t fawkes::KatanaInterface::ERROR_CMD_START_FAILED = 2u [static] |
ERROR_CMD_START_FAILED constant.
Definition at line 58 of file KatanaInterface.h.
Referenced by KatanaGripperThread::once(), KatanaGotoThread::once(), and KatanaCalibrationThread::once().
const uint32_t fawkes::KatanaInterface::ERROR_COMMUNICATION = 8u [static] |
ERROR_COMMUNICATION constant.
Definition at line 60 of file KatanaInterface.h.
Referenced by KatanaGripperThread::once(), and KatanaGotoThread::once().
const uint32_t fawkes::KatanaInterface::ERROR_MOTOR_CRASHED = 16u [static] |
ERROR_MOTOR_CRASHED constant.
Definition at line 61 of file KatanaInterface.h.
Referenced by KatanaGotoThread::once().
const uint32_t fawkes::KatanaInterface::ERROR_NO_SOLUTION = 4u [static] |
ERROR_NO_SOLUTION constant.
Definition at line 59 of file KatanaInterface.h.
Referenced by KatanaGotoThread::once().
const uint32_t fawkes::KatanaInterface::ERROR_NONE = 0u [static] |
ERROR_NONE constant.
Definition at line 56 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::ERROR_UNSPECIFIC = 1u [static] |
ERROR_UNSPECIFIC constant.
Definition at line 57 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_COND_BOTH = 3u [static] |
SENSOR_COND_BOTH constant.
Definition at line 43 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_LEFT_FRONT = 15u [static] |
SENSOR_FORCE_LEFT_FRONT constant.
Definition at line 55 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_LEFT_REAR = 14u [static] |
SENSOR_FORCE_LEFT_REAR constant.
Definition at line 54 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_RIGHT_FRONT = 7u [static] |
SENSOR_FORCE_RIGHT_FRONT constant.
Definition at line 47 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_RIGHT_REAR = 6u [static] |
SENSOR_FORCE_RIGHT_REAR constant.
Definition at line 46 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_CENTER_GRIPPER = 11u [static] |
SENSOR_IR_CENTER_GRIPPER constant.
Definition at line 51 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_LEFT_BOTTOM_FRONT = 13u [static] |
SENSOR_IR_LEFT_BOTTOM_FRONT constant.
Definition at line 53 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_LEFT_INNER_FRONT = 9u [static] |
SENSOR_IR_LEFT_INNER_FRONT constant.
Definition at line 49 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_LEFT_INNER_MIDDLE = 8u [static] |
SENSOR_IR_LEFT_INNER_MIDDLE constant.
Definition at line 48 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_LEFT_OUTER_FRONT = 12u [static] |
SENSOR_IR_LEFT_OUTER_FRONT constant.
Definition at line 52 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_RIGHT_BOTTOM_FRONT = 5u [static] |
SENSOR_IR_RIGHT_BOTTOM_FRONT constant.
Definition at line 45 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_RIGHT_INNER_FRONT = 1u [static] |
SENSOR_IR_RIGHT_INNER_FRONT constant.
Definition at line 41 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_RIGHT_INNER_MIDDLE = 0u [static] |
SENSOR_IR_RIGHT_INNER_MIDDLE constant.
Definition at line 40 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_IR_RIGHT_OUTER_FRONT = 4u [static] |
SENSOR_IR_RIGHT_OUTER_FRONT constant.
Definition at line 44 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_RESERVED_10 = 10u [static] |
SENSOR_RESERVED_10 constant.
Definition at line 50 of file KatanaInterface.h.
const uint32_t fawkes::KatanaInterface::SENSOR_RESERVED_2 = 2u [static] |
SENSOR_RESERVED_2 constant.
Definition at line 42 of file KatanaInterface.h.