Class for interfacing with the IMU. More...
#include <BeoSub/BeoSubIMU.H>
Public Member Functions | |
BeoSubIMU (OptionManager &mgr, const std::string &descrName="IMU", const std::string &tagName="IMU", const char *dev="/dev/ttyS0") | |
Initialize. | |
~BeoSubIMU () | |
Destructor. | |
void | setListener (rutz::shared_ptr< BeoSubIMUListener > listener) |
Setup a listener that will be called each time new data is received. | |
float | getXaccel () |
Get the current X acceleration. | |
float | getYaccel () |
Get the current Y acceleration. | |
float | getZaccel () |
Get the current Z acceleration. | |
Angle | getXvel () |
Get the current X velocity. | |
Angle | getYvel () |
Get the current Y velocity. | |
Angle | getZvel () |
Get the current Z velocity. | |
void | run () |
Protected Member Functions | |
void | start2 () |
get started | |
void | stop1 () |
get stopped | |
float | accelConvert (int data) |
float | rateConvert (int data) |
Class for interfacing with the IMU.
This is an IMU. It sends X,Y,Z acceleration and X,Y,Z angular velocity
Definition at line 58 of file BeoSubIMU.H.
BeoSubIMU::BeoSubIMU | ( | OptionManager & | mgr, | |
const std::string & | descrName = "IMU" , |
|||
const std::string & | tagName = "IMU" , |
|||
const char * | dev = "/dev/ttyS0" | |||
) |
Initialize.
Definition at line 55 of file BeoSubIMU.C.
References ModelComponent::addSubComponent().
BeoSubIMU::~BeoSubIMU | ( | ) |
Destructor.
Definition at line 82 of file BeoSubIMU.C.
float BeoSubIMU::getXaccel | ( | ) |
Get the current X acceleration.
Definition at line 168 of file BeoSubIMU.C.
Angle BeoSubIMU::getXvel | ( | ) |
Get the current X velocity.
Definition at line 195 of file BeoSubIMU.C.
float BeoSubIMU::getYaccel | ( | ) |
Get the current Y acceleration.
Definition at line 177 of file BeoSubIMU.C.
Angle BeoSubIMU::getYvel | ( | ) |
Get the current Y velocity.
Definition at line 204 of file BeoSubIMU.C.
float BeoSubIMU::getZaccel | ( | ) |
Get the current Z acceleration.
Definition at line 186 of file BeoSubIMU.C.
Angle BeoSubIMU::getZvel | ( | ) |
Get the current Z velocity.
Definition at line 213 of file BeoSubIMU.C.
void BeoSubIMU::setListener | ( | rutz::shared_ptr< BeoSubIMUListener > | listener | ) |
Setup a listener that will be called each time new data is received.
Definition at line 78 of file BeoSubIMU.C.
void BeoSubIMU::start2 | ( | ) | [protected, virtual] |
void BeoSubIMU::stop1 | ( | ) | [protected, virtual] |