Fawkes API  Fawkes Development Version
fawkes::MotorInterface Class Reference

#include <>>

Inheritance diagram for fawkes::MotorInterface:

Classes

class  AcquireControlMessage
 
class  DriveRPMMessage
 
class  GotoMessage
 
class  LinTransRotMessage
 
class  OrbitMessage
 
class  ResetOdometryMessage
 
class  RotMessage
 
class  SetMotorStateMessage
 
class  SetOdometryMessage
 
class  TransMessage
 
class  TransRotMessage
 

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
 
virtual void copy_values (const Interface *other)
 Copy values from other interface. More...
 
virtual const char * enum_tostring (const char *enumtype, int val) const
 
- 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
 
unsigned int data_size
 
bool data_changed
 
interface_data_ts_tdata_ts
 

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 37 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 644 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 682 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 750 of file MotorInterface.cpp.

◆ 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 715 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 608 of file MotorInterface.cpp.

Referenced by 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 538 of file MotorInterface.cpp.

Referenced by 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 573 of file MotorInterface.cpp.

Referenced by fawkes::SelectDriveMode::update().

◆ 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 153 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 761 of file MotorInterface.cpp.

References fawkes::Interface::data_ptr, and fawkes::Interface::data_size.

◆ 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 258 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 654 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 692 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 618 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 548 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 583 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 163 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 268 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 128 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 408 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 303 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 338 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 373 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 513 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 233 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 198 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 443 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 478 of file MotorInterface.cpp.

References fawkes::Interface::data_changed.

◆ 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 2248 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 118 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 398 of file MotorInterface.cpp.

Referenced by ColliThread::colli_relgoto(), and ColliThread::colli_stop().

◆ 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 293 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 328 of file MotorInterface.cpp.

Referenced by ColliThread::colli_relgoto(), and ColliThread::colli_stop().

◆ 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 363 of file MotorInterface.cpp.

Referenced by ColliThread::colli_relgoto(), and ColliThread::colli_stop().

◆ omega()

float fawkes::MotorInterface::omega ( ) const

Get omega value.

Rotation speed of the robot in rad/s.

Returns
omega value

Definition at line 503 of file MotorInterface.cpp.

Referenced by TimeOffsetCalibration::calibrate(), and ColliThread::loop().

◆ 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 223 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 188 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 667 of file MotorInterface.cpp.

◆ 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 706 of file MotorInterface.cpp.

◆ 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 630 of file MotorInterface.cpp.

◆ 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 560 of file MotorInterface.cpp.

◆ 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 595 of file MotorInterface.cpp.

◆ 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 175 of file MotorInterface.cpp.

◆ 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 280 of file MotorInterface.cpp.

◆ 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 140 of file MotorInterface.cpp.

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 420 of file MotorInterface.cpp.

Referenced by 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 315 of file MotorInterface.cpp.

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 350 of file MotorInterface.cpp.

Referenced by 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 385 of file MotorInterface.cpp.

Referenced by 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 525 of file MotorInterface.cpp.

◆ 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 245 of file MotorInterface.cpp.

◆ 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 210 of file MotorInterface.cpp.

◆ 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 455 of file MotorInterface.cpp.

◆ 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 490 of file MotorInterface.cpp.

◆ vx()

float fawkes::MotorInterface::vx ( ) const

Get vx value.

VX of the robot in m/s. Forward.

Returns
vx value

Definition at line 433 of file MotorInterface.cpp.

Referenced by ColliThread::loop().

◆ vy()

float fawkes::MotorInterface::vy ( ) const

Get vy value.

VY of the robot in m/s. Left.

Returns
vy value

Definition at line 468 of file MotorInterface.cpp.

Referenced by ColliThread::loop().

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 56 of file MotorInterface.h.

◆ DRIVE_MODE_ORBIT

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

DRIVE_MODE_ORBIT constant.

Definition at line 55 of file MotorInterface.h.

◆ DRIVE_MODE_ROT

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

DRIVE_MODE_ROT constant.

Definition at line 53 of file MotorInterface.h.

◆ DRIVE_MODE_RPM

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

DRIVE_MODE_RPM constant.

Definition at line 51 of file MotorInterface.h.

◆ DRIVE_MODE_TRANS

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

DRIVE_MODE_TRANS constant.

Definition at line 52 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 54 of file MotorInterface.h.

◆ MOTOR_DISABLED

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

MOTOR_DISABLED constant.

Definition at line 50 of file MotorInterface.h.

◆ MOTOR_ENABLED

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

MOTOR_ENABLED constant.

Definition at line 49 of file MotorInterface.h.


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