YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
BoschIMU_ParamsParser Class Reference

This class is the parameters parser for class BoschIMU. More...

#include <imuBosch_BNO055/BoschIMU_ParamsParser.h>

+ Inheritance diagram for BoschIMU_ParamsParser:

Classes

struct  parser_version_type
 

Public Member Functions

 BoschIMU_ParamsParser ()
 
 ~BoschIMU_ParamsParser () override=default
 
bool parseParams (const yarp::os::Searchable &config) override
 Parse the DeviceDriver parameters.
 
std::string getDeviceClassName () const override
 Get the name of the DeviceDriver class.
 
std::string getDeviceName () const override
 Get the name of the device (i.e.
 
std::string getDocumentationOfDeviceParams () const override
 Get the documentation of the DeviceDriver's parameters.
 
std::vector< std::string > getListOfParams () const override
 Return a list of all params used by the device.
 
- Public Member Functions inherited from yarp::dev::IDeviceDriverParams
virtual ~IDeviceDriverParams ()
 

Public Attributes

const std::string m_device_classname = {"BoschIMU"}
 
const std::string m_device_name = {"imuBosch_BNO055"}
 
bool m_parser_is_strict = false
 
const parser_version_type m_parser_version = {}
 
const std::string m_comport_defaultValue = {""}
 
const std::string m_baudrate_defaultValue = {"115200"}
 
const std::string m_i2c_defaultValue = {""}
 
const std::string m_period_defaultValue = {"10"}
 
const std::string m_sensor_name_defaultValue = {"sensor_imu_bosch_bno055"}
 
const std::string m_frame_name_defaultValue = {"sensor_imu_bosch_bno055"}
 
const std::string m_channels_defaultValue = {"12"}
 
std::string m_comport = {}
 
int m_baudrate = {115200}
 
std::string m_i2c = {}
 
int m_period = {10}
 
std::string m_sensor_name = {"sensor_imu_bosch_bno055"}
 
std::string m_frame_name = {"sensor_imu_bosch_bno055"}
 
int m_channels = {12}
 

Detailed Description

This class is the parameters parser for class BoschIMU.

These are the used parameters:

Group name Parameter name Type Units Default Value Required Description Notes
- comport string - - 0 full name of device file ex '/dev/ttyUSB0', it is mutually exclusive with 'i2c' parameter
- baudrate int - 115200 0 baudrate setting of COM port used only with serial configuration
- i2c string - - 0 full name of device file ex '/dev/i2c-5', it is mutually exclusive with 'comport' parameter, necessary for i2c configuration
- period int ms 10 0 period of the thread -
- sensor_name string - sensor_imu_bosch_bno055 0 full name of the device -
- frame_name string - sensor_imu_bosch_bno055 0 full name of the sensor frame in which the measurements are expressed -
- channels int - 12 0 number of channels in the output port. Default 12. If 16, also includes quaternion data -

The device can be launched by yarpdev using one of the following examples (with and without all optional parameters):

yarpdev --device imuBosch_BNO055 --comport <optional_value> --baudrate 115200 --i2c <optional_value> --period 10 --sensor_name sensor_imu_bosch_bno055 --frame_name sensor_imu_bosch_bno055 --channels 12
yarpdev --device imuBosch_BNO055

Definition at line 47 of file BoschIMU_ParamsParser.h.

Constructor & Destructor Documentation

◆ BoschIMU_ParamsParser()

BoschIMU_ParamsParser::BoschIMU_ParamsParser ( )

Definition at line 23 of file BoschIMU_ParamsParser.cpp.

◆ ~BoschIMU_ParamsParser()

BoschIMU_ParamsParser::~BoschIMU_ParamsParser ( )
overridedefault

Member Function Documentation

◆ getDeviceClassName()

std::string BoschIMU_ParamsParser::getDeviceClassName ( ) const
inlineoverridevirtual

Get the name of the DeviceDriver class.

Returns
A string containing the name of the class.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 81 of file BoschIMU_ParamsParser.h.

◆ getDeviceName()

std::string BoschIMU_ParamsParser::getDeviceName ( ) const
inlineoverridevirtual

Get the name of the device (i.e.

the plugin name).

Returns
A string containing the name of the device.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 82 of file BoschIMU_ParamsParser.h.

◆ getDocumentationOfDeviceParams()

std::string BoschIMU_ParamsParser::getDocumentationOfDeviceParams ( ) const
overridevirtual

Get the documentation of the DeviceDriver's parameters.

Returns
A string containing the documentation.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 179 of file BoschIMU_ParamsParser.cpp.

◆ getListOfParams()

std::vector< std::string > BoschIMU_ParamsParser::getListOfParams ( ) const
overridevirtual

Return a list of all params used by the device.

Returns
A vector containing the names of parameters used by the device.

Implements yarp::dev::IDeviceDriverParams.

Definition at line 28 of file BoschIMU_ParamsParser.cpp.

◆ parseParams()

bool BoschIMU_ParamsParser::parseParams ( const yarp::os::Searchable config)
overridevirtual

Parse the DeviceDriver parameters.

Returns
true if the parsing is successful, false otherwise

Implements yarp::dev::IDeviceDriverParams.

Definition at line 42 of file BoschIMU_ParamsParser.cpp.

Member Data Documentation

◆ m_baudrate

int BoschIMU_ParamsParser::m_baudrate = {115200}

Definition at line 73 of file BoschIMU_ParamsParser.h.

◆ m_baudrate_defaultValue

const std::string BoschIMU_ParamsParser::m_baudrate_defaultValue = {"115200"}

Definition at line 65 of file BoschIMU_ParamsParser.h.

◆ m_channels

int BoschIMU_ParamsParser::m_channels = {12}

Definition at line 78 of file BoschIMU_ParamsParser.h.

◆ m_channels_defaultValue

const std::string BoschIMU_ParamsParser::m_channels_defaultValue = {"12"}

Definition at line 70 of file BoschIMU_ParamsParser.h.

◆ m_comport

std::string BoschIMU_ParamsParser::m_comport = {}

Definition at line 72 of file BoschIMU_ParamsParser.h.

◆ m_comport_defaultValue

const std::string BoschIMU_ParamsParser::m_comport_defaultValue = {""}

Definition at line 64 of file BoschIMU_ParamsParser.h.

◆ m_device_classname

const std::string BoschIMU_ParamsParser::m_device_classname = {"BoschIMU"}

Definition at line 54 of file BoschIMU_ParamsParser.h.

◆ m_device_name

const std::string BoschIMU_ParamsParser::m_device_name = {"imuBosch_BNO055"}

Definition at line 55 of file BoschIMU_ParamsParser.h.

◆ m_frame_name

std::string BoschIMU_ParamsParser::m_frame_name = {"sensor_imu_bosch_bno055"}

Definition at line 77 of file BoschIMU_ParamsParser.h.

◆ m_frame_name_defaultValue

const std::string BoschIMU_ParamsParser::m_frame_name_defaultValue = {"sensor_imu_bosch_bno055"}

Definition at line 69 of file BoschIMU_ParamsParser.h.

◆ m_i2c

std::string BoschIMU_ParamsParser::m_i2c = {}

Definition at line 74 of file BoschIMU_ParamsParser.h.

◆ m_i2c_defaultValue

const std::string BoschIMU_ParamsParser::m_i2c_defaultValue = {""}

Definition at line 66 of file BoschIMU_ParamsParser.h.

◆ m_parser_is_strict

bool BoschIMU_ParamsParser::m_parser_is_strict = false

Definition at line 56 of file BoschIMU_ParamsParser.h.

◆ m_parser_version

const parser_version_type BoschIMU_ParamsParser::m_parser_version = {}

Definition at line 62 of file BoschIMU_ParamsParser.h.

◆ m_period

int BoschIMU_ParamsParser::m_period = {10}

Definition at line 75 of file BoschIMU_ParamsParser.h.

◆ m_period_defaultValue

const std::string BoschIMU_ParamsParser::m_period_defaultValue = {"10"}

Definition at line 67 of file BoschIMU_ParamsParser.h.

◆ m_sensor_name

std::string BoschIMU_ParamsParser::m_sensor_name = {"sensor_imu_bosch_bno055"}

Definition at line 76 of file BoschIMU_ParamsParser.h.

◆ m_sensor_name_defaultValue

const std::string BoschIMU_ParamsParser::m_sensor_name_defaultValue = {"sensor_imu_bosch_bno055"}

Definition at line 68 of file BoschIMU_ParamsParser.h.


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