Fawkes API  Fawkes Development Version
fawkes::MotorInterface Class Reference

MotorInterface Fawkes BlackBoard Interface. More...

#include <>>

Inheritance diagram for fawkes::MotorInterface:

Classes

class  AcquireControlMessage
 AcquireControlMessage Fawkes BlackBoard Interface Message. More...
 
class  DriveRPMMessage
 DriveRPMMessage Fawkes BlackBoard Interface Message. More...
 
class  GotoMessage
 GotoMessage Fawkes BlackBoard Interface Message. More...
 
class  LinTransRotMessage
 LinTransRotMessage Fawkes BlackBoard Interface Message. More...
 
class  OrbitMessage
 OrbitMessage Fawkes BlackBoard Interface Message. More...
 
class  ResetOdometryMessage
 ResetOdometryMessage Fawkes BlackBoard Interface Message. More...
 
class  RotMessage
 RotMessage Fawkes BlackBoard Interface Message. More...
 
class  SetMotorStateMessage
 SetMotorStateMessage Fawkes BlackBoard Interface Message. More...
 
class  SetOdometryMessage
 SetOdometryMessage Fawkes BlackBoard Interface Message. More...
 
class  TransMessage
 TransMessage Fawkes BlackBoard Interface Message. More...
 
class  TransRotMessage
 TransRotMessage 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...
 
uint32_t motor_state () const
 Get motor_state value. More...
 
void set_motor_state (const uint32_t new_motor_state)
 Set motor_state value. More...
 
size_t maxlenof_motor_state () const
 Get maximum length of motor_state value. More...
 
uint32_t drive_mode () const
 Get drive_mode value. More...
 
void set_drive_mode (const uint32_t new_drive_mode)
 Set drive_mode value. More...
 
size_t maxlenof_drive_mode () const
 Get maximum length of drive_mode value. More...
 
int32_t right_rpm () const
 Get right_rpm value. More...
 
void set_right_rpm (const int32_t new_right_rpm)
 Set right_rpm value. More...
 
size_t maxlenof_right_rpm () const
 Get maximum length of right_rpm value. More...
 
int32_t rear_rpm () const
 Get rear_rpm value. More...
 
void set_rear_rpm (const int32_t new_rear_rpm)
 Set rear_rpm value. More...
 
size_t maxlenof_rear_rpm () const
 Get maximum length of rear_rpm value. More...
 
int32_t left_rpm () const
 Get left_rpm value. More...
 
void set_left_rpm (const int32_t new_left_rpm)
 Set left_rpm value. More...
 
size_t maxlenof_left_rpm () const
 Get maximum length of left_rpm value. More...
 
float odometry_path_length () const
 Get odometry_path_length value. More...
 
void set_odometry_path_length (const float new_odometry_path_length)
 Set odometry_path_length value. More...
 
size_t maxlenof_odometry_path_length () const
 Get maximum length of odometry_path_length value. More...
 
float odometry_position_x () const
 Get odometry_position_x value. More...
 
void set_odometry_position_x (const float new_odometry_position_x)
 Set odometry_position_x value. More...
 
size_t maxlenof_odometry_position_x () const
 Get maximum length of odometry_position_x value. More...
 
float odometry_position_y () const
 Get odometry_position_y value. More...
 
void set_odometry_position_y (const float new_odometry_position_y)
 Set odometry_position_y value. More...
 
size_t maxlenof_odometry_position_y () const
 Get maximum length of odometry_position_y value. More...
 
float odometry_orientation () const
 Get odometry_orientation value. More...
 
void set_odometry_orientation (const float new_odometry_orientation)
 Set odometry_orientation value. More...
 
size_t maxlenof_odometry_orientation () const
 Get maximum length of odometry_orientation value. More...
 
float vx () const
 Get vx value. More...
 
void set_vx (const float new_vx)
 Set vx value. More...
 
size_t maxlenof_vx () const
 Get maximum length of vx value. More...
 
float vy () const
 Get vy value. More...
 
void set_vy (const float new_vy)
 Set vy value. More...
 
size_t maxlenof_vy () const
 Get maximum length of vy value. More...
 
float omega () const
 Get omega value. More...
 
void set_omega (const float new_omega)
 Set omega value. More...
 
size_t maxlenof_omega () const
 Get maximum length of omega value. More...
 
float des_vx () const
 Get des_vx value. More...
 
void set_des_vx (const float new_des_vx)
 Set des_vx value. More...
 
size_t maxlenof_des_vx () const
 Get maximum length of des_vx value. More...
 
float des_vy () const
 Get des_vy value. More...
 
void set_des_vy (const float new_des_vy)
 Set des_vy value. More...
 
size_t maxlenof_des_vy () const
 Get maximum length of des_vy value. More...
 
float des_omega () const
 Get des_omega value. More...
 
void set_des_omega (const float new_des_omega)
 Set des_omega value. More...
 
size_t maxlenof_des_omega () const
 Get maximum length of des_omega value. More...
 
uint32_t controller () const
 Get controller value. More...
 
void set_controller (const uint32_t new_controller)
 Set controller value. More...
 
size_t maxlenof_controller () const
 Get maximum length of controller value. More...
 
char * controller_thread_name () const
 Get controller_thread_name value. More...
 
void set_controller_thread_name (const char *new_controller_thread_name)
 Set controller_thread_name value. More...
 
size_t maxlenof_controller_thread_name () const
 Get maximum length of controller_thread_name 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 MOTOR_ENABLED = 0u
 MOTOR_ENABLED constant. More...
 
static const uint32_t MOTOR_DISABLED = 1u
 MOTOR_DISABLED constant. More...
 
static const uint32_t DRIVE_MODE_RPM = 1u
 DRIVE_MODE_RPM constant. More...
 
static const uint32_t DRIVE_MODE_TRANS = 2u
 DRIVE_MODE_TRANS constant. More...
 
static const uint32_t DRIVE_MODE_ROT = 3u
 DRIVE_MODE_ROT constant. More...
 
static const uint32_t DRIVE_MODE_TRANS_ROT = 4u
 DRIVE_MODE_TRANS_ROT constant. More...
 
static const uint32_t DRIVE_MODE_ORBIT = 5u
 DRIVE_MODE_ORBIT constant. More...
 
static const uint32_t DRIVE_MODE_LINE_TRANS_ROT = 6u
 DRIVE_MODE_LINE_TRANS_ROT 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

MotorInterface Fawkes BlackBoard Interface.

This interface is currently prepared best for a holonomic robot. It will need modifications or a split to support differential drives.

Definition at line 33 of file MotorInterface.h.

Member Function Documentation

◆ controller()

uint32_t fawkes::MotorInterface::controller ( ) const

Get controller value.

The ID of the controller. The controller ID is the instance serial of the sending interface. Only from this interface instance command messages are accepted.

Returns
controller value

Definition at line 640 of file MotorInterface.cpp.

◆ controller_thread_name()

char * fawkes::MotorInterface::controller_thread_name ( ) const

Get controller_thread_name value.

The name of the controlling thread, for easier debugging. This is informative only and actually two threads may share an interface instance (although this should be avoided since the interface locking has to be reproduced for these threads then).

Returns
controller_thread_name value

Definition at line 678 of file MotorInterface.cpp.

◆ copy_values()

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

Copy values from other interface.

Parameters
otherother interface to copy values from

Implements fawkes::Interface.

Definition at line 745 of file MotorInterface.cpp.

References fawkes::Message::type(), and fawkes::Interface::type().

◆ create_message()

Message * fawkes::MotorInterface::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 710 of file MotorInterface.cpp.

◆ des_omega()

float fawkes::MotorInterface::des_omega ( ) const

Get des_omega value.

Desired Rotation speed of the robot in rad/s.

Returns
des_omega value

Definition at line 604 of file MotorInterface.cpp.

Referenced by fawkes::BaseMotorInstruct::drive(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ des_vx()

float fawkes::MotorInterface::des_vx ( ) const

Get des_vx value.

Desired VX of the robot in m/s. Forward.

Returns
des_vx value

Definition at line 534 of file MotorInterface.cpp.

Referenced by fawkes::BaseMotorInstruct::drive(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ des_vy()

float fawkes::MotorInterface::des_vy ( ) const

Get des_vy value.

Desired VY of the robot in m/s. Left.

Returns
des_vy value

Definition at line 569 of file MotorInterface.cpp.

Referenced by fawkes::BaseMotorInstruct::drive(), and ColliThread::loop().

◆ drive_mode()

uint32_t fawkes::MotorInterface::drive_mode ( ) const

Get drive_mode value.

The current drive mode of the motor.

Returns
drive_mode value

Definition at line 149 of file MotorInterface.cpp.

◆ enum_tostring()

const char * fawkes::MotorInterface::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 756 of file MotorInterface.cpp.

◆ left_rpm()

int32_t fawkes::MotorInterface::left_rpm ( ) const

Get left_rpm value.

RPM of the motor on the left front of the robot.

Returns
left_rpm value

Definition at line 254 of file MotorInterface.cpp.

◆ maxlenof_controller()

size_t fawkes::MotorInterface::maxlenof_controller ( ) const

Get maximum length of controller value.

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

Definition at line 650 of file MotorInterface.cpp.

◆ maxlenof_controller_thread_name()

size_t fawkes::MotorInterface::maxlenof_controller_thread_name ( ) const

Get maximum length of controller_thread_name value.

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

Definition at line 688 of file MotorInterface.cpp.

◆ maxlenof_des_omega()

size_t fawkes::MotorInterface::maxlenof_des_omega ( ) const

Get maximum length of des_omega value.

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

Definition at line 614 of file MotorInterface.cpp.

◆ maxlenof_des_vx()

size_t fawkes::MotorInterface::maxlenof_des_vx ( ) const

Get maximum length of des_vx value.

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

Definition at line 544 of file MotorInterface.cpp.

◆ maxlenof_des_vy()

size_t fawkes::MotorInterface::maxlenof_des_vy ( ) const

Get maximum length of des_vy value.

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

Definition at line 579 of file MotorInterface.cpp.

◆ maxlenof_drive_mode()

size_t fawkes::MotorInterface::maxlenof_drive_mode ( ) const

Get maximum length of drive_mode value.

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

Definition at line 159 of file MotorInterface.cpp.

◆ maxlenof_left_rpm()

size_t fawkes::MotorInterface::maxlenof_left_rpm ( ) const

Get maximum length of left_rpm value.

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

Definition at line 264 of file MotorInterface.cpp.

◆ maxlenof_motor_state()

size_t fawkes::MotorInterface::maxlenof_motor_state ( ) const

Get maximum length of motor_state value.

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

Definition at line 124 of file MotorInterface.cpp.

◆ maxlenof_odometry_orientation()

size_t fawkes::MotorInterface::maxlenof_odometry_orientation ( ) const

Get maximum length of odometry_orientation value.

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

Definition at line 404 of file MotorInterface.cpp.

◆ maxlenof_odometry_path_length()

size_t fawkes::MotorInterface::maxlenof_odometry_path_length ( ) const

Get maximum length of odometry_path_length value.

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

Definition at line 299 of file MotorInterface.cpp.

◆ maxlenof_odometry_position_x()

size_t fawkes::MotorInterface::maxlenof_odometry_position_x ( ) const

Get maximum length of odometry_position_x value.

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

Definition at line 334 of file MotorInterface.cpp.

◆ maxlenof_odometry_position_y()

size_t fawkes::MotorInterface::maxlenof_odometry_position_y ( ) const

Get maximum length of odometry_position_y value.

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

Definition at line 369 of file MotorInterface.cpp.

◆ maxlenof_omega()

size_t fawkes::MotorInterface::maxlenof_omega ( ) const

Get maximum length of omega value.

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

Definition at line 509 of file MotorInterface.cpp.

◆ maxlenof_rear_rpm()

size_t fawkes::MotorInterface::maxlenof_rear_rpm ( ) const

Get maximum length of rear_rpm value.

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

Definition at line 229 of file MotorInterface.cpp.

◆ maxlenof_right_rpm()

size_t fawkes::MotorInterface::maxlenof_right_rpm ( ) const

Get maximum length of right_rpm value.

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

Definition at line 194 of file MotorInterface.cpp.

◆ maxlenof_vx()

size_t fawkes::MotorInterface::maxlenof_vx ( ) const

Get maximum length of vx value.

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

Definition at line 439 of file MotorInterface.cpp.

◆ maxlenof_vy()

size_t fawkes::MotorInterface::maxlenof_vy ( ) const

Get maximum length of vy value.

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

Definition at line 474 of file MotorInterface.cpp.

◆ message_valid()

bool fawkes::MotorInterface::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 2241 of file MotorInterface.cpp.

◆ motor_state()

uint32_t fawkes::MotorInterface::motor_state ( ) const

Get motor_state value.

The current state of the motor.

Returns
motor_state value

Definition at line 114 of file MotorInterface.cpp.

Referenced by JoystickTeleOpThread::loop(), and RobotinoActThread::loop().

◆ odometry_orientation()

float fawkes::MotorInterface::odometry_orientation ( ) const

Get odometry_orientation value.

The actual orientation of the robot relative to the orientation at the last ResetOdometry.

Returns
odometry_orientation value

Definition at line 394 of file MotorInterface.cpp.

Referenced by ColliThread::colli_relgoto(), ColliThread::colli_stop(), ROSOdometryThread::finalize(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ odometry_path_length()

float fawkes::MotorInterface::odometry_path_length ( ) const

Get odometry_path_length value.

The actual length of the robot's trajectory since the last ResetOdometry.

Returns
odometry_path_length value

Definition at line 289 of file MotorInterface.cpp.

◆ odometry_position_x()

float fawkes::MotorInterface::odometry_position_x ( ) const

Get odometry_position_x value.

The actual position of the robot relative to the position at the last ResetOdometry.

Returns
odometry_position_x value

Definition at line 324 of file MotorInterface.cpp.

Referenced by ColliThread::colli_relgoto(), ColliThread::colli_stop(), ROSOdometryThread::finalize(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ odometry_position_y()

float fawkes::MotorInterface::odometry_position_y ( ) const

Get odometry_position_y value.

The actual position of the robot relative to the position at the last ResetOdometry.

Returns
odometry_position_y value

Definition at line 359 of file MotorInterface.cpp.

Referenced by ColliThread::colli_relgoto(), ColliThread::colli_stop(), ROSOdometryThread::finalize(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ omega()

float fawkes::MotorInterface::omega ( ) const

Get omega value.

Rotation speed of the robot in rad/s.

Returns
omega value

Definition at line 499 of file MotorInterface.cpp.

Referenced by ROSOdometryThread::finalize(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ rear_rpm()

int32_t fawkes::MotorInterface::rear_rpm ( ) const

Get rear_rpm value.

RPM of motor on the rear of the robot.

Returns
rear_rpm value

Definition at line 219 of file MotorInterface.cpp.

◆ right_rpm()

int32_t fawkes::MotorInterface::right_rpm ( ) const

Get right_rpm value.

RPM of the motor on the right front of the robot.

Returns
right_rpm value

Definition at line 184 of file MotorInterface.cpp.

◆ set_controller()

void fawkes::MotorInterface::set_controller ( const uint32_t  new_controller)

Set controller value.

The ID of the controller. The controller ID is the instance serial of the sending interface. Only from this interface instance command messages are accepted.

Parameters
new_controllernew controller value

Definition at line 663 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ set_controller_thread_name()

void fawkes::MotorInterface::set_controller_thread_name ( const char *  new_controller_thread_name)

Set controller_thread_name value.

The name of the controlling thread, for easier debugging. This is informative only and actually two threads may share an interface instance (although this should be avoided since the interface locking has to be reproduced for these threads then).

Parameters
new_controller_thread_namenew controller_thread_name value

Definition at line 702 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ set_des_omega()

void fawkes::MotorInterface::set_des_omega ( const float  new_des_omega)

Set des_omega value.

Desired Rotation speed of the robot in rad/s.

Parameters
new_des_omeganew des_omega value

Definition at line 626 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), and RobotinoSimThread::loop().

◆ set_des_vx()

void fawkes::MotorInterface::set_des_vx ( const float  new_des_vx)

Set des_vx value.

Desired VX of the robot in m/s. Forward.

Parameters
new_des_vxnew des_vx value

Definition at line 556 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), and RobotinoSimThread::loop().

◆ set_des_vy()

void fawkes::MotorInterface::set_des_vy ( const float  new_des_vy)

Set des_vy value.

Desired VY of the robot in m/s. Left.

Parameters
new_des_vynew des_vy value

Definition at line 591 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), and RobotinoSimThread::loop().

◆ set_drive_mode()

void fawkes::MotorInterface::set_drive_mode ( const uint32_t  new_drive_mode)

Set drive_mode value.

The current drive mode of the motor.

Parameters
new_drive_modenew drive_mode value

Definition at line 171 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ set_left_rpm()

void fawkes::MotorInterface::set_left_rpm ( const int32_t  new_left_rpm)

Set left_rpm value.

RPM of the motor on the left front of the robot.

Parameters
new_left_rpmnew left_rpm value

Definition at line 276 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ set_motor_state()

void fawkes::MotorInterface::set_motor_state ( const uint32_t  new_motor_state)

Set motor_state value.

The current state of the motor.

Parameters
new_motor_statenew motor_state value

Definition at line 136 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::init(), and RobotinoActThread::loop().

◆ set_odometry_orientation()

void fawkes::MotorInterface::set_odometry_orientation ( const float  new_odometry_orientation)

Set odometry_orientation value.

The actual orientation of the robot relative to the orientation at the last ResetOdometry.

Parameters
new_odometry_orientationnew odometry_orientation value

Definition at line 416 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), RobotinoSimThread::loop(), and PlayerMotorPositionMapper::sync_player_to_fawkes().

◆ set_odometry_path_length()

void fawkes::MotorInterface::set_odometry_path_length ( const float  new_odometry_path_length)

Set odometry_path_length value.

The actual length of the robot's trajectory since the last ResetOdometry.

Parameters
new_odometry_path_lengthnew odometry_path_length value

Definition at line 311 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoSimThread::loop().

◆ set_odometry_position_x()

void fawkes::MotorInterface::set_odometry_position_x ( const float  new_odometry_position_x)

Set odometry_position_x value.

The actual position of the robot relative to the position at the last ResetOdometry.

Parameters
new_odometry_position_xnew odometry_position_x value

Definition at line 346 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), RobotinoSimThread::loop(), and PlayerMotorPositionMapper::sync_player_to_fawkes().

◆ set_odometry_position_y()

void fawkes::MotorInterface::set_odometry_position_y ( const float  new_odometry_position_y)

Set odometry_position_y value.

The actual position of the robot relative to the position at the last ResetOdometry.

Parameters
new_odometry_position_ynew odometry_position_y value

Definition at line 381 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), RobotinoSimThread::loop(), and PlayerMotorPositionMapper::sync_player_to_fawkes().

◆ set_omega()

void fawkes::MotorInterface::set_omega ( const float  new_omega)

Set omega value.

Rotation speed of the robot in rad/s.

Parameters
new_omeganew omega value

Definition at line 521 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), and RobotinoSimThread::loop().

◆ set_rear_rpm()

void fawkes::MotorInterface::set_rear_rpm ( const int32_t  new_rear_rpm)

Set rear_rpm value.

RPM of motor on the rear of the robot.

Parameters
new_rear_rpmnew rear_rpm value

Definition at line 241 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ set_right_rpm()

void fawkes::MotorInterface::set_right_rpm ( const int32_t  new_right_rpm)

Set right_rpm value.

RPM of the motor on the right front of the robot.

Parameters
new_right_rpmnew right_rpm value

Definition at line 206 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ set_vx()

void fawkes::MotorInterface::set_vx ( const float  new_vx)

Set vx value.

VX of the robot in m/s. Forward.

Parameters
new_vxnew vx value

Definition at line 451 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), and RobotinoSimThread::loop().

◆ set_vy()

void fawkes::MotorInterface::set_vy ( const float  new_vy)

Set vy value.

VY of the robot in m/s. Left.

Parameters
new_vynew vy value

Definition at line 486 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

Referenced by RobotinoActThread::loop(), and RobotinoSimThread::loop().

◆ vx()

float fawkes::MotorInterface::vx ( ) const

Get vx value.

VX of the robot in m/s. Forward.

Returns
vx value

Definition at line 429 of file MotorInterface.cpp.

Referenced by ROSOdometryThread::finalize(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

◆ vy()

float fawkes::MotorInterface::vy ( ) const

Get vy value.

VY of the robot in m/s. Left.

Returns
vy value

Definition at line 464 of file MotorInterface.cpp.

Referenced by ROSOdometryThread::finalize(), ColliThread::loop(), and fawkes::SelectDriveMode::update().

Member Data Documentation

◆ DRIVE_MODE_LINE_TRANS_ROT

const uint32_t fawkes::MotorInterface::DRIVE_MODE_LINE_TRANS_ROT = 6u
static

DRIVE_MODE_LINE_TRANS_ROT constant.

Definition at line 47 of file MotorInterface.h.

◆ DRIVE_MODE_ORBIT

const uint32_t fawkes::MotorInterface::DRIVE_MODE_ORBIT = 5u
static

DRIVE_MODE_ORBIT constant.

Definition at line 46 of file MotorInterface.h.

◆ DRIVE_MODE_ROT

const uint32_t fawkes::MotorInterface::DRIVE_MODE_ROT = 3u
static

DRIVE_MODE_ROT constant.

Definition at line 44 of file MotorInterface.h.

◆ DRIVE_MODE_RPM

const uint32_t fawkes::MotorInterface::DRIVE_MODE_RPM = 1u
static

DRIVE_MODE_RPM constant.

Definition at line 42 of file MotorInterface.h.

◆ DRIVE_MODE_TRANS

const uint32_t fawkes::MotorInterface::DRIVE_MODE_TRANS = 2u
static

DRIVE_MODE_TRANS constant.

Definition at line 43 of file MotorInterface.h.

◆ DRIVE_MODE_TRANS_ROT

const uint32_t fawkes::MotorInterface::DRIVE_MODE_TRANS_ROT = 4u
static

DRIVE_MODE_TRANS_ROT constant.

Definition at line 45 of file MotorInterface.h.

◆ MOTOR_DISABLED

const uint32_t fawkes::MotorInterface::MOTOR_DISABLED = 1u
static

MOTOR_DISABLED constant.

Definition at line 41 of file MotorInterface.h.

◆ MOTOR_ENABLED

const uint32_t fawkes::MotorInterface::MOTOR_ENABLED = 0u
static

MOTOR_ENABLED constant.

Definition at line 40 of file MotorInterface.h.


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