Fawkes API
Fawkes Development Version
|
NaoSensorInterface Fawkes BlackBoard Interface. More...
#include <>>
Classes | |
class | EmitUltrasonicWaveMessage |
EmitUltrasonicWaveMessage Fawkes BlackBoard Interface Message. More... | |
class | StartUltrasonicMessage |
StartUltrasonicMessage Fawkes BlackBoard Interface Message. More... | |
class | StopUltrasonicMessage |
StopUltrasonicMessage Fawkes BlackBoard Interface Message. More... | |
Public Types | |
enum | UltrasonicDirection { USD_NONE , USD_LEFT_LEFT , USD_LEFT_RIGHT , USD_RIGHT_RIGHT , USD_RIGHT_LEFT , USD_BOTH_BOTH } |
This determines the chosen sender/receiver. More... | |
Public Member Functions | |
const char * | tostring_UltrasonicDirection (UltrasonicDirection value) const |
Convert UltrasonicDirection constant to string. More... | |
virtual bool | message_valid (const Message *message) const |
Check if message is valid and can be enqueued. More... | |
float | accel_x () const |
Get accel_x value. More... | |
void | set_accel_x (const float new_accel_x) |
Set accel_x value. More... | |
size_t | maxlenof_accel_x () const |
Get maximum length of accel_x value. More... | |
float | accel_y () const |
Get accel_y value. More... | |
void | set_accel_y (const float new_accel_y) |
Set accel_y value. More... | |
size_t | maxlenof_accel_y () const |
Get maximum length of accel_y value. More... | |
float | accel_z () const |
Get accel_z value. More... | |
void | set_accel_z (const float new_accel_z) |
Set accel_z value. More... | |
size_t | maxlenof_accel_z () const |
Get maximum length of accel_z value. More... | |
float | gyro_x () const |
Get gyro_x value. More... | |
void | set_gyro_x (const float new_gyro_x) |
Set gyro_x value. More... | |
size_t | maxlenof_gyro_x () const |
Get maximum length of gyro_x value. More... | |
float | gyro_y () const |
Get gyro_y value. More... | |
void | set_gyro_y (const float new_gyro_y) |
Set gyro_y value. More... | |
size_t | maxlenof_gyro_y () const |
Get maximum length of gyro_y value. More... | |
float | gyro_ref () const |
Get gyro_ref value. More... | |
void | set_gyro_ref (const float new_gyro_ref) |
Set gyro_ref value. More... | |
size_t | maxlenof_gyro_ref () const |
Get maximum length of gyro_ref value. More... | |
float | angle_x () const |
Get angle_x value. More... | |
void | set_angle_x (const float new_angle_x) |
Set angle_x value. More... | |
size_t | maxlenof_angle_x () const |
Get maximum length of angle_x value. More... | |
float | angle_y () const |
Get angle_y value. More... | |
void | set_angle_y (const float new_angle_y) |
Set angle_y value. More... | |
size_t | maxlenof_angle_y () const |
Get maximum length of angle_y value. More... | |
float | l_fsr_fl () const |
Get l_fsr_fl value. More... | |
void | set_l_fsr_fl (const float new_l_fsr_fl) |
Set l_fsr_fl value. More... | |
size_t | maxlenof_l_fsr_fl () const |
Get maximum length of l_fsr_fl value. More... | |
float | l_fsr_fr () const |
Get l_fsr_fr value. More... | |
void | set_l_fsr_fr (const float new_l_fsr_fr) |
Set l_fsr_fr value. More... | |
size_t | maxlenof_l_fsr_fr () const |
Get maximum length of l_fsr_fr value. More... | |
float | l_fsr_rl () const |
Get l_fsr_rl value. More... | |
void | set_l_fsr_rl (const float new_l_fsr_rl) |
Set l_fsr_rl value. More... | |
size_t | maxlenof_l_fsr_rl () const |
Get maximum length of l_fsr_rl value. More... | |
float | l_fsr_rr () const |
Get l_fsr_rr value. More... | |
void | set_l_fsr_rr (const float new_l_fsr_rr) |
Set l_fsr_rr value. More... | |
size_t | maxlenof_l_fsr_rr () const |
Get maximum length of l_fsr_rr value. More... | |
float | r_fsr_fl () const |
Get r_fsr_fl value. More... | |
void | set_r_fsr_fl (const float new_r_fsr_fl) |
Set r_fsr_fl value. More... | |
size_t | maxlenof_r_fsr_fl () const |
Get maximum length of r_fsr_fl value. More... | |
float | r_fsr_fr () const |
Get r_fsr_fr value. More... | |
void | set_r_fsr_fr (const float new_r_fsr_fr) |
Set r_fsr_fr value. More... | |
size_t | maxlenof_r_fsr_fr () const |
Get maximum length of r_fsr_fr value. More... | |
float | r_fsr_rl () const |
Get r_fsr_rl value. More... | |
void | set_r_fsr_rl (const float new_r_fsr_rl) |
Set r_fsr_rl value. More... | |
size_t | maxlenof_r_fsr_rl () const |
Get maximum length of r_fsr_rl value. More... | |
float | r_fsr_rr () const |
Get r_fsr_rr value. More... | |
void | set_r_fsr_rr (const float new_r_fsr_rr) |
Set r_fsr_rr value. More... | |
size_t | maxlenof_r_fsr_rr () const |
Get maximum length of r_fsr_rr value. More... | |
float | l_total_weight () const |
Get l_total_weight value. More... | |
void | set_l_total_weight (const float new_l_total_weight) |
Set l_total_weight value. More... | |
size_t | maxlenof_l_total_weight () const |
Get maximum length of l_total_weight value. More... | |
float | r_total_weight () const |
Get r_total_weight value. More... | |
void | set_r_total_weight (const float new_r_total_weight) |
Set r_total_weight value. More... | |
size_t | maxlenof_r_total_weight () const |
Get maximum length of r_total_weight value. More... | |
float | l_cop_x () const |
Get l_cop_x value. More... | |
void | set_l_cop_x (const float new_l_cop_x) |
Set l_cop_x value. More... | |
size_t | maxlenof_l_cop_x () const |
Get maximum length of l_cop_x value. More... | |
float | l_cop_y () const |
Get l_cop_y value. More... | |
void | set_l_cop_y (const float new_l_cop_y) |
Set l_cop_y value. More... | |
size_t | maxlenof_l_cop_y () const |
Get maximum length of l_cop_y value. More... | |
float | r_cop_x () const |
Get r_cop_x value. More... | |
void | set_r_cop_x (const float new_r_cop_x) |
Set r_cop_x value. More... | |
size_t | maxlenof_r_cop_x () const |
Get maximum length of r_cop_x value. More... | |
float | r_cop_y () const |
Get r_cop_y value. More... | |
void | set_r_cop_y (const float new_r_cop_y) |
Set r_cop_y value. More... | |
size_t | maxlenof_r_cop_y () const |
Get maximum length of r_cop_y value. More... | |
float * | ultrasonic_distance_left () const |
Get ultrasonic_distance_left value. More... | |
float | ultrasonic_distance_left (unsigned int index) const |
Get ultrasonic_distance_left value at given index. More... | |
void | set_ultrasonic_distance_left (unsigned int index, const float new_ultrasonic_distance_left) |
Set ultrasonic_distance_left value at given index. More... | |
void | set_ultrasonic_distance_left (const float *new_ultrasonic_distance_left) |
Set ultrasonic_distance_left value. More... | |
size_t | maxlenof_ultrasonic_distance_left () const |
Get maximum length of ultrasonic_distance_left value. More... | |
float * | ultrasonic_distance_right () const |
Get ultrasonic_distance_right value. More... | |
float | ultrasonic_distance_right (unsigned int index) const |
Get ultrasonic_distance_right value at given index. More... | |
void | set_ultrasonic_distance_right (unsigned int index, const float new_ultrasonic_distance_right) |
Set ultrasonic_distance_right value at given index. More... | |
void | set_ultrasonic_distance_right (const float *new_ultrasonic_distance_right) |
Set ultrasonic_distance_right value. More... | |
size_t | maxlenof_ultrasonic_distance_right () const |
Get maximum length of ultrasonic_distance_right value. More... | |
UltrasonicDirection | ultrasonic_direction () const |
Get ultrasonic_direction value. More... | |
void | set_ultrasonic_direction (const UltrasonicDirection new_ultrasonic_direction) |
Set ultrasonic_direction value. More... | |
size_t | maxlenof_ultrasonic_direction () const |
Get maximum length of ultrasonic_direction value. More... | |
uint8_t | l_foot_bumper_l () const |
Get l_foot_bumper_l value. More... | |
void | set_l_foot_bumper_l (const uint8_t new_l_foot_bumper_l) |
Set l_foot_bumper_l value. More... | |
size_t | maxlenof_l_foot_bumper_l () const |
Get maximum length of l_foot_bumper_l value. More... | |
uint8_t | l_foot_bumper_r () const |
Get l_foot_bumper_r value. More... | |
void | set_l_foot_bumper_r (const uint8_t new_l_foot_bumper_r) |
Set l_foot_bumper_r value. More... | |
size_t | maxlenof_l_foot_bumper_r () const |
Get maximum length of l_foot_bumper_r value. More... | |
uint8_t | r_foot_bumper_l () const |
Get r_foot_bumper_l value. More... | |
void | set_r_foot_bumper_l (const uint8_t new_r_foot_bumper_l) |
Set r_foot_bumper_l value. More... | |
size_t | maxlenof_r_foot_bumper_l () const |
Get maximum length of r_foot_bumper_l value. More... | |
uint8_t | r_foot_bumper_r () const |
Get r_foot_bumper_r value. More... | |
void | set_r_foot_bumper_r (const uint8_t new_r_foot_bumper_r) |
Set r_foot_bumper_r value. More... | |
size_t | maxlenof_r_foot_bumper_r () const |
Get maximum length of r_foot_bumper_r value. More... | |
uint8_t | head_touch_front () const |
Get head_touch_front value. More... | |
void | set_head_touch_front (const uint8_t new_head_touch_front) |
Set head_touch_front value. More... | |
size_t | maxlenof_head_touch_front () const |
Get maximum length of head_touch_front value. More... | |
uint8_t | head_touch_middle () const |
Get head_touch_middle value. More... | |
void | set_head_touch_middle (const uint8_t new_head_touch_middle) |
Set head_touch_middle value. More... | |
size_t | maxlenof_head_touch_middle () const |
Get maximum length of head_touch_middle value. More... | |
uint8_t | head_touch_rear () const |
Get head_touch_rear value. More... | |
void | set_head_touch_rear (const uint8_t new_head_touch_rear) |
Set head_touch_rear value. More... | |
size_t | maxlenof_head_touch_rear () const |
Get maximum length of head_touch_rear value. More... | |
uint8_t | chest_button () const |
Get chest_button value. More... | |
void | set_chest_button (const uint8_t new_chest_button) |
Set chest_button value. More... | |
size_t | maxlenof_chest_button () const |
Get maximum length of chest_button value. More... | |
float | battery_charge () const |
Get battery_charge value. More... | |
void | set_battery_charge (const float new_battery_charge) |
Set battery_charge value. More... | |
size_t | maxlenof_battery_charge () const |
Get maximum length of battery_charge value. More... | |
virtual Message * | create_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... | |
![]() | |
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... | |
Uuid | 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 |
bool | refreshed () const |
Check if data has been refreshed. More... | |
const Time * | timestamp () 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_refreshed () |
Mark data as refreshed. 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, bool proxy=false) |
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... | |
Message * | msgq_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) noexcept |
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... | |
Additional Inherited Members | |
![]() | |
static void | parse_uid (const char *uid, std::string &type, std::string &id) |
Parse UID to type and ID strings. More... | |
![]() | |
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... | |
template<class FieldT , class DataT > | |
void | set_field (FieldT &field, DataT &data) |
Set a field, set data_changed to true and update data_changed accordingly. More... | |
template<class FieldT , class DataT > | |
void | set_field (FieldT &field, unsigned int index, DataT &data) |
Set an array field at a given index, set data_changed to true and update data_changed accordingly. More... | |
![]() | |
void * | data_ptr |
Pointer to local memory storage. More... | |
unsigned int | data_size |
Minimal data size to hold data storage. More... | |
bool | data_refreshed |
Indicator if data can be considered "current", i.e. More... | |
bool | data_changed |
Indicator if the current data is different from the last call to write() This must is automatically updated by set_field. More... | |
interface_data_ts_t * | data_ts |
Pointer to data casted to timestamp struct. More... | |
NaoSensorInterface Fawkes BlackBoard Interface.
This interface provides access to Nao sensors.
Definition at line 33 of file NaoSensorInterface.h.
This determines the chosen sender/receiver.
Definition at line 44 of file NaoSensorInterface.h.
float fawkes::NaoSensorInterface::accel_x | ( | ) | const |
Get accel_x value.
Accelerometer x
Definition at line 128 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::accel_y | ( | ) | const |
Get accel_y value.
Accelerometer y
Definition at line 158 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::accel_z | ( | ) | const |
Get accel_z value.
Accelerometer z
Definition at line 188 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::angle_x | ( | ) | const |
Get angle_x value.
Angle x
Definition at line 308 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::angle_y | ( | ) | const |
Get angle_y value.
Angle y
Definition at line 338 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::battery_charge | ( | ) | const |
Get battery_charge value.
Battery charge
Definition at line 1196 of file NaoSensorInterface.cpp.
uint8_t fawkes::NaoSensorInterface::chest_button | ( | ) | const |
Get chest_button value.
Chest button state
Definition at line 1166 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
|
virtual |
Copy values from other interface.
other | other interface to copy values from |
Implements fawkes::Interface.
Definition at line 1242 of file NaoSensorInterface.cpp.
References fawkes::Interface::type().
|
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 1223 of file NaoSensorInterface.cpp.
|
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 1253 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::gyro_ref | ( | ) | const |
Get gyro_ref value.
Gyrometer reference
Definition at line 278 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::gyro_x | ( | ) | const |
Get gyro_x value.
Gyrometer x
Definition at line 218 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::gyro_y | ( | ) | const |
Get gyro_y value.
Gyrometer y
Definition at line 248 of file NaoSensorInterface.cpp.
uint8_t fawkes::NaoSensorInterface::head_touch_front | ( | ) | const |
Get head_touch_front value.
Front part of head touch sensor (only Academics robot)
Definition at line 1076 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
uint8_t fawkes::NaoSensorInterface::head_touch_middle | ( | ) | const |
Get head_touch_middle value.
Middle part of head touch sensor (only Academics robot)
Definition at line 1106 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
uint8_t fawkes::NaoSensorInterface::head_touch_rear | ( | ) | const |
Get head_touch_rear value.
Rear part of head touch sensor (only Academics robot)
Definition at line 1136 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
float fawkes::NaoSensorInterface::l_cop_x | ( | ) | const |
Get l_cop_x value.
Center of pressure X for left foot.
Definition at line 668 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::l_cop_y | ( | ) | const |
Get l_cop_y value.
Center of pressure Y for left foot.
Definition at line 698 of file NaoSensorInterface.cpp.
uint8_t fawkes::NaoSensorInterface::l_foot_bumper_l | ( | ) | const |
Get l_foot_bumper_l value.
Left foot bumper left side
Definition at line 956 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
uint8_t fawkes::NaoSensorInterface::l_foot_bumper_r | ( | ) | const |
Get l_foot_bumper_r value.
Left foot bumper right side
Definition at line 986 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
float fawkes::NaoSensorInterface::l_fsr_fl | ( | ) | const |
Get l_fsr_fl value.
Left FSR front left
Definition at line 368 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::l_fsr_fr | ( | ) | const |
Get l_fsr_fr value.
Left FSR front right
Definition at line 398 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::l_fsr_rl | ( | ) | const |
Get l_fsr_rl value.
Left FSR rear left
Definition at line 428 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::l_fsr_rr | ( | ) | const |
Get l_fsr_rr value.
Left FSR rear right
Definition at line 458 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::l_total_weight | ( | ) | const |
Get l_total_weight value.
Total weight on left foot
Definition at line 608 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_accel_x | ( | ) | const |
Get maximum length of accel_x value.
Definition at line 138 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_accel_y | ( | ) | const |
Get maximum length of accel_y value.
Definition at line 168 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_accel_z | ( | ) | const |
Get maximum length of accel_z value.
Definition at line 198 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_angle_x | ( | ) | const |
Get maximum length of angle_x value.
Definition at line 318 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_angle_y | ( | ) | const |
Get maximum length of angle_y value.
Definition at line 348 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_battery_charge | ( | ) | const |
Get maximum length of battery_charge value.
Definition at line 1206 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_chest_button | ( | ) | const |
Get maximum length of chest_button value.
Definition at line 1176 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_gyro_ref | ( | ) | const |
Get maximum length of gyro_ref value.
Definition at line 288 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_gyro_x | ( | ) | const |
Get maximum length of gyro_x value.
Definition at line 228 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_gyro_y | ( | ) | const |
Get maximum length of gyro_y value.
Definition at line 258 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_head_touch_front | ( | ) | const |
Get maximum length of head_touch_front value.
Definition at line 1086 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_head_touch_middle | ( | ) | const |
Get maximum length of head_touch_middle value.
Definition at line 1116 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_head_touch_rear | ( | ) | const |
Get maximum length of head_touch_rear value.
Definition at line 1146 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_cop_x | ( | ) | const |
Get maximum length of l_cop_x value.
Definition at line 678 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_cop_y | ( | ) | const |
Get maximum length of l_cop_y value.
Definition at line 708 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_foot_bumper_l | ( | ) | const |
Get maximum length of l_foot_bumper_l value.
Definition at line 966 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_foot_bumper_r | ( | ) | const |
Get maximum length of l_foot_bumper_r value.
Definition at line 996 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_fl | ( | ) | const |
Get maximum length of l_fsr_fl value.
Definition at line 378 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_fr | ( | ) | const |
Get maximum length of l_fsr_fr value.
Definition at line 408 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_rl | ( | ) | const |
Get maximum length of l_fsr_rl value.
Definition at line 438 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_fsr_rr | ( | ) | const |
Get maximum length of l_fsr_rr value.
Definition at line 468 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_l_total_weight | ( | ) | const |
Get maximum length of l_total_weight value.
Definition at line 618 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_cop_x | ( | ) | const |
Get maximum length of r_cop_x value.
Definition at line 738 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_cop_y | ( | ) | const |
Get maximum length of r_cop_y value.
Definition at line 768 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_foot_bumper_l | ( | ) | const |
Get maximum length of r_foot_bumper_l value.
Definition at line 1026 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_foot_bumper_r | ( | ) | const |
Get maximum length of r_foot_bumper_r value.
Definition at line 1056 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_fl | ( | ) | const |
Get maximum length of r_fsr_fl value.
Definition at line 498 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_fr | ( | ) | const |
Get maximum length of r_fsr_fr value.
Definition at line 528 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_rl | ( | ) | const |
Get maximum length of r_fsr_rl value.
Definition at line 558 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_fsr_rr | ( | ) | const |
Get maximum length of r_fsr_rr value.
Definition at line 588 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_r_total_weight | ( | ) | const |
Get maximum length of r_total_weight value.
Definition at line 648 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_ultrasonic_direction | ( | ) | const |
Get maximum length of ultrasonic_direction value.
Definition at line 934 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_left | ( | ) | const |
Get maximum length of ultrasonic_distance_left value.
Definition at line 819 of file NaoSensorInterface.cpp.
size_t fawkes::NaoSensorInterface::maxlenof_ultrasonic_distance_right | ( | ) | const |
Get maximum length of ultrasonic_distance_right value.
Definition at line 886 of file NaoSensorInterface.cpp.
|
virtual |
Check if message is valid and can be enqueued.
message | Message to check |
Implements fawkes::Interface.
Definition at line 1531 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::r_cop_x | ( | ) | const |
Get r_cop_x value.
Center of pressure X for right foot.
Definition at line 728 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::r_cop_y | ( | ) | const |
Get r_cop_y value.
Center of pressure Y for right foot.
Definition at line 758 of file NaoSensorInterface.cpp.
uint8_t fawkes::NaoSensorInterface::r_foot_bumper_l | ( | ) | const |
Get r_foot_bumper_l value.
Right foot bumper left side
Definition at line 1016 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
uint8_t fawkes::NaoSensorInterface::r_foot_bumper_r | ( | ) | const |
Get r_foot_bumper_r value.
Right foot bumper right side
Definition at line 1046 of file NaoSensorInterface.cpp.
Referenced by NaoQiButtonThread::loop().
float fawkes::NaoSensorInterface::r_fsr_fl | ( | ) | const |
Get r_fsr_fl value.
Right FSR front left
Definition at line 488 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::r_fsr_fr | ( | ) | const |
Get r_fsr_fr value.
Right FSR front right
Definition at line 518 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::r_fsr_rl | ( | ) | const |
Get r_fsr_rl value.
Right FSR rear left
Definition at line 548 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::r_fsr_rr | ( | ) | const |
Get r_fsr_rr value.
Right FSR rear right
Definition at line 578 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::r_total_weight | ( | ) | const |
Get r_total_weight value.
Total weight on right foot
Definition at line 638 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_accel_x | ( | const float | new_accel_x | ) |
Set accel_x value.
Accelerometer x
new_accel_x | new accel_x value |
Definition at line 148 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_accel_y | ( | const float | new_accel_y | ) |
Set accel_y value.
Accelerometer y
new_accel_y | new accel_y value |
Definition at line 178 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_accel_z | ( | const float | new_accel_z | ) |
Set accel_z value.
Accelerometer z
new_accel_z | new accel_z value |
Definition at line 208 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_angle_x | ( | const float | new_angle_x | ) |
Set angle_x value.
Angle x
new_angle_x | new angle_x value |
Definition at line 328 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_angle_y | ( | const float | new_angle_y | ) |
Set angle_y value.
Angle y
new_angle_y | new angle_y value |
Definition at line 358 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_battery_charge | ( | const float | new_battery_charge | ) |
Set battery_charge value.
Battery charge
new_battery_charge | new battery_charge value |
Definition at line 1216 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_chest_button | ( | const uint8_t | new_chest_button | ) |
Set chest_button value.
Chest button state
new_chest_button | new chest_button value |
Definition at line 1186 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_gyro_ref | ( | const float | new_gyro_ref | ) |
Set gyro_ref value.
Gyrometer reference
new_gyro_ref | new gyro_ref value |
Definition at line 298 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_gyro_x | ( | const float | new_gyro_x | ) |
Set gyro_x value.
Gyrometer x
new_gyro_x | new gyro_x value |
Definition at line 238 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_gyro_y | ( | const float | new_gyro_y | ) |
Set gyro_y value.
Gyrometer y
new_gyro_y | new gyro_y value |
Definition at line 268 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_head_touch_front | ( | const uint8_t | new_head_touch_front | ) |
Set head_touch_front value.
Front part of head touch sensor (only Academics robot)
new_head_touch_front | new head_touch_front value |
Definition at line 1096 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_head_touch_middle | ( | const uint8_t | new_head_touch_middle | ) |
Set head_touch_middle value.
Middle part of head touch sensor (only Academics robot)
new_head_touch_middle | new head_touch_middle value |
Definition at line 1126 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_head_touch_rear | ( | const uint8_t | new_head_touch_rear | ) |
Set head_touch_rear value.
Rear part of head touch sensor (only Academics robot)
new_head_touch_rear | new head_touch_rear value |
Definition at line 1156 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_cop_x | ( | const float | new_l_cop_x | ) |
Set l_cop_x value.
Center of pressure X for left foot.
new_l_cop_x | new l_cop_x value |
Definition at line 688 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_cop_y | ( | const float | new_l_cop_y | ) |
Set l_cop_y value.
Center of pressure Y for left foot.
new_l_cop_y | new l_cop_y value |
Definition at line 718 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_foot_bumper_l | ( | const uint8_t | new_l_foot_bumper_l | ) |
Set l_foot_bumper_l value.
Left foot bumper left side
new_l_foot_bumper_l | new l_foot_bumper_l value |
Definition at line 976 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_foot_bumper_r | ( | const uint8_t | new_l_foot_bumper_r | ) |
Set l_foot_bumper_r value.
Left foot bumper right side
new_l_foot_bumper_r | new l_foot_bumper_r value |
Definition at line 1006 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_fsr_fl | ( | const float | new_l_fsr_fl | ) |
Set l_fsr_fl value.
Left FSR front left
new_l_fsr_fl | new l_fsr_fl value |
Definition at line 388 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_fsr_fr | ( | const float | new_l_fsr_fr | ) |
Set l_fsr_fr value.
Left FSR front right
new_l_fsr_fr | new l_fsr_fr value |
Definition at line 418 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_fsr_rl | ( | const float | new_l_fsr_rl | ) |
Set l_fsr_rl value.
Left FSR rear left
new_l_fsr_rl | new l_fsr_rl value |
Definition at line 448 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_fsr_rr | ( | const float | new_l_fsr_rr | ) |
Set l_fsr_rr value.
Left FSR rear right
new_l_fsr_rr | new l_fsr_rr value |
Definition at line 478 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_l_total_weight | ( | const float | new_l_total_weight | ) |
Set l_total_weight value.
Total weight on left foot
new_l_total_weight | new l_total_weight value |
Definition at line 628 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_cop_x | ( | const float | new_r_cop_x | ) |
Set r_cop_x value.
Center of pressure X for right foot.
new_r_cop_x | new r_cop_x value |
Definition at line 748 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_cop_y | ( | const float | new_r_cop_y | ) |
Set r_cop_y value.
Center of pressure Y for right foot.
new_r_cop_y | new r_cop_y value |
Definition at line 778 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_foot_bumper_l | ( | const uint8_t | new_r_foot_bumper_l | ) |
Set r_foot_bumper_l value.
Right foot bumper left side
new_r_foot_bumper_l | new r_foot_bumper_l value |
Definition at line 1036 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_foot_bumper_r | ( | const uint8_t | new_r_foot_bumper_r | ) |
Set r_foot_bumper_r value.
Right foot bumper right side
new_r_foot_bumper_r | new r_foot_bumper_r value |
Definition at line 1066 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_fsr_fl | ( | const float | new_r_fsr_fl | ) |
Set r_fsr_fl value.
Right FSR front left
new_r_fsr_fl | new r_fsr_fl value |
Definition at line 508 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_fsr_fr | ( | const float | new_r_fsr_fr | ) |
Set r_fsr_fr value.
Right FSR front right
new_r_fsr_fr | new r_fsr_fr value |
Definition at line 538 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_fsr_rl | ( | const float | new_r_fsr_rl | ) |
Set r_fsr_rl value.
Right FSR rear left
new_r_fsr_rl | new r_fsr_rl value |
Definition at line 568 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_fsr_rr | ( | const float | new_r_fsr_rr | ) |
Set r_fsr_rr value.
Right FSR rear right
new_r_fsr_rr | new r_fsr_rr value |
Definition at line 598 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_r_total_weight | ( | const float | new_r_total_weight | ) |
Set r_total_weight value.
Total weight on right foot
new_r_total_weight | new r_total_weight value |
Definition at line 658 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_ultrasonic_direction | ( | const UltrasonicDirection | new_ultrasonic_direction | ) |
Set ultrasonic_direction value.
Direction that was used to gather the ultrasonic readings.
new_ultrasonic_direction | new ultrasonic_direction value |
Definition at line 946 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_ultrasonic_distance_left | ( | const float * | new_ultrasonic_distance_left | ) |
Set ultrasonic_distance_left value.
First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.
new_ultrasonic_distance_left | new ultrasonic_distance_left value |
Definition at line 832 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_ultrasonic_distance_left | ( | unsigned int | index, |
const float | new_ultrasonic_distance_left | ||
) |
Set ultrasonic_distance_left value at given index.
First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.
new_ultrasonic_distance_left | new ultrasonic_distance_left value |
index | index for of the value |
Definition at line 846 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_ultrasonic_distance_right | ( | const float * | new_ultrasonic_distance_right | ) |
Set ultrasonic_distance_right value.
First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.
new_ultrasonic_distance_right | new ultrasonic_distance_right value |
Definition at line 899 of file NaoSensorInterface.cpp.
void fawkes::NaoSensorInterface::set_ultrasonic_distance_right | ( | unsigned int | index, |
const float | new_ultrasonic_distance_right | ||
) |
Set ultrasonic_distance_right value at given index.
First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.
new_ultrasonic_distance_right | new ultrasonic_distance_right value |
index | index for of the value |
Definition at line 913 of file NaoSensorInterface.cpp.
const char * fawkes::NaoSensorInterface::tostring_UltrasonicDirection | ( | UltrasonicDirection | value | ) | const |
Convert UltrasonicDirection constant to string.
value | value to convert to string |
Definition at line 110 of file NaoSensorInterface.cpp.
NaoSensorInterface::UltrasonicDirection fawkes::NaoSensorInterface::ultrasonic_direction | ( | ) | const |
Get ultrasonic_direction value.
Direction that was used to gather the ultrasonic readings.
Definition at line 924 of file NaoSensorInterface.cpp.
float * fawkes::NaoSensorInterface::ultrasonic_distance_left | ( | ) | const |
Get ultrasonic_distance_left value.
First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.
Definition at line 791 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::ultrasonic_distance_left | ( | unsigned int | index | ) | const |
Get ultrasonic_distance_left value at given index.
First four ultrasonic sensor readings from left receiver. Distance to detected object is in meters.
index | index of value |
Exception | thrown if index is out of bounds |
Definition at line 806 of file NaoSensorInterface.cpp.
float * fawkes::NaoSensorInterface::ultrasonic_distance_right | ( | ) | const |
Get ultrasonic_distance_right value.
First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.
Definition at line 858 of file NaoSensorInterface.cpp.
float fawkes::NaoSensorInterface::ultrasonic_distance_right | ( | unsigned int | index | ) | const |
Get ultrasonic_distance_right value at given index.
First four ultrasonic sensor readings from right receiver. Distance to detected object is in meters.
index | index of value |
Exception | thrown if index is out of bounds |
Definition at line 873 of file NaoSensorInterface.cpp.