BTK Python wrapper  0.3dev.0
Python bindings for the Biomechanical ToolKit library (BTK)
Public Member Functions | List of all members
btk.btkIMU Class Reference

Container of analog channels representing an inertial measurement unit (IMU). More...

Public Member Functions

def Clone
 
def GetAccelerometerX
 
def GetAccelerometerY
 
def GetAccelerometerZ
 
def GetCalMatrix
 
def GetChannel
 
def GetChannelNumber
 
def GetChannels
 
def GetDescription
 
def GetFrameNumber
 
def GetFrequency
 
def GetGyroscopeX
 
def GetGyroscopeY
 
def GetGyroscopeZ
 
def GetLabel
 
def GetTimestamp
 
def GetType
 
def Rotate
 
def SetCalMatrix
 
def SetChannel
 
def SetChannels
 
def SetDescription
 
def SetFrameNumber
 
def SetFrequency
 
def SetLabel
 
def Update
 

Detailed Description

Container of analog channels representing an inertial measurement unit (IMU).

Container of analog channels representing an inertial measurement unit (IMU).

This class proposes to store any number of analog channels but the 6 first channels could be 
used for 3 accelerometers and 3 gyroscopes as some convenient methods are proposed in this way
(see SetChannels(), GetAccelerometerX(), GetAccelerometerY(), GetAccelerometerZ(), GetGyroscopeX(), GetGyroscopeY(), GetGyroscopeZ()).

The storage of the channel is done using an ID and not an array index. You can then use the same ID for some kind of sensor even if other are missing (i.e. IMU with accelerometers disabled or configured with 1 acc, and 2 gyros., etc.).

Note: This class is still experimental and could be modified in a new release.

Member Function Documentation

def btk.btkIMU.Clone (   self )
Clone(self) -> btkIMU
def btk.btkIMU.GetAccelerometerX (   self )
GetAccelerometerX(self) -> btkAnalog

Convenient method to return the analog channel with the ID 0 (which should correspond to an accelerometer measuring data on the X axis of the IMU).
def btk.btkIMU.GetAccelerometerY (   self )
GetAccelerometerY(self) -> btkAnalog

Convenient method to return the analog channel with the ID 1 (which should correspond to an accelerometer measuring data on the Y axis of the IMU).
def btk.btkIMU.GetAccelerometerZ (   self )
GetAccelerometerZ(self) -> btkAnalog

Convenient method to return the analog channel with the ID 2 (which should correspond to an accelerometer measuring data on the Z axis of the IMU).
def btk.btkIMU.GetCalMatrix (   self )
GetCalMatrix(self) -> array (NumPy)
def btk.btkIMU.GetChannel (   self,   args  )
GetChannel(self, id) -> btkAnalog
GetChannel(self, arg2) -> btkAnalog

Returns the analog channel with the given ID or label. If there is no analog channel with the given ID, then an exception is thrown.
def btk.btkIMU.GetChannelNumber (   self )
GetChannelNumber(self) -> int

Returns the number of analog channels associated to this IMU.
def btk.btkIMU.GetChannels (   self )
GetChannels(self) -> btkAnalogCollection

Returns the analog channels of the IMU in a collection. The analog channels are pushed in the collection by using their ID.
def btk.btkIMU.GetDescription (   self )
GetDescription(self) -> std::string const &
def btk.btkIMU.GetFrameNumber (   self )
GetFrameNumber(self) -> int

Returns the number of frames set in this IMU.
def btk.btkIMU.GetFrequency (   self )
GetFrequency(self) -> double

Returns the frequency set to the IMU. (by default it is 0 Hz).
def btk.btkIMU.GetGyroscopeX (   self )
GetGyroscopeX(self) -> btkAnalog

Convenient method to return the analog channel with the ID 3 (which should correspond to a gyroscope measuring data on the X axis of the IMU).
def btk.btkIMU.GetGyroscopeY (   self )
GetGyroscopeY(self) -> btkAnalog

Convenient method to return the analog channel with the ID 4 (which should correspond to a gyroscope measuring data on the Y axis of the IMU).
def btk.btkIMU.GetGyroscopeZ (   self )
GetGyroscopeZ(self) -> btkAnalog

Convenient method to return the analog channel with the ID 5 (which should correspond to a gyroscope measuring data on the Z axis of the IMU).
def btk.btkIMU.GetLabel (   self )
GetLabel(self) -> std::string const &
def btk.btkIMU.GetTimestamp (   self )
GetTimestamp(self) -> unsigned long

Returns the timestamp of the object.
def btk.btkIMU.GetType (   self )
GetType(self) -> int

Returns the type of the IMU.
def btk.btkIMU.Rotate (   self,   args  )
Rotate(self, arg2)

Convenient method to rotate the analog channels with the IDs 0-5. This method handles the case where some of these analog channels are missing.
def btk.btkIMU.SetCalMatrix (   self,   args  )
SetCalMatrix(self, array)
def btk.btkIMU.SetChannel (   self,   args  )
SetChannel(self, id, btkAnalog)

Sets an analog channel to the given ID. If an analog channel is already set to this ID, then it is replaced.
def btk.btkIMU.SetChannels (   self,   args  )
SetChannels(self, btkAnalog, btkAnalog, btkAnalog, btkAnalog, btkAnalog, btkAnalog)

Sets the 6 first channels of the IMUs with the analog channels @a accX, @a accY, @a accZ, @a gyroX, @a gyroY, @a gyroZ.
def btk.btkIMU.SetDescription (   self,   args  )
SetDescription(self, arg2)
def btk.btkIMU.SetFrameNumber (   self,   args  )
SetFrameNumber(self, fn)

Set the number of frames for the IMU and modify also the number of frames for the channels.
def btk.btkIMU.SetFrequency (   self,   args  )
SetFrequency(self, f)

Sets the acquisition sample rate associated to the IMU.
def btk.btkIMU.SetLabel (   self,   args  )
SetLabel(self, arg2)
def btk.btkIMU.Update (   self )
Update(self)

Updates the ProcessObject associated with this DataObject.