Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
Imu.py File Reference

Laelaps Ineria Measurement Unit module. More...

Go to the source code of this file.

Classes

class  Laelaps.Imu.ImuException
 international system of units (m, s, radians, m/s, m/s^2, radians/s) More...
 
class  Laelaps.Imu.Imu
 IMU class. More...
 

Variables

string Laelaps.Imu.MSP_PREAMBLE = '$M'
 
string Laelaps.Imu.MSP_DIR_TO = '<'
 
string Laelaps.Imu.MSP_DIR_FROM = '>'
 
 Laelaps.Imu.MSP_CMD_PREAMBLE = MSP_PREAMBLE+MSP_DIR_TO
 
 Laelaps.Imu.MSP_RSP_PREAMBLE = MSP_PREAMBLE+MSP_DIR_FROM
 
int Laelaps.Imu.MSP_POS_SIZE = 3
 
int Laelaps.Imu.MSP_POS_CMD_ID = 4
 data size position in message
 
int Laelaps.Imu.MSP_POS_DATA = 5
 command id position in message
 
int Laelaps.Imu.MSP_CMD_HDR_LEN = len(MSP_CMD_PREAMBLE)+2
 start of data position in message More...
 
int Laelaps.Imu.MSP_CMD_MIN_LEN = MSP_CMD_HDR_LEN+1
 command minimum length (no data)
 
int Laelaps.Imu.MSP_RSP_HDR_LEN = len(MSP_RSP_PREAMBLE)+2
 response header length (preamble + size + cmdid)
 
int Laelaps.Imu.MSP_RSP_MIN_LEN = MSP_RSP_HDR_LEN+1
 response minimum length (no data)
 
int Laelaps.Imu.MSP_IDENT = 100
 
int Laelaps.Imu.MSP_RAW_IMU = 102
 
int Laelaps.Imu.MSP_ATTITUDE = 108
 
int Laelaps.Imu.X = 0
 
int Laelaps.Imu.Y = 1
 x axis index
 
int Laelaps.Imu.Z = 2
 y axis index
 
int Laelaps.Imu.ROLL = 0
 z axis index
 
int Laelaps.Imu.PITCH = 1
 roll index
 
int Laelaps.Imu.YAW = 2
 pitch index
 
int Laelaps.Imu.NUM_AXES = 3
 yaw index
 
float Laelaps.Imu.G = 9.80665
 number of axes
 
float Laelaps.Imu.DEG_TO_RAD = math.pi/180.0
 standard gravity in m/s^2
 
float Laelaps.Imu.MSP_ACCEL_RAW_TO_G = 1.0
 math can save your life
 
float Laelaps.Imu.MSP_GYRO_RAW_TO_DEG_PER_S = 1.0
 raw IMU acceleration conversion
 
float Laelaps.Imu.MSP_ATTITUDE_RAW_TO_DEG = 0.1
 raw IMU rotation conversion
 
string Laelaps.Imu.UNITS_RAW = 'raw'
 attitude conversion
 
string Laelaps.Imu.UNITS_G = 'g'
 raw sensor values
 
string Laelaps.Imu.UNITS_M_PER_S2 = 'm/s^2'
 acceleration in standard g's
 
string Laelaps.Imu.UNITS_DEG_PER_S = 'deg/s'
 acceleration in meters/second^2
 
string Laelaps.Imu.UNITS_RAD_PER_S = 'rad/s'
 degrees/second
 
string Laelaps.Imu.UNITS_DEG = 'degrees'
 radians/second
 
string Laelaps.Imu.UNITS_RAD = 'radians'
 degrees
 
string Laelaps.Imu.UNITS_SI = 'si'
 radians
 
string Laelaps.Imu.device = "/dev/ttyUSB0"
 
int Laelaps.Imu.baud = 115200
 
 Laelaps.Imu.imu = Imu()
 
 Laelaps.Imu.baudrate
 
 Laelaps.Imu.ident = imu.readIdent()
 
 Laelaps.Imu.meas = imu.readRawImu()
 
 Laelaps.Imu.rpy = imu.readAttitude('degrees')
 

Detailed Description

Laelaps Ineria Measurement Unit module.

LastChangedDate
2016-02-02 13:47:13 -0700 (Tue, 02 Feb 2016)
Rev
4293
Author
: Robin Knight (robin.nosp@m..kni.nosp@m.ght@r.nosp@m.oadn.nosp@m.arrow.nosp@m.s.co.nosp@m.m)
Copyright
© 2015-2017. RoadNarrows LLC.
http://www.roadnarrows.com
All Rights Reserved
EULA@

Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that (1) The above copyright notice and the following two paragraphs appear in all copies of the source code and (2) redistributions including binaries reproduces these notices in the supporting documentation. Substantial modifications to this software may be copyrighted by their authors and need not follow the licensing terms described here, provided that the new terms are clearly indicated in all files where they apply.

IN NO EVENT SHALL THE AUTHOR, ROADNARROWS LLC, OR ANY MEMBERS/EMPLOYEES OF ROADNARROW LLC OR DISTRIBUTORS OF THIS SOFTWARE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE ABOVE PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

THE AUTHOR AND ROADNARROWS LLC SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

—@

Definition in file Imu.py.

Variable Documentation

int Laelaps.Imu.MSP_CMD_HDR_LEN = len(MSP_CMD_PREAMBLE)+2

start of data position in message

command header length (preamble + size + cmdid)

Definition at line 78 of file Imu.py.