class mrpt::hwdrivers::CTaoboticsIMU

A driver for Taobotics IMU.

Supported models: HFI-A9, HFI-B9, HFI-B6.

#include <mrpt/hwdrivers/CTaoboticsIMU.h>

class CTaoboticsIMU: public mrpt::hwdrivers::CGenericSensor
{
public:
    // construction

    CTaoboticsIMU();

    //
methods

    virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase& configSource, const std::string& iniSection);
    virtual void doProcess();
    virtual void initialize();
    void setSerialPort(const std::string& serialPort);
    void setSerialBaudRate(int rate);
};

Inherited Members

public:
    //
methods

    CGenericSensor& operator = (const CGenericSensor&);
    virtual void doProcess() = 0;

Methods

virtual void loadConfig_sensorSpecific(
    const mrpt::config::CConfigFileBase& configSource,
    const std::string& iniSection
    )

See the class documentation at the top for expected parameters.

virtual void doProcess()

This method will be invoked at a minimum rate of “process_rate” (Hz)

Parameters:

This

method must throw an exception with a descriptive message if some critical error is found.

virtual void initialize()

Opens the serial port and start streaming data.

You must have called loadConfig_sensorSpecific before calling this function, or set the configuration via the provided methods, e.g. setSerialPort(), etc.

void setSerialPort(const std::string& serialPort)

Must be called before initialize().

If not set, the default is “/dev/ttyUSB0”. Use “COM1”, etc. for Windows.

void setSerialBaudRate(int rate)

Must be called before initialize().

If not called, the default 921600 is used.