Class CTaoboticsIMU
Defined in File CTaoboticsIMU.h
Inheritance Relationships
Base Type
public mrpt::hwdrivers::CGenericSensor(Class CGenericSensor)
Class Documentation
-
class CTaoboticsIMU : public mrpt::hwdrivers::CGenericSensor
A driver for Taobotics IMU.
Supported models: HFI-A9, HFI-B9, HFI-B6.
Public Functions
-
CTaoboticsIMU()
-
~CTaoboticsIMU() override
-
virtual void loadConfig_sensorSpecific(const mrpt::config::CConfigFileBase &configSource, const std::string &iniSection) override
See the class documentation at the top for expected parameters
-
virtual void doProcess() override
This method will be invoked at a minimum rate of “process_rate” (Hz)
- Throws:
This – method must throw an exception with a descriptive message if some critical error is found.
-
virtual void initialize() override
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.
Protected Types
-
using parser_t = std::function<std::vector<mrpt::obs::CObservation::Ptr>(CTaoboticsIMU*, mrpt::containers::circular_buffer<uint8_t>&)>
Protected Functions
-
std::vector<mrpt::obs::CObservation::Ptr> parser_hfi_b6(mrpt::containers::circular_buffer<uint8_t> &buf) const
-
std::vector<mrpt::obs::CObservation::Ptr> parser_hfi_a9(mrpt::containers::circular_buffer<uint8_t> &buf) const
Protected Attributes
-
int m_baudRate = 921600
This serial port will be attempted to be opened automatically when this class is first used to request data from the device.
See also
comms::CSerialPort
-
std::string m_com_port = "/dev/ttyUSB0"
-
std::string m_sensorModel = "hfi-a9"
-
mrpt::poses::CPose3D m_sensorPose
-
mrpt::containers::circular_buffer<uint8_t> m_rx_buffer = {4096}
Auxiliary buffer for readings
-
std::unique_ptr<mrpt::comms::CSerialPort> m_serialPort
The serial port connection
-
mrpt::obs::CObservationIMU::Ptr m_observationGyro
-
CTaoboticsIMU()