Fawkes API  Fawkes Development Version
fawkes::KatanaInterface Class Reference

KatanaInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::KatanaInterface:

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...
 
class  LinearGotoKniMessage
 LinearGotoKniMessage Fawkes BlackBoard Interface Message. More...
 
class  LinearGotoMessage
 LinearGotoMessage Fawkes BlackBoard Interface Message. More...
 
class  MoveMotorAngleMessage
 MoveMotorAngleMessage Fawkes BlackBoard Interface Message. More...
 
class  MoveMotorEncoderMessage
 MoveMotorEncoderMessage Fawkes BlackBoard Interface Message. More...
 
class  ObjectGotoMessage
 ObjectGotoMessage 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  SetMotorAngleMessage
 SetMotorAngleMessage Fawkes BlackBoard Interface Message. More...
 
class  SetMotorEncoderMessage
 SetMotorEncoderMessage Fawkes BlackBoard Interface Message. More...
 
class  SetPlannerParamsMessage
 SetPlannerParamsMessage 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. More...
 
uint8_t * sensor_value () const
 Get sensor_value value. More...
 
uint8_t sensor_value (unsigned int index) const
 Get sensor_value value at given index. More...
 
void set_sensor_value (unsigned int index, const uint8_t new_sensor_value)
 Set sensor_value value at given index. More...
 
void set_sensor_value (const uint8_t *new_sensor_value)
 Set sensor_value value. More...
 
size_t maxlenof_sensor_value () const
 Get maximum length of sensor_value value. More...
 
float x () const
 Get x value. More...
 
void set_x (const float new_x)
 Set x value. More...
 
size_t maxlenof_x () const
 Get maximum length of x value. More...
 
float y () const
 Get y value. More...
 
void set_y (const float new_y)
 Set y value. More...
 
size_t maxlenof_y () const
 Get maximum length of y value. More...
 
float z () const
 Get z value. More...
 
void set_z (const float new_z)
 Set z value. More...
 
size_t maxlenof_z () const
 Get maximum length of z value. More...
 
float phi () const
 Get phi value. More...
 
void set_phi (const float new_phi)
 Set phi value. More...
 
size_t maxlenof_phi () const
 Get maximum length of phi value. More...
 
float theta () const
 Get theta value. More...
 
void set_theta (const float new_theta)
 Set theta value. More...
 
size_t maxlenof_theta () const
 Get maximum length of theta value. More...
 
float psi () const
 Get psi value. More...
 
void set_psi (const float new_psi)
 Set psi value. More...
 
size_t maxlenof_psi () const
 Get maximum length of psi value. More...
 
int32_t * encoders () const
 Get encoders value. More...
 
int32_t encoders (unsigned int index) const
 Get encoders value at given index. More...
 
void set_encoders (unsigned int index, const int32_t new_encoders)
 Set encoders value at given index. More...
 
void set_encoders (const int32_t *new_encoders)
 Set encoders value. More...
 
size_t maxlenof_encoders () const
 Get maximum length of encoders value. More...
 
float * angles () const
 Get angles value. More...
 
float angles (unsigned int index) const
 Get angles value at given index. More...
 
void set_angles (unsigned int index, const float new_angles)
 Set angles value at given index. More...
 
void set_angles (const float *new_angles)
 Set angles value. More...
 
size_t maxlenof_angles () const
 Get maximum length of angles value. More...
 
uint32_t msgid () const
 Get msgid value. More...
 
void set_msgid (const uint32_t new_msgid)
 Set msgid value. More...
 
size_t maxlenof_msgid () const
 Get maximum length of msgid value. More...
 
bool is_final () const
 Get final value. More...
 
void set_final (const bool new_final)
 Set final value. More...
 
size_t maxlenof_final () const
 Get maximum length of final value. More...
 
uint32_t error_code () const
 Get error_code value. More...
 
void set_error_code (const uint32_t new_error_code)
 Set error_code value. More...
 
size_t maxlenof_error_code () const
 Get maximum length of error_code value. More...
 
bool is_enabled () const
 Get enabled value. More...
 
void set_enabled (const bool new_enabled)
 Set enabled value. More...
 
size_t maxlenof_enabled () const
 Get maximum length of enabled value. More...
 
bool is_calibrated () const
 Get calibrated value. More...
 
void set_calibrated (const bool new_calibrated)
 Set calibrated value. More...
 
size_t maxlenof_calibrated () const
 Get maximum length of calibrated value. More...
 
uint8_t max_velocity () const
 Get max_velocity value. More...
 
void set_max_velocity (const uint8_t new_max_velocity)
 Set max_velocity value. More...
 
size_t maxlenof_max_velocity () const
 Get maximum length of max_velocity value. More...
 
uint8_t num_motors () const
 Get num_motors value. More...
 
void set_num_motors (const uint8_t new_num_motors)
 Set num_motors value. More...
 
size_t maxlenof_num_motors () const
 Get maximum length of num_motors value. More...
 
virtual Messagecreate_message (const char *type) const
 Create message based on type name. More...
 
virtual void copy_values (const Interface *other)
 Copy values from other interface. More...
 
virtual const char * enum_tostring (const char *enumtype, int val) const
 Convert arbitrary enum value to string. More...
 
- Public Member Functions inherited from fawkes::Interface
virtual ~Interface ()
 Destructor. More...
 
bool oftype (const char *interface_type) const
 Check if interface is of given type. More...
 
const void * datachunk () const
 Get data chunk. More...
 
unsigned int datasize () const
 Get data size. More...
 
const char * type () const
 Get type of interface. More...
 
const char * id () const
 Get identifier of interface. More...
 
const char * uid () const
 Get unique identifier of interface. More...
 
unsigned short serial () const
 Get instance serial of interface. More...
 
unsigned int mem_serial () const
 Get memory serial of interface. More...
 
bool operator== (Interface &comp) const
 Check equality of two interfaces. More...
 
const unsigned char * hash () const
 Get interface hash. More...
 
size_t hash_size () const
 Get size of interface hash. More...
 
const char * hash_printable () const
 Get printable interface hash. More...
 
bool is_writer () const
 Check if this is a writing instance. More...
 
void set_validity (bool valid)
 Mark this interface invalid. More...
 
bool is_valid () const
 Check validity of interface. More...
 
const char * owner () const
 Get owner of interface. More...
 
void set_from_chunk (void *chunk)
 Set from a raw data chunk. More...
 
void resize_buffers (unsigned int num_buffers)
 Resize buffer array. More...
 
unsigned int num_buffers () const
 Get number of buffers. More...
 
void copy_shared_to_buffer (unsigned int buffer)
 Copy data from private memory to buffer. More...
 
void copy_private_to_buffer (unsigned int buffer)
 Copy data from private memory to buffer. More...
 
void read_from_buffer (unsigned int buffer)
 Copy data from buffer to private memory. More...
 
int compare_buffers (unsigned int buffer)
 Compare buffer to private memory. More...
 
Time buffer_timestamp (unsigned int buffer)
 Get time of a buffer. More...
 
void buffer_timestamp (unsigned int buffer, Time *timestamp)
 Get time of a buffer. More...
 
void read ()
 Read from BlackBoard into local copy. More...
 
void write ()
 Write from local copy into BlackBoard memory. More...
 
bool has_writer () const
 Check if there is a writer for the interface. More...
 
unsigned int num_readers () const
 Get the number of readers. More...
 
std::string writer () const
 Get owner name of writing interface instance. More...
 
std::list< std::string > readers () const
 Get owner names of reading interface instances. More...
 
bool changed () const
 Check if data has been changed. More...
 
const Timetimestamp () const
 Get timestamp of last write. More...
 
void set_auto_timestamping (bool enabled)
 Enable or disable automated timestamping. More...
 
void set_timestamp (const Time *t=NULL)
 Set timestamp. More...
 
void set_clock (Clock *clock)
 Set clock to use for timestamping. More...
 
void mark_data_changed ()
 Mark data as changed. More...
 
std::list< const char * > get_message_types ()
 Obtain a list of textual representations of the message types available for this interface. More...
 
unsigned int msgq_enqueue (Message *message)
 Enqueue message at end of queue. More...
 
unsigned int msgq_enqueue_copy (Message *message)
 Enqueue copy of message at end of queue. More...
 
void msgq_remove (Message *message)
 Remove message from queue. More...
 
void msgq_remove (unsigned int message_id)
 Remove message from queue. More...
 
unsigned int msgq_size ()
 Get size of message queue. More...
 
void msgq_flush ()
 Flush all messages. More...
 
void msgq_lock ()
 Lock message queue. More...
 
bool msgq_try_lock ()
 Try to lock message queue. More...
 
void msgq_unlock ()
 Unlock message queue. More...
 
void msgq_pop ()
 Erase first message from queue. More...
 
Messagemsgq_first ()
 Get the first message from the message queue. More...
 
bool msgq_empty ()
 Check if queue is empty. More...
 
void msgq_append (Message *message)
 Enqueue message. More...
 
template<class MessageType >
bool msgq_first_is ()
 Check if first message has desired type. More...
 
template<class MessageType >
MessageType * msgq_first ()
 Get first message casted to the desired type. More...
 
template<class MessageType >
MessageType * msgq_first (MessageType *&msg)
 Get first message casted to the desired type. More...
 
template<class MessageType >
MessageType * msgq_first_safe (MessageType *&msg) throw ()
 Get first message casted to the desired type without exceptions. More...
 
MessageQueue::MessageIterator msgq_begin ()
 Get start iterator for message queue. More...
 
MessageQueue::MessageIterator msgq_end ()
 Get end iterator for message queue. More...
 
InterfaceFieldIterator fields ()
 Get iterator over all fields of this interface instance. More...
 
InterfaceFieldIterator fields_end ()
 Invalid iterator. More...
 
unsigned int num_fields ()
 Get the number of fields in the interface. More...
 

Static Public Attributes

static const uint32_t SENSOR_IR_RIGHT_INNER_MIDDLE = 0u
 SENSOR_IR_RIGHT_INNER_MIDDLE constant. More...
 
static const uint32_t SENSOR_IR_RIGHT_INNER_FRONT = 1u
 SENSOR_IR_RIGHT_INNER_FRONT constant. More...
 
static const uint32_t SENSOR_RESERVED_2 = 2u
 SENSOR_RESERVED_2 constant. More...
 
static const uint32_t SENSOR_COND_BOTH = 3u
 SENSOR_COND_BOTH constant. More...
 
static const uint32_t SENSOR_IR_RIGHT_OUTER_FRONT = 4u
 SENSOR_IR_RIGHT_OUTER_FRONT constant. More...
 
static const uint32_t SENSOR_IR_RIGHT_BOTTOM_FRONT = 5u
 SENSOR_IR_RIGHT_BOTTOM_FRONT constant. More...
 
static const uint32_t SENSOR_FORCE_RIGHT_REAR = 6u
 SENSOR_FORCE_RIGHT_REAR constant. More...
 
static const uint32_t SENSOR_FORCE_RIGHT_FRONT = 7u
 SENSOR_FORCE_RIGHT_FRONT constant. More...
 
static const uint32_t SENSOR_IR_LEFT_INNER_MIDDLE = 8u
 SENSOR_IR_LEFT_INNER_MIDDLE constant. More...
 
static const uint32_t SENSOR_IR_LEFT_INNER_FRONT = 9u
 SENSOR_IR_LEFT_INNER_FRONT constant. More...
 
static const uint32_t SENSOR_RESERVED_10 = 10u
 SENSOR_RESERVED_10 constant. More...
 
static const uint32_t SENSOR_IR_CENTER_GRIPPER = 11u
 SENSOR_IR_CENTER_GRIPPER constant. More...
 
static const uint32_t SENSOR_IR_LEFT_OUTER_FRONT = 12u
 SENSOR_IR_LEFT_OUTER_FRONT constant. More...
 
static const uint32_t SENSOR_IR_LEFT_BOTTOM_FRONT = 13u
 SENSOR_IR_LEFT_BOTTOM_FRONT constant. More...
 
static const uint32_t SENSOR_FORCE_LEFT_REAR = 14u
 SENSOR_FORCE_LEFT_REAR constant. More...
 
static const uint32_t SENSOR_FORCE_LEFT_FRONT = 15u
 SENSOR_FORCE_LEFT_FRONT constant. More...
 
static const uint32_t ERROR_NONE = 0u
 ERROR_NONE constant. More...
 
static const uint32_t ERROR_UNSPECIFIC = 1u
 ERROR_UNSPECIFIC constant. More...
 
static const uint32_t ERROR_CMD_START_FAILED = 2u
 ERROR_CMD_START_FAILED constant. More...
 
static const uint32_t ERROR_NO_SOLUTION = 4u
 ERROR_NO_SOLUTION constant. More...
 
static const uint32_t ERROR_COMMUNICATION = 8u
 ERROR_COMMUNICATION constant. More...
 
static const uint32_t ERROR_MOTOR_CRASHED = 16u
 ERROR_MOTOR_CRASHED constant. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from fawkes::Interface
static void parse_uid (const char *uid, std::string &type, std::string &id)
 Parse UID to type and ID strings. More...
 
- Protected Member Functions inherited from fawkes::Interface
 Interface ()
 Constructor. More...
 
void set_hash (unsigned char *ihash)
 Set hash. More...
 
void add_fieldinfo (interface_fieldtype_t type, const char *name, size_t length, void *value, const char *enumtype=0, const interface_enum_map_t *enum_map=0)
 Add an entry to the field info list. More...
 
void add_messageinfo (const char *name)
 Add an entry to the message info list. More...
 
- Protected Attributes inherited from fawkes::Interface
void * data_ptr
 Pointer to local memory storage. More...
 
unsigned int data_size
 Minimal data size to hold data storage. More...
 
bool data_changed
 Indicator if data has changed. More...
 
interface_data_ts_tdata_ts
 Pointer to data casted to timestamp struct. More...
 

Detailed Description

KatanaInterface Fawkes BlackBoard Interface.

Interface to access component providing access to a Neuronics Katana arm.

Definition at line 33 of file KatanaInterface.h.

Member Function Documentation

◆ angles() [1/2]

float * fawkes::KatanaInterface::angles ( ) const

Get angles value.

Angle values of motors

Returns
angles value

Definition at line 461 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ angles() [2/2]

float fawkes::KatanaInterface::angles ( unsigned int  index) const

Get angles value at given index.

Angle values of motors

Parameters
indexindex of value
Returns
angles value
Exceptions
Exceptionthrown if index is out of bounds

Definition at line 473 of file KatanaInterface.cpp.

◆ copy_values()

void fawkes::KatanaInterface::copy_values ( const Interface other)
virtual

Copy values from other interface.

Parameters
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 788 of file KatanaInterface.cpp.

References fawkes::Interface::type().

◆ create_message()

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.

Parameters
typemessage type
Returns
message of the given type, empty
Exceptions
UnknownTypeExceptionthrown if this interface cannot create a message of the given type.

Implements fawkes::Interface.

Definition at line 743 of file KatanaInterface.cpp.

◆ encoders() [1/2]

int32_t * fawkes::KatanaInterface::encoders ( ) const

Get encoders value.

Encoder values of motors

Returns
encoders value

Definition at line 401 of file KatanaInterface.cpp.

◆ encoders() [2/2]

int32_t fawkes::KatanaInterface::encoders ( unsigned int  index) const

Get encoders value at given index.

Encoder values of motors

Parameters
indexindex of value
Returns
encoders value
Exceptions
Exceptionthrown if index is out of bounds

Definition at line 413 of file KatanaInterface.cpp.

◆ enum_tostring()

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.

Parameters
enumtypeenum type as string
valvalue to convert
Returns
string representation of value
Exceptions
UnknownTypeExceptionthrown if enumtype is not specified for interface.

Implements fawkes::Interface.

Definition at line 799 of file KatanaInterface.cpp.

◆ error_code()

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).

Returns
error_code value

Definition at line 589 of file KatanaInterface.cpp.

◆ is_calibrated()

bool fawkes::KatanaInterface::is_calibrated ( ) const

Get calibrated value.

Has arm been calibrated?

Returns
calibrated value

Definition at line 653 of file KatanaInterface.cpp.

◆ is_enabled()

bool fawkes::KatanaInterface::is_enabled ( ) const

Get enabled value.

Are motors enabled?

Returns
enabled value

Definition at line 622 of file KatanaInterface.cpp.

Referenced by KatanaActThread::loop().

◆ is_final()

bool fawkes::KatanaInterface::is_final ( ) const

Get final value.

True, if the last goto command has been finished, false if it is still running

Returns
final value

Definition at line 555 of file KatanaInterface.cpp.

◆ max_velocity()

uint8_t fawkes::KatanaInterface::max_velocity ( ) const

Get max_velocity value.

Maximum velocity

Returns
max_velocity value

Definition at line 684 of file KatanaInterface.cpp.

◆ maxlenof_angles()

size_t fawkes::KatanaInterface::maxlenof_angles ( ) const

Get maximum length of angles value.

Returns
length of angles value, can be length of the array or number of maximum number of characters for a string

Definition at line 486 of file KatanaInterface.cpp.

◆ maxlenof_calibrated()

size_t fawkes::KatanaInterface::maxlenof_calibrated ( ) const

Get maximum length of calibrated value.

Returns
length of calibrated value, can be length of the array or number of maximum number of characters for a string

Definition at line 663 of file KatanaInterface.cpp.

◆ maxlenof_enabled()

size_t fawkes::KatanaInterface::maxlenof_enabled ( ) const

Get maximum length of enabled value.

Returns
length of enabled value, can be length of the array or number of maximum number of characters for a string

Definition at line 632 of file KatanaInterface.cpp.

◆ maxlenof_encoders()

size_t fawkes::KatanaInterface::maxlenof_encoders ( ) const

Get maximum length of encoders value.

Returns
length of encoders value, can be length of the array or number of maximum number of characters for a string

Definition at line 426 of file KatanaInterface.cpp.

◆ maxlenof_error_code()

size_t fawkes::KatanaInterface::maxlenof_error_code ( ) const

Get maximum length of error_code value.

Returns
length of error_code value, can be length of the array or number of maximum number of characters for a string

Definition at line 599 of file KatanaInterface.cpp.

◆ maxlenof_final()

size_t fawkes::KatanaInterface::maxlenof_final ( ) const

Get maximum length of final value.

Returns
length of final value, can be length of the array or number of maximum number of characters for a string

Definition at line 565 of file KatanaInterface.cpp.

◆ maxlenof_max_velocity()

size_t fawkes::KatanaInterface::maxlenof_max_velocity ( ) const

Get maximum length of max_velocity value.

Returns
length of max_velocity value, can be length of the array or number of maximum number of characters for a string

Definition at line 694 of file KatanaInterface.cpp.

◆ maxlenof_msgid()

size_t fawkes::KatanaInterface::maxlenof_msgid ( ) const

Get maximum length of msgid value.

Returns
length of msgid value, can be length of the array or number of maximum number of characters for a string

Definition at line 532 of file KatanaInterface.cpp.

◆ maxlenof_num_motors()

size_t fawkes::KatanaInterface::maxlenof_num_motors ( ) const

Get maximum length of num_motors value.

Returns
length of num_motors value, can be length of the array or number of maximum number of characters for a string

Definition at line 725 of file KatanaInterface.cpp.

◆ maxlenof_phi()

size_t fawkes::KatanaInterface::maxlenof_phi ( ) const

Get maximum length of phi value.

Returns
length of phi value, can be length of the array or number of maximum number of characters for a string

Definition at line 318 of file KatanaInterface.cpp.

◆ maxlenof_psi()

size_t fawkes::KatanaInterface::maxlenof_psi ( ) const

Get maximum length of psi value.

Returns
length of psi value, can be length of the array or number of maximum number of characters for a string

Definition at line 380 of file KatanaInterface.cpp.

◆ maxlenof_sensor_value()

size_t fawkes::KatanaInterface::maxlenof_sensor_value ( ) const

Get maximum length of sensor_value value.

Returns
length of sensor_value value, can be length of the array or number of maximum number of characters for a string

Definition at line 172 of file KatanaInterface.cpp.

Referenced by KatanaActThread::update_sensor_values().

◆ maxlenof_theta()

size_t fawkes::KatanaInterface::maxlenof_theta ( ) const

Get maximum length of theta value.

Returns
length of theta value, can be length of the array or number of maximum number of characters for a string

Definition at line 349 of file KatanaInterface.cpp.

◆ maxlenof_x()

size_t fawkes::KatanaInterface::maxlenof_x ( ) const

Get maximum length of x value.

Returns
length of x value, can be length of the array or number of maximum number of characters for a string

Definition at line 220 of file KatanaInterface.cpp.

◆ maxlenof_y()

size_t fawkes::KatanaInterface::maxlenof_y ( ) const

Get maximum length of y value.

Returns
length of y value, can be length of the array or number of maximum number of characters for a string

Definition at line 253 of file KatanaInterface.cpp.

◆ maxlenof_z()

size_t fawkes::KatanaInterface::maxlenof_z ( ) const

Get maximum length of z value.

Returns
length of z value, can be length of the array or number of maximum number of characters for a string

Definition at line 286 of file KatanaInterface.cpp.

◆ message_valid()

bool fawkes::KatanaInterface::message_valid ( const Message message) const
virtual

Check if message is valid and can be enqueued.

Parameters
messageMessage to check
Returns
true if the message is valid, false otherwise.

Implements fawkes::Interface.

Definition at line 2718 of file KatanaInterface.cpp.

◆ msgid()

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.

Returns
msgid value

Definition at line 522 of file KatanaInterface.cpp.

◆ num_motors()

uint8_t fawkes::KatanaInterface::num_motors ( ) const

Get num_motors value.

Number of motors

Returns
num_motors value

Definition at line 715 of file KatanaInterface.cpp.

◆ phi()

float fawkes::KatanaInterface::phi ( ) const

Get phi value.

DEPRECATED! Euler angle Phi of tool orientation.

Returns
phi value

Definition at line 308 of file KatanaInterface.cpp.

◆ psi()

float fawkes::KatanaInterface::psi ( ) const

Get psi value.

DEPRECATED! Euler angle Psi of tool orientation.

Returns
psi value

Definition at line 370 of file KatanaInterface.cpp.

◆ sensor_value() [1/2]

uint8_t * fawkes::KatanaInterface::sensor_value ( ) const

Get sensor_value value.

Sensor values. Use SENSOR_* indexes for accessing the values.

Returns
sensor_value value

Definition at line 146 of file KatanaInterface.cpp.

◆ sensor_value() [2/2]

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.

Parameters
indexindex of value
Returns
sensor_value value
Exceptions
Exceptionthrown if index is out of bounds

Definition at line 159 of file KatanaInterface.cpp.

◆ set_angles() [1/2]

void fawkes::KatanaInterface::set_angles ( unsigned int  index,
const float  new_angles 
)

Set angles value at given index.

Angle values of motors

Parameters
new_anglesnew angles value
indexindex for of the value

Definition at line 508 of file KatanaInterface.cpp.

Referenced by KatanaActThread::update_sensor_values().

◆ set_angles() [2/2]

void fawkes::KatanaInterface::set_angles ( const float *  new_angles)

Set angles value.

Angle values of motors

Parameters
new_anglesnew angles value

Definition at line 496 of file KatanaInterface.cpp.

◆ set_calibrated()

void fawkes::KatanaInterface::set_calibrated ( const bool  new_calibrated)

Set calibrated value.

Has arm been calibrated?

Parameters
new_calibratednew calibrated value

Definition at line 673 of file KatanaInterface.cpp.

Referenced by KatanaActThread::loop().

◆ set_enabled()

void fawkes::KatanaInterface::set_enabled ( const bool  new_enabled)

Set enabled value.

Are motors enabled?

Parameters
new_enablednew enabled value

Definition at line 642 of file KatanaInterface.cpp.

Referenced by KatanaActThread::loop(), and KatanaActThread::once().

◆ set_encoders() [1/2]

void fawkes::KatanaInterface::set_encoders ( unsigned int  index,
const int32_t  new_encoders 
)

Set encoders value at given index.

Encoder values of motors

Parameters
new_encodersnew encoders value
indexindex for of the value

Definition at line 448 of file KatanaInterface.cpp.

Referenced by KatanaActThread::update_sensor_values().

◆ set_encoders() [2/2]

void fawkes::KatanaInterface::set_encoders ( const int32_t *  new_encoders)

Set encoders value.

Encoder values of motors

Parameters
new_encodersnew encoders value

Definition at line 436 of file KatanaInterface.cpp.

◆ set_error_code()

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).

Parameters
new_error_codenew error_code value

Definition at line 611 of file KatanaInterface.cpp.

Referenced by KatanaActThread::loop().

◆ set_final()

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

Parameters
new_finalnew final value

Definition at line 576 of file KatanaInterface.cpp.

Referenced by KatanaActThread::loop(), and KatanaActThread::update_sensor_values().

◆ set_max_velocity()

void fawkes::KatanaInterface::set_max_velocity ( const uint8_t  new_max_velocity)

Set max_velocity value.

Maximum velocity

Parameters
new_max_velocitynew max_velocity value

Definition at line 704 of file KatanaInterface.cpp.

Referenced by KatanaActThread::loop().

◆ set_msgid()

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.

Parameters
new_msgidnew msgid value

Definition at line 543 of file KatanaInterface.cpp.

Referenced by KatanaActThread::update_sensor_values().

◆ set_num_motors()

void fawkes::KatanaInterface::set_num_motors ( const uint8_t  new_num_motors)

Set num_motors value.

Number of motors

Parameters
new_num_motorsnew num_motors value

Definition at line 735 of file KatanaInterface.cpp.

◆ set_phi()

void fawkes::KatanaInterface::set_phi ( const float  new_phi)

Set phi value.

DEPRECATED! Euler angle Phi of tool orientation.

Parameters
new_phinew phi value

Definition at line 328 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ set_psi()

void fawkes::KatanaInterface::set_psi ( const float  new_psi)

Set psi value.

DEPRECATED! Euler angle Psi of tool orientation.

Parameters
new_psinew psi value

Definition at line 390 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ set_sensor_value() [1/2]

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.

Parameters
new_sensor_valuenew sensor_value value
indexindex for of the value

Definition at line 196 of file KatanaInterface.cpp.

Referenced by KatanaActThread::update_sensor_values().

◆ set_sensor_value() [2/2]

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.

Parameters
new_sensor_valuenew sensor_value value

Definition at line 183 of file KatanaInterface.cpp.

◆ set_theta()

void fawkes::KatanaInterface::set_theta ( const float  new_theta)

Set theta value.

DEPRECATED! Euler angle Theta of tool orientation.

Parameters
new_thetanew theta value

Definition at line 359 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ set_x()

void fawkes::KatanaInterface::set_x ( const float  new_x)

Set x value.

DEPRECATED! X-Coordinate for tool position compared to base coordinate system.

Parameters
new_xnew x value

Definition at line 231 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ set_y()

void fawkes::KatanaInterface::set_y ( const float  new_y)

Set y value.

DEPRECATED! Y-Coordinate for tool position compared to base coordinate system.

Parameters
new_ynew y value

Definition at line 264 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ set_z()

void fawkes::KatanaInterface::set_z ( const float  new_z)

Set z value.

DEPRECATED! Z-Coordinate for tool position compared to base coordinate system.

Parameters
new_znew z value

Definition at line 297 of file KatanaInterface.cpp.

Referenced by KatanaActThread::once().

◆ theta()

float fawkes::KatanaInterface::theta ( ) const

Get theta value.

DEPRECATED! Euler angle Theta of tool orientation.

Returns
theta value

Definition at line 339 of file KatanaInterface.cpp.

◆ x()

float fawkes::KatanaInterface::x ( ) const

Get x value.

DEPRECATED! X-Coordinate for tool position compared to base coordinate system.

Returns
x value

Definition at line 210 of file KatanaInterface.cpp.

◆ y()

float fawkes::KatanaInterface::y ( ) const

Get y value.

DEPRECATED! Y-Coordinate for tool position compared to base coordinate system.

Returns
y value

Definition at line 243 of file KatanaInterface.cpp.

◆ z()

float fawkes::KatanaInterface::z ( ) const

Get z value.

DEPRECATED! Z-Coordinate for tool position compared to base coordinate system.

Returns
z value

Definition at line 276 of file KatanaInterface.cpp.

Member Data Documentation

◆ ERROR_CMD_START_FAILED

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 KatanaCalibrationThread::once(), KatanaMotorControlThread::once(), KatanaGotoThread::once(), and KatanaGripperThread::once().

◆ ERROR_COMMUNICATION

const uint32_t fawkes::KatanaInterface::ERROR_COMMUNICATION = 8u
static

ERROR_COMMUNICATION constant.

Definition at line 60 of file KatanaInterface.h.

Referenced by KatanaMotorControlThread::once(), KatanaGotoThread::once(), and KatanaGripperThread::once().

◆ ERROR_MOTOR_CRASHED

const uint32_t fawkes::KatanaInterface::ERROR_MOTOR_CRASHED = 16u
static

ERROR_MOTOR_CRASHED constant.

Definition at line 61 of file KatanaInterface.h.

Referenced by KatanaMotorControlThread::once(), KatanaGotoThread::once(), and KatanaGripperThread::once().

◆ ERROR_NO_SOLUTION

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().

◆ ERROR_NONE

const uint32_t fawkes::KatanaInterface::ERROR_NONE = 0u
static

ERROR_NONE constant.

Definition at line 56 of file KatanaInterface.h.

◆ ERROR_UNSPECIFIC

const uint32_t fawkes::KatanaInterface::ERROR_UNSPECIFIC = 1u
static

ERROR_UNSPECIFIC constant.

Definition at line 57 of file KatanaInterface.h.

Referenced by KatanaMotorControlThread::once().

◆ SENSOR_COND_BOTH

const uint32_t fawkes::KatanaInterface::SENSOR_COND_BOTH = 3u
static

SENSOR_COND_BOTH constant.

Definition at line 43 of file KatanaInterface.h.

◆ SENSOR_FORCE_LEFT_FRONT

const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_LEFT_FRONT = 15u
static

SENSOR_FORCE_LEFT_FRONT constant.

Definition at line 55 of file KatanaInterface.h.

◆ SENSOR_FORCE_LEFT_REAR

const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_LEFT_REAR = 14u
static

SENSOR_FORCE_LEFT_REAR constant.

Definition at line 54 of file KatanaInterface.h.

◆ SENSOR_FORCE_RIGHT_FRONT

const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_RIGHT_FRONT = 7u
static

SENSOR_FORCE_RIGHT_FRONT constant.

Definition at line 47 of file KatanaInterface.h.

◆ SENSOR_FORCE_RIGHT_REAR

const uint32_t fawkes::KatanaInterface::SENSOR_FORCE_RIGHT_REAR = 6u
static

SENSOR_FORCE_RIGHT_REAR constant.

Definition at line 46 of file KatanaInterface.h.

◆ SENSOR_IR_CENTER_GRIPPER

const uint32_t fawkes::KatanaInterface::SENSOR_IR_CENTER_GRIPPER = 11u
static

SENSOR_IR_CENTER_GRIPPER constant.

Definition at line 51 of file KatanaInterface.h.

◆ SENSOR_IR_LEFT_BOTTOM_FRONT

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.

◆ SENSOR_IR_LEFT_INNER_FRONT

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.

◆ SENSOR_IR_LEFT_INNER_MIDDLE

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.

◆ SENSOR_IR_LEFT_OUTER_FRONT

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.

◆ SENSOR_IR_RIGHT_BOTTOM_FRONT

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.

◆ SENSOR_IR_RIGHT_INNER_FRONT

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.

◆ SENSOR_IR_RIGHT_INNER_MIDDLE

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.

◆ SENSOR_IR_RIGHT_OUTER_FRONT

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.

◆ SENSOR_RESERVED_10

const uint32_t fawkes::KatanaInterface::SENSOR_RESERVED_10 = 10u
static

SENSOR_RESERVED_10 constant.

Definition at line 50 of file KatanaInterface.h.

◆ SENSOR_RESERVED_2

const uint32_t fawkes::KatanaInterface::SENSOR_RESERVED_2 = 2u
static

SENSOR_RESERVED_2 constant.

Definition at line 42 of file KatanaInterface.h.


The documentation for this class was generated from the following files: