Public Member Functions | Public Attributes | List of all members
wiimote_node.IMUSender Class Reference
Inheritance diagram for wiimote_node.IMUSender:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, wiiMote, freq=100)
 
def run (self)
 
- Public Member Functions inherited from wiimote_node.WiimoteDataSender
def __init__ (self, wiiMote, freq=100)
 
def canonicalizeWiistate (self)
 
def obtainWiimoteData (self)
 

Public Attributes

 pub
 
 threadName
 
- Public Attributes inherited from wiimote_node.WiimoteDataSender
 angular_velocity_covariance
 
 freq
 
 gyroAbsence_covariance
 
 linear_acceleration_covariance
 
 sleepDuration
 
 wiiMote
 
 wiistate
 

Detailed Description

Broadcasting Wiimote accelerator and gyro readings as IMU messages to Topic sensor_data/Imu

Definition at line 217 of file wiimote_node.py.

Constructor & Destructor Documentation

def wiimote_node.IMUSender.__init__ (   self,
  wiiMote,
  freq = 100 
)
Initializes the Wiimote IMU publisher.
    
Parameters:
    wiiMote: a bluetooth-connected, calibrated WIIMote instance
    freq:    the message sending frequency in messages/sec. Max is 100, because
     the Wiimote only samples the sensors at 100Hz.

Definition at line 220 of file wiimote_node.py.

Member Function Documentation

def wiimote_node.IMUSender.run (   self)
Loop that obtains the latest wiimote state, publishes the IMU data, and sleeps.

The IMU message, if fully filled in, contains information on orientation,
acceleration (in m/s^2), and angular rate (in radians/sec). For each of
these quantities, the IMU message format also wants the corresponding
covariance matrix.

Wiimote only gives us acceleration and angular rate. So we ensure that the orientation
data entry is marked invalid. We do this by setting the first
entry of its associated covariance matrix to -1. The covariance
matrices are the 3x3 matrix with the axes' variance in the 
diagonal. We obtain the variance from the Wiimote instance.  

Definition at line 233 of file wiimote_node.py.

Member Data Documentation

wiimote_node.IMUSender.pub

Definition at line 231 of file wiimote_node.py.

wiimote_node.IMUSender.threadName

Definition at line 249 of file wiimote_node.py.


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


wiimote
Author(s): Andreas Paepcke, Melonee Wise, Mark Horn
autogenerated on Fri Jun 7 2019 22:01:33