YARP
Yet Another Robot Platform

imuBosch_BNO055: This device will connect to the proper analogServer and read the data broadcasted making them available to use for the user application. More...

#include <imuBosch_BNO055/imuBosch_BNO055.h>

+ Inheritance diagram for BoschIMU:

Public Member Functions

 BoschIMU ()
 
 ~BoschIMU ()
 
bool open (yarp::os::Searchable &config) override
 Open the device and set up parameters/communication. More...
 
bool close () override
 Close the device. More...
 
bool read (yarp::sig::Vector &out) override
 Read a vector from the sensor. More...
 
bool getChannels (int *nc) override
 Get the number of channels of the sensor. More...
 
bool calibrate (int ch, double v) override
 Calibrate the sensor, single channel. More...
 
size_t getNrOfThreeAxisGyroscopes () const override
 Get the number of three axis gyroscopes in the device. More...
 
yarp::dev::MAS_status getThreeAxisGyroscopeStatus (size_t sens_index) const override
 Get the status of three axis gyroscope. More...
 
bool getThreeAxisGyroscopeName (size_t sens_index, std::string &name) const override
 Get the name of three axis gyroscope. More...
 
bool getThreeAxisGyroscopeFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame in which three axis gyroscope measurements are expressed. More...
 
bool getThreeAxisGyroscopeMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get three axis gyroscope measurements. More...
 
size_t getNrOfThreeAxisLinearAccelerometers () const override
 Get the number of three axis linear accelerometers in the device. More...
 
yarp::dev::MAS_status getThreeAxisLinearAccelerometerStatus (size_t sens_index) const override
 Get the status of three axis linear accelerometer. More...
 
bool getThreeAxisLinearAccelerometerName (size_t sens_index, std::string &name) const override
 Get the name of three axis linear accelerometer. More...
 
bool getThreeAxisLinearAccelerometerFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame in which three axis linear accelerometer measurements are expressed. More...
 
bool getThreeAxisLinearAccelerometerMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get three axis linear accelerometer measurements. More...
 
size_t getNrOfThreeAxisMagnetometers () const override
 Get the number of three axis magnetometers in the device. More...
 
yarp::dev::MAS_status getThreeAxisMagnetometerStatus (size_t sens_index) const override
 Get the status of three axis magnetometer. More...
 
bool getThreeAxisMagnetometerName (size_t sens_index, std::string &name) const override
 Get the name of three axis magnetometer. More...
 
bool getThreeAxisMagnetometerFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame in which three axis magnetometer measurements are expressed. More...
 
bool getThreeAxisMagnetometerMeasure (size_t sens_index, yarp::sig::Vector &out, double &timestamp) const override
 Get three axis magnetometer measurements. More...
 
size_t getNrOfOrientationSensors () const override
 Get the number of orientation sensors in the device. More...
 
yarp::dev::MAS_status getOrientationSensorStatus (size_t sens_index) const override
 Get the status of orientation sensor. More...
 
bool getOrientationSensorName (size_t sens_index, std::string &name) const override
 Get the name of orientation sensor. More...
 
bool getOrientationSensorFrameName (size_t sens_index, std::string &frameName) const override
 Get the name of the frame in which orientation sensor measurements are expressed. More...
 
bool getOrientationSensorMeasureAsRollPitchYaw (size_t sens_index, yarp::sig::Vector &rpy, double &timestamp) const override
 Get orientation sensor measurements. More...
 
bool threadInit () override
 Initialize process with desired device configurations. More...
 
void threadRelease () override
 Terminate communication with the device and release the thread. More...
 
void run () override
 Update loop where measurements are read from the device. More...
 
- Public Member Functions inherited from yarp::dev::DeviceDriver
 ~DeviceDriver () override=default
 Destructor. More...
 
template<class T >
bool view (T *&x)
 Get an interface to the device driver. More...
 
virtual DeviceDrivergetImplementation ()
 Some drivers are bureaucrats, pointing at others. More...
 
- Public Member Functions inherited from yarp::os::IConfig
virtual ~IConfig ()
 Destructor. More...
 
virtual bool configure (Searchable &config)
 Change online parameters. More...
 
- Public Member Functions inherited from yarp::os::PeriodicThread
 PeriodicThread (double period, ShouldUseSystemClock useSystemClock=ShouldUseSystemClock::No, PeriodicThreadClock clockAccuracy=PeriodicThreadClock::Relative)
 Constructor. More...
 
 PeriodicThread (double period, PeriodicThreadClock clockAccuracy)
 Constructor. More...
 
virtual ~PeriodicThread ()
 
bool start ()
 Call this to start the thread. More...
 
void step ()
 Call this to "step" the thread rather than starting it. More...
 
void stop ()
 Call this to stop the thread, this call blocks until the thread is terminated (and releaseThread() called). More...
 
void askToStop ()
 Stop the thread. More...
 
bool isRunning () const
 Returns true when the thread is started, false otherwise. More...
 
bool isSuspended () const
 Returns true when the thread is suspended, false otherwise. More...
 
bool setPeriod (double period)
 Set the (new) period of the thread. More...
 
double getPeriod () const
 Return the current period of the thread. More...
 
void suspend ()
 Suspend the thread, the thread keeps running by doLoop is never executed. More...
 
void resume ()
 Resume the thread if previously suspended. More...
 
void resetStat ()
 Reset thread statistics. More...
 
double getEstimatedPeriod () const
 Return estimated period since last reset. More...
 
void getEstimatedPeriod (double &av, double &std) const
 Return estimated period since last reset. More...
 
unsigned int getIterations () const
 Return the number of iterations performed since last reset. More...
 
double getEstimatedUsed () const
 Return the estimated duration of the run() function since last reset. More...
 
void getEstimatedUsed (double &av, double &std) const
 Return estimated duration of the run() function since last reset. More...
 
int setPriority (int priority, int policy=-1)
 Set the priority and scheduling policy of the thread, if the OS supports that. More...
 
int getPriority () const
 Query the current priority of the thread, if the OS supports that. More...
 
int getPolicy () const
 Query the current scheduling policy of the thread, if the OS supports that. More...
 
- Public Member Functions inherited from yarp::dev::IGenericSensor
virtual ~IGenericSensor ()
 
- Public Member Functions inherited from yarp::dev::IThreeAxisGyroscopes
virtual ~IThreeAxisGyroscopes ()
 
- Public Member Functions inherited from yarp::dev::IThreeAxisLinearAccelerometers
virtual ~IThreeAxisLinearAccelerometers ()
 
- Public Member Functions inherited from yarp::dev::IThreeAxisMagnetometers
virtual ~IThreeAxisMagnetometers ()
 
- Public Member Functions inherited from yarp::dev::IOrientationSensors
virtual ~IOrientationSensors ()
 

Protected Types

using ReadFuncPtr = bool(BoschIMU::*)(unsigned char, int, unsigned char *, std::string)
 Functor to choose between i2c or serial comm. More...
 

Protected Member Functions

bool checkWriteResponse (unsigned char *response)
 
bool checkReadResponse (unsigned char *response)
 
void printBuffer (unsigned char *buffer, int length)
 
int readBytes (unsigned char *buffer, int bytes)
 
void dropGarbage ()
 
void readSysError ()
 
bool sendReadCommandSer (unsigned char register_add, int len, unsigned char *buf, std::string comment="")
 
bool sendWriteCommandSer (unsigned char register_add, int len, unsigned char *cmd, std::string comment="")
 
bool sendAndVerifyCommandSer (unsigned char register_add, int len, unsigned char *cmd, std::string comment)
 
bool sendReadCommandI2c (unsigned char register_add, int len, unsigned char *buf, std::string comment="")
 
- Protected Member Functions inherited from yarp::os::PeriodicThread
virtual void beforeStart ()
 Called just before a new thread starts. More...
 
virtual void afterStart (bool success)
 Called just after a new thread starts (or fails to start), this is executed by the same thread that calls start(). More...
 

Protected Attributes

bool verbose
 Flag to get verbose output. More...
 
short status
 device status - UNUSED More...
 
int nChannels
 number of channels in the output port. Default 12. If 16, also includes quaternion data More...
 
yarp::sig::Vector data
 sensor data buffer More...
 
yarp::sig::Vector data_tmp
 sensor data temporary buffer More...
 
yarp::math::Quaternion quaternion
 orientation in quaternion representation More...
 
yarp::math::Quaternion quaternion_tmp
 orientation in quaternion representation More...
 
yarp::sig::Vector RPY_angle
 orientation in Euler angle representation More...
 
double m_timeStamp
 device timestamp More...
 
double timeLastReport
 timestamp of last reported data More...
 
std::mutex mutex
 mutex to avoid resource clash More...
 
bool i2c_flag
 flag to check if device connected through i2c commununication More...
 
bool checkError
 flag to check read error of sensor data More...
 
int fd
 file descriptor to open device at system level More...
 
size_t responseOffset
 
yarp::os::ResourceFinder rf
 resource finder object to load config parameters More...
 
ReadFuncPtr readFunc
 Functor object. More...
 
unsigned char command [MAX_MSG_LENGTH]
 packet to be written to the device More...
 
unsigned char response [MAX_MSG_LENGTH]
 packet to be read from the device More...
 
long int totMessagesRead
 
yarp::sig::Vector errorCounter
 
yarp::sig::Vector errorReading
 
int errs
 
std::atomic< bool > dataIsValid
 

Detailed Description

imuBosch_BNO055: This device will connect to the proper analogServer and read the data broadcasted making them available to use for the user application.

It also made available some function to check and control the state of the remote sensor.

Description of input parameters

Parameters accepted in the config argument of the open method:

Parameter name Type Units Default Value Required Description Notes
comport string Yes if i2c not specified full name of device file ex '/dev/ttyUSB0', it is mutually exclusive with 'i2c' parameter
baudrate int Hz Yes if i2c not specified baudrate setting of COM port ex 115200, used only with serial configuration
i2c string Yes if comport not specified full name of device file ex '/dev/i2c-5', it is mutually exclusive with 'comport' parameter, necessary for i2c configuration
period int ms 10 No period of the thread
sensor_name string sensor_imu_bosch_bno055 No full name of the device
frame_name string set same as sensor_name No full name of the sensor frame in which the measurements are expressed

Definition at line 136 of file imuBosch_BNO055.h.

Member Typedef Documentation

◆ ReadFuncPtr

using BoschIMU::ReadFuncPtr = bool (BoschIMU::*)(unsigned char, int, unsigned char*, std::string)
protected

Functor to choose between i2c or serial comm.

Definition at line 165 of file imuBosch_BNO055.h.

Constructor & Destructor Documentation

◆ BoschIMU()

BoschIMU::BoschIMU ( )

Definition at line 48 of file imuBosch_BNO055.cpp.

◆ ~BoschIMU()

BoschIMU::~BoschIMU ( )
default

Member Function Documentation

◆ calibrate()

bool BoschIMU::calibrate ( int  ch,
double  v 
)
overridevirtual

Calibrate the sensor, single channel.

Parameters
[in]chchannel number
[in]vreset value
Returns
true/false success/failure

Implements yarp::dev::IGenericSensor.

Definition at line 731 of file imuBosch_BNO055.cpp.

◆ checkReadResponse()

bool BoschIMU::checkReadResponse ( unsigned char *  response)
protected

Definition at line 210 of file imuBosch_BNO055.cpp.

◆ checkWriteResponse()

bool BoschIMU::checkWriteResponse ( unsigned char *  response)
protected

Definition at line 239 of file imuBosch_BNO055.cpp.

◆ close()

bool BoschIMU::close ( )
overridevirtual

Close the device.

Returns
true/false success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 202 of file imuBosch_BNO055.cpp.

◆ dropGarbage()

void BoschIMU::dropGarbage ( )
protected

Definition at line 384 of file imuBosch_BNO055.cpp.

◆ getChannels()

bool BoschIMU::getChannels ( int *  nc)
overridevirtual

Get the number of channels of the sensor.

Parameters
[out]ncpointer to storage, return value
Returns
true/false success/failure

Implements yarp::dev::IGenericSensor.

Definition at line 725 of file imuBosch_BNO055.cpp.

◆ getNrOfOrientationSensors()

size_t BoschIMU::getNrOfOrientationSensors ( ) const
overridevirtual

Get the number of orientation sensors in the device.

Returns
1

Implements yarp::dev::IOrientationSensors.

Definition at line 856 of file imuBosch_BNO055.cpp.

◆ getNrOfThreeAxisGyroscopes()

size_t BoschIMU::getNrOfThreeAxisGyroscopes ( ) const
overridevirtual

Get the number of three axis gyroscopes in the device.

Returns
1

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 817 of file imuBosch_BNO055.cpp.

◆ getNrOfThreeAxisLinearAccelerometers()

size_t BoschIMU::getNrOfThreeAxisLinearAccelerometers ( ) const
overridevirtual

Get the number of three axis linear accelerometers in the device.

Returns
1

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 777 of file imuBosch_BNO055.cpp.

◆ getNrOfThreeAxisMagnetometers()

size_t BoschIMU::getNrOfThreeAxisMagnetometers ( ) const
overridevirtual

Get the number of three axis magnetometers in the device.

Returns
1

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 894 of file imuBosch_BNO055.cpp.

◆ getOrientationSensorFrameName()

bool BoschIMU::getOrientationSensorFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame in which orientation sensor measurements are expressed.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]frameNamename of the sensor frame
Returns
true/false success/failure

Implements yarp::dev::IOrientationSensors.

Definition at line 871 of file imuBosch_BNO055.cpp.

◆ getOrientationSensorMeasureAsRollPitchYaw()

bool BoschIMU::getOrientationSensorMeasureAsRollPitchYaw ( size_t  sens_index,
yarp::sig::Vector rpy,
double &  timestamp 
) const
overridevirtual

Get orientation sensor measurements.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]outRPY Euler angles in deg
[out]timestamptimestamp of measurement
Returns
true/false success/failure

Implements yarp::dev::IOrientationSensors.

Definition at line 876 of file imuBosch_BNO055.cpp.

◆ getOrientationSensorName()

bool BoschIMU::getOrientationSensorName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of orientation sensor.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]namename of the sensor
Returns
true/false success/failure

Implements yarp::dev::IOrientationSensors.

Definition at line 866 of file imuBosch_BNO055.cpp.

◆ getOrientationSensorStatus()

yarp::dev::MAS_status BoschIMU::getOrientationSensorStatus ( size_t  sens_index) const
overridevirtual

Get the status of orientation sensor.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
Returns
MAS_OK/MAS_ERROR if status ok/failure

Implements yarp::dev::IOrientationSensors.

Definition at line 861 of file imuBosch_BNO055.cpp.

◆ getThreeAxisGyroscopeFrameName()

bool BoschIMU::getThreeAxisGyroscopeFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame in which three axis gyroscope measurements are expressed.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]frameNamename of the sensor frame
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 833 of file imuBosch_BNO055.cpp.

◆ getThreeAxisGyroscopeMeasure()

bool BoschIMU::getThreeAxisGyroscopeMeasure ( size_t  sens_index,
yarp::sig::Vector out,
double &  timestamp 
) const
overridevirtual

Get three axis gyroscope measurements.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]out3D angular velocity measurement in deg/s
[out]timestamptimestamp of measurement
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 838 of file imuBosch_BNO055.cpp.

◆ getThreeAxisGyroscopeName()

bool BoschIMU::getThreeAxisGyroscopeName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of three axis gyroscope.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]namename of the sensor
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 828 of file imuBosch_BNO055.cpp.

◆ getThreeAxisGyroscopeStatus()

yarp::dev::MAS_status BoschIMU::getThreeAxisGyroscopeStatus ( size_t  sens_index) const
overridevirtual

Get the status of three axis gyroscope.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
Returns
MAS_OK/MAS_ERROR if status ok/failure

Implements yarp::dev::IThreeAxisGyroscopes.

Definition at line 823 of file imuBosch_BNO055.cpp.

◆ getThreeAxisLinearAccelerometerFrameName()

bool BoschIMU::getThreeAxisLinearAccelerometerFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame in which three axis linear accelerometer measurements are expressed.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]frameNamename of the sensor frame
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 793 of file imuBosch_BNO055.cpp.

◆ getThreeAxisLinearAccelerometerMeasure()

bool BoschIMU::getThreeAxisLinearAccelerometerMeasure ( size_t  sens_index,
yarp::sig::Vector out,
double &  timestamp 
) const
overridevirtual

Get three axis linear accelerometer measurements.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]out3D linear acceleration measurement in m/s^2
[out]timestamptimestamp of measurement
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 798 of file imuBosch_BNO055.cpp.

◆ getThreeAxisLinearAccelerometerName()

bool BoschIMU::getThreeAxisLinearAccelerometerName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of three axis linear accelerometer.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]namename of the sensor
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 788 of file imuBosch_BNO055.cpp.

◆ getThreeAxisLinearAccelerometerStatus()

yarp::dev::MAS_status BoschIMU::getThreeAxisLinearAccelerometerStatus ( size_t  sens_index) const
overridevirtual

Get the status of three axis linear accelerometer.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
Returns
MAS_OK/MAS_ERROR if status ok/failure

Implements yarp::dev::IThreeAxisLinearAccelerometers.

Definition at line 783 of file imuBosch_BNO055.cpp.

◆ getThreeAxisMagnetometerFrameName()

bool BoschIMU::getThreeAxisMagnetometerFrameName ( size_t  sens_index,
std::string &  frameName 
) const
overridevirtual

Get the name of the frame in which three axis magnetometer measurements are expressed.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]frameNamename of the sensor frame
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 909 of file imuBosch_BNO055.cpp.

◆ getThreeAxisMagnetometerMeasure()

bool BoschIMU::getThreeAxisMagnetometerMeasure ( size_t  sens_index,
yarp::sig::Vector out,
double &  timestamp 
) const
overridevirtual

Get three axis magnetometer measurements.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]out3D magnetometer measurement
[out]timestamptimestamp of measurement
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 914 of file imuBosch_BNO055.cpp.

◆ getThreeAxisMagnetometerName()

bool BoschIMU::getThreeAxisMagnetometerName ( size_t  sens_index,
std::string &  name 
) const
overridevirtual

Get the name of three axis magnetometer.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
[out]namename of the sensor
Returns
true/false success/failure

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 904 of file imuBosch_BNO055.cpp.

◆ getThreeAxisMagnetometerStatus()

yarp::dev::MAS_status BoschIMU::getThreeAxisMagnetometerStatus ( size_t  sens_index) const
overridevirtual

Get the status of three axis magnetometer.

Parameters
[in]sens_indexsensor index (must be 0 in the case BoschIMU)
Returns
MAS_OK/MAS_ERROR if status ok/failure

Implements yarp::dev::IThreeAxisMagnetometers.

Definition at line 899 of file imuBosch_BNO055.cpp.

◆ open()

bool BoschIMU::open ( yarp::os::Searchable config)
overridevirtual

Open the device and set up parameters/communication.

Parameters
[in]configsearchable object with desired configuration parameters
Returns
true/false success/failure

Reimplemented from yarp::dev::DeviceDriver.

Definition at line 74 of file imuBosch_BNO055.cpp.

◆ printBuffer()

void BoschIMU::printBuffer ( unsigned char *  buffer,
int  length 
)
protected

Definition at line 394 of file imuBosch_BNO055.cpp.

◆ read()

bool BoschIMU::read ( yarp::sig::Vector out)
overridevirtual

Read a vector from the sensor.

Parameters
[out]outa vector containing the sensor's last readings.
Returns
true/false success/failure

Implements yarp::dev::IGenericSensor.

Definition at line 707 of file imuBosch_BNO055.cpp.

◆ readBytes()

int BoschIMU::readBytes ( unsigned char *  buffer,
int  bytes 
)
protected

Definition at line 368 of file imuBosch_BNO055.cpp.

◆ readSysError()

void BoschIMU::readSysError ( )
protected

Definition at line 402 of file imuBosch_BNO055.cpp.

◆ run()

void BoschIMU::run ( )
overridevirtual

Update loop where measurements are read from the device.

Implements yarp::os::PeriodicThread.

Definition at line 612 of file imuBosch_BNO055.cpp.

◆ sendAndVerifyCommandSer()

bool BoschIMU::sendAndVerifyCommandSer ( unsigned char  register_add,
int  len,
unsigned char *  cmd,
std::string  comment 
)
protected

Definition at line 424 of file imuBosch_BNO055.cpp.

◆ sendReadCommandI2c()

bool BoschIMU::sendReadCommandI2c ( unsigned char  register_add,
int  len,
unsigned char *  buf,
std::string  comment = "" 
)
protected

Definition at line 437 of file imuBosch_BNO055.cpp.

◆ sendReadCommandSer()

bool BoschIMU::sendReadCommandSer ( unsigned char  register_add,
int  len,
unsigned char *  buf,
std::string  comment = "" 
)
protected

Definition at line 267 of file imuBosch_BNO055.cpp.

◆ sendWriteCommandSer()

bool BoschIMU::sendWriteCommandSer ( unsigned char  register_add,
int  len,
unsigned char *  cmd,
std::string  comment = "" 
)
protected

Definition at line 327 of file imuBosch_BNO055.cpp.

◆ threadInit()

bool BoschIMU::threadInit ( )
overridevirtual

Initialize process with desired device configurations.

Returns
true/false success/failure

TODO: meas units, offset and so on ...

Reimplemented from yarp::os::PeriodicThread.

Definition at line 447 of file imuBosch_BNO055.cpp.

◆ threadRelease()

void BoschIMU::threadRelease ( )
overridevirtual

Terminate communication with the device and release the thread.

Reimplemented from yarp::os::PeriodicThread.

Definition at line 934 of file imuBosch_BNO055.cpp.

Member Data Documentation

◆ checkError

bool BoschIMU::checkError
protected

flag to check read error of sensor data

Definition at line 159 of file imuBosch_BNO055.h.

◆ command

unsigned char BoschIMU::command[MAX_MSG_LENGTH]
protected

packet to be written to the device

Definition at line 168 of file imuBosch_BNO055.h.

◆ data

yarp::sig::Vector BoschIMU::data
protected

sensor data buffer

Definition at line 149 of file imuBosch_BNO055.h.

◆ data_tmp

yarp::sig::Vector BoschIMU::data_tmp
protected

sensor data temporary buffer

Definition at line 150 of file imuBosch_BNO055.h.

◆ dataIsValid

std::atomic<bool> BoschIMU::dataIsValid
protected

Definition at line 193 of file imuBosch_BNO055.h.

◆ errorCounter

yarp::sig::Vector BoschIMU::errorCounter
protected

Definition at line 180 of file imuBosch_BNO055.h.

◆ errorReading

yarp::sig::Vector BoschIMU::errorReading
protected

Definition at line 181 of file imuBosch_BNO055.h.

◆ errs

int BoschIMU::errs
protected

Definition at line 192 of file imuBosch_BNO055.h.

◆ fd

int BoschIMU::fd
protected

file descriptor to open device at system level

Definition at line 161 of file imuBosch_BNO055.h.

◆ i2c_flag

bool BoschIMU::i2c_flag
protected

flag to check if device connected through i2c commununication

Definition at line 157 of file imuBosch_BNO055.h.

◆ m_timeStamp

double BoschIMU::m_timeStamp
protected

device timestamp

Definition at line 154 of file imuBosch_BNO055.h.

◆ mutex

std::mutex BoschIMU::mutex
mutableprotected

mutex to avoid resource clash

Definition at line 156 of file imuBosch_BNO055.h.

◆ nChannels

int BoschIMU::nChannels
protected

number of channels in the output port. Default 12. If 16, also includes quaternion data

Definition at line 148 of file imuBosch_BNO055.h.

◆ quaternion

yarp::math::Quaternion BoschIMU::quaternion
protected

orientation in quaternion representation

Definition at line 151 of file imuBosch_BNO055.h.

◆ quaternion_tmp

yarp::math::Quaternion BoschIMU::quaternion_tmp
protected

orientation in quaternion representation

Definition at line 152 of file imuBosch_BNO055.h.

◆ readFunc

ReadFuncPtr BoschIMU::readFunc
protected

Functor object.

Definition at line 166 of file imuBosch_BNO055.h.

◆ response

unsigned char BoschIMU::response[MAX_MSG_LENGTH]
protected

packet to be read from the device

Definition at line 169 of file imuBosch_BNO055.h.

◆ responseOffset

size_t BoschIMU::responseOffset
protected

Definition at line 162 of file imuBosch_BNO055.h.

◆ rf

yarp::os::ResourceFinder BoschIMU::rf
protected

resource finder object to load config parameters

Definition at line 163 of file imuBosch_BNO055.h.

◆ RPY_angle

yarp::sig::Vector BoschIMU::RPY_angle
protected

orientation in Euler angle representation

Definition at line 153 of file imuBosch_BNO055.h.

◆ status

short BoschIMU::status
protected

device status - UNUSED

Definition at line 147 of file imuBosch_BNO055.h.

◆ timeLastReport

double BoschIMU::timeLastReport
protected

timestamp of last reported data

Definition at line 155 of file imuBosch_BNO055.h.

◆ totMessagesRead

long int BoschIMU::totMessagesRead
protected

Definition at line 179 of file imuBosch_BNO055.h.

◆ verbose

bool BoschIMU::verbose
protected

Flag to get verbose output.

Definition at line 146 of file imuBosch_BNO055.h.


The documentation for this class was generated from the following files: