Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
sbg::ConfigStore Class Reference

#include <config_store.h>

Classes

struct  SbgLogOutput
 

Public Member Functions

bool checkConfigWithRos (void) const
 
bool checkRosStandardMessages (void) const
 
 ConfigStore (void)
 
const SbgEComAidingAssignConfgetAidingAssignement (void) const
 
uint32_t getBaudRate (void) const
 
const std::string & getFrameId (void) const
 
const SbgEComGnssInstallationgetGnssInstallation (void) const
 
const SbgEComModelInfogetGnssModel (void) const
 
const SbgEComGnssRejectionConfgetGnssRejection (void) const
 
const SbgEComInitConditionConfgetInitialConditions (void) const
 
uint32_t getInputPortAddress (void) const
 
sbgIpAddress getIpAddress (void) const
 
const SbgEComMagCalibBandwidthgetMagnetometerCalibBandwidth (void) const
 
const SbgEComMagCalibModegetMagnetometerCalibMode (void) const
 
const SbgEComModelInfogetMagnetometerModel (void) const
 
const SbgEComMagRejectionConfgetMagnetometerRejection (void) const
 
const SbgEComModelInfogetMotionProfile (void) const
 
const std::string & getOdomBaseFrameId (void) const
 
bool getOdomEnable (void) const
 
const SbgEComOdoConfgetOdometerConf (void) const
 
const SbgVector3< float > & getOdometerLevelArms (void) const
 
const SbgEComOdoRejectionConfgetOdometerRejection (void) const
 
const std::string & getOdomFrameId (void) const
 
const std::string & getOdomInitFrameId (void) const
 
bool getOdomPublishTf (void) const
 
const std::vector< SbgLogOutput > & getOutputModes (void) const
 
SbgEComOutputPort getOutputPort (void) const
 
uint32_t getOutputPortAddress (void) const
 
uint32_t getReadingRateFrequency (void) const
 
const SbgEComSensorAlignmentInfogetSensorAlignement (void) const
 
const SbgVector3< float > & getSensorLevelArms (void) const
 
TimeReference getTimeReference (void) const
 
const std::string & getUartPortName (void) const
 
bool getUseEnu (void) const
 
bool isInterfaceSerial (void) const
 
bool isInterfaceUdp (void) const
 
void loadFromRosNodeHandle (const ros::NodeHandle &ref_node_handle)
 

Private Member Functions

template<typename T >
getParameter (const ros::NodeHandle &ref_node_handle, std::string param_key, int default_value) const
 
void loadAidingAssignementParameters (const ros::NodeHandle &ref_node_handle)
 
void loadCommunicationParameters (const ros::NodeHandle &ref_node_handle)
 
void loadDriverParameters (const ros::NodeHandle &ref_node_handle)
 
void loadGnssParameters (const ros::NodeHandle &ref_node_handle)
 
void loadImuAlignementParameters (const ros::NodeHandle &ref_node_handle)
 
void loadMagnetometersParameters (const ros::NodeHandle &ref_node_handle)
 
void loadOdometerParameters (const ros::NodeHandle &ref_node_handle)
 
void loadOdomParameters (const ros::NodeHandle &ref_node_handle)
 
void loadOutputConfiguration (const ros::NodeHandle &ref_node_handle, const std::string &ref_key, SbgEComClass sbg_msg_class, SbgEComMsgId sbg_msg_id)
 
void loadOutputFrameParameters (const ros::NodeHandle &ref_node_handle)
 
void loadOutputTimeReference (const ros::NodeHandle &ref_node_handle, const std::string &ref_key)
 
void loadSensorParameters (const ros::NodeHandle &ref_node_handle)
 

Private Attributes

SbgEComAidingAssignConf m_aiding_assignement_conf_
 
bool m_configure_through_ros_
 
std::string m_frame_id_
 
SbgEComGnssInstallation m_gnss_installation_
 
SbgEComModelInfo m_gnss_model_info_
 
SbgEComGnssRejectionConf m_gnss_rejection_conf_
 
uint32_t m_in_port_address_
 
SbgEComInitConditionConf m_init_condition_conf_
 
SbgEComMagCalibBandwidth m_mag_calib_bandwidth_
 
SbgEComMagCalibMode m_mag_calib_mode_
 
SbgEComModelInfo m_mag_model_info_
 
SbgEComMagRejectionConf m_mag_rejection_conf_
 
SbgEComModelInfo m_motion_profile_model_info_
 
std::string m_odom_base_frame_id_
 
bool m_odom_enable_
 
std::string m_odom_frame_id_
 
std::string m_odom_init_frame_id_
 
bool m_odom_publish_tf_
 
SbgEComOdoConf m_odometer_conf_
 
SbgVector3< float > m_odometer_level_arm_
 
SbgEComOdoRejectionConf m_odometer_rejection_conf_
 
uint32_t m_out_port_address_
 
std::vector< SbgLogOutputm_output_modes_
 
SbgEComOutputPort m_output_port_
 
uint32_t m_rate_frequency_
 
bool m_ros_standard_output_
 
sbgIpAddress m_sbg_ip_address_
 
SbgEComSensorAlignmentInfo m_sensor_alignement_info_
 
SbgVector3< float > m_sensor_lever_arm_
 
bool m_serial_communication_
 
TimeReference m_time_reference_
 
uint32_t m_uart_baud_rate_
 
std::string m_uart_port_name_
 
bool m_upd_communication_
 
bool m_use_enu_
 

Detailed Description

Class to handle the device configuration.

Definition at line 60 of file config_store.h.

Constructor & Destructor Documentation

◆ ConfigStore()

ConfigStore::ConfigStore ( void  )

Default constructor.

Class to handle the device configuration.

Definition at line 13 of file config_store.cpp.

Member Function Documentation

◆ checkConfigWithRos()

bool ConfigStore::checkConfigWithRos ( void  ) const

Check if the configuration should be done with ROS.

Returns
True if the ROS driver has to configure the device.

Definition at line 198 of file config_store.cpp.

◆ checkRosStandardMessages()

bool ConfigStore::checkRosStandardMessages ( void  ) const

Check if the ROS standard outputs are defined.

Returns
True if standard ROS messages output are defined.

Definition at line 323 of file config_store.cpp.

◆ getAidingAssignement()

const SbgEComAidingAssignConf & ConfigStore::getAidingAssignement ( void  ) const

Get the aiding assignement configuration.

Returns
Aiding assignement configuration.

Definition at line 263 of file config_store.cpp.

◆ getBaudRate()

uint32_t ConfigStore::getBaudRate ( void  ) const

Get the UART baudrate communication.

Returns
UART serial baudrate.

Definition at line 213 of file config_store.cpp.

◆ getFrameId()

const std::string & ConfigStore::getFrameId ( void  ) const

Get the frame ID.

Returns
Frame ID.

Definition at line 333 of file config_store.cpp.

◆ getGnssInstallation()

const SbgEComGnssInstallation & ConfigStore::getGnssInstallation ( void  ) const

Get the Gnss installation configuration.

Returns
Gnss installation configuration.

Definition at line 293 of file config_store.cpp.

◆ getGnssModel()

const SbgEComModelInfo & ConfigStore::getGnssModel ( void  ) const

Get the Gnss model configuration.

Returns
Gnss model configuration.

Definition at line 288 of file config_store.cpp.

◆ getGnssRejection()

const SbgEComGnssRejectionConf & ConfigStore::getGnssRejection ( void  ) const

Get the Gnss rejection configuration.

Returns
Gnss rejection configuration.

Definition at line 298 of file config_store.cpp.

◆ getInitialConditions()

const SbgEComInitConditionConf & ConfigStore::getInitialConditions ( void  ) const

Get the initial conditions configuration.

Returns
Initial conditions configuration.

Definition at line 243 of file config_store.cpp.

◆ getInputPortAddress()

uint32_t ConfigStore::getInputPortAddress ( void  ) const

Get the input port.

Returns
Input port.

Definition at line 238 of file config_store.cpp.

◆ getIpAddress()

sbgIpAddress ConfigStore::getIpAddress ( void  ) const

Get the Ip address of the interface.

Returns
Ip address.

Definition at line 228 of file config_store.cpp.

◆ getMagnetometerCalibBandwidth()

const SbgEComMagCalibBandwidth & ConfigStore::getMagnetometerCalibBandwidth ( void  ) const

Get the magnetometer calibration bandwidth.

Returns
Magnetometer calibration bandwidth.

Definition at line 283 of file config_store.cpp.

◆ getMagnetometerCalibMode()

const SbgEComMagCalibMode & ConfigStore::getMagnetometerCalibMode ( void  ) const

Get the magnetometer calibration mode.

Returns
Magnetometer calibration mode.

Definition at line 278 of file config_store.cpp.

◆ getMagnetometerModel()

const SbgEComModelInfo & ConfigStore::getMagnetometerModel ( void  ) const

Get the magnetometer model configuration.

Returns
Magnetometer model configuration.

Definition at line 268 of file config_store.cpp.

◆ getMagnetometerRejection()

const SbgEComMagRejectionConf & ConfigStore::getMagnetometerRejection ( void  ) const

Get the magnetometer rejection configuration.

Returns
Magnetometer rejection configuration.

Definition at line 273 of file config_store.cpp.

◆ getMotionProfile()

const SbgEComModelInfo & ConfigStore::getMotionProfile ( void  ) const

Get the motion profile configuration.

Returns
Motion profile configuration.

Definition at line 248 of file config_store.cpp.

◆ getOdomBaseFrameId()

const std::string & ConfigStore::getOdomBaseFrameId ( void  ) const

Get the odometry base frame ID.

Returns
Odometry base frame ID.

Definition at line 363 of file config_store.cpp.

◆ getOdomEnable()

bool ConfigStore::getOdomEnable ( void  ) const

Get odom enable.

Returns
True if the odometry is enabled.

Definition at line 348 of file config_store.cpp.

◆ getOdometerConf()

const SbgEComOdoConf & ConfigStore::getOdometerConf ( void  ) const

Get the odometer configuration.

Returns
Odometer configuration.

Definition at line 303 of file config_store.cpp.

◆ getOdometerLevelArms()

const sbg::SbgVector3< float > & ConfigStore::getOdometerLevelArms ( void  ) const

Get the odometer level arms.

Returns
Odometer level arms vector (in meters).

Definition at line 308 of file config_store.cpp.

◆ getOdometerRejection()

const SbgEComOdoRejectionConf & ConfigStore::getOdometerRejection ( void  ) const

Get the odometer rejection.

Returns
Odometer rejection configuration.

Definition at line 313 of file config_store.cpp.

◆ getOdomFrameId()

const std::string & ConfigStore::getOdomFrameId ( void  ) const

Get the odometry frame ID.

Returns
Odometry frame ID.

Definition at line 358 of file config_store.cpp.

◆ getOdomInitFrameId()

const std::string & ConfigStore::getOdomInitFrameId ( void  ) const

Get the odometry init frame ID.

Returns
Odometry init frame ID.

Definition at line 368 of file config_store.cpp.

◆ getOdomPublishTf()

bool ConfigStore::getOdomPublishTf ( void  ) const

Get odom publish_tf.

Returns
If true publish odometry transforms.

Definition at line 353 of file config_store.cpp.

◆ getOutputModes()

const std::vector< ConfigStore::SbgLogOutput > & ConfigStore::getOutputModes ( void  ) const

Get all the output modes.

Returns
Output mode for this config store.

Definition at line 318 of file config_store.cpp.

◆ getOutputPort()

SbgEComOutputPort ConfigStore::getOutputPort ( void  ) const

Get the output port of the device.

Returns
SBG device output port.

Definition at line 218 of file config_store.cpp.

◆ getOutputPortAddress()

uint32_t ConfigStore::getOutputPortAddress ( void  ) const

Get the output port.

Returns
Output port.

Definition at line 233 of file config_store.cpp.

◆ getParameter()

template<typename T >
T sbg::ConfigStore::getParameter ( const ros::NodeHandle ref_node_handle,
std::string  param_key,
int  default_value 
) const
inlineprivate

Get the ROS integer parameter casted in the T type. This function has the same behavior as the param base function, however it enables an implicit cast, and the use of const NodeHandle.

T Template type to cast the ROS param to.

Parameters
[in]ref_node_handleROS NodeHandle.
[in]param_keyParameter key.
[in]default_valueDefault value for the parameter.
Returns
ROS integer parameter casted.

Definition at line 139 of file config_store.h.

◆ getReadingRateFrequency()

uint32_t ConfigStore::getReadingRateFrequency ( void  ) const

Get the reading frequency defined in settings. If this frequency is null, the driver will automatically configure the max output frequency according to the outputs.

Returns
Rate frequency parameter (in Hz).

Definition at line 328 of file config_store.cpp.

◆ getSensorAlignement()

const SbgEComSensorAlignmentInfo & ConfigStore::getSensorAlignement ( void  ) const

Get the sensor alignement configuration.

Returns
Sensor alignement configuration.

Definition at line 253 of file config_store.cpp.

◆ getSensorLevelArms()

const sbg::SbgVector3< float > & ConfigStore::getSensorLevelArms ( void  ) const

Get the sensor level arms.

Returns
Sensor level arms vector (in meters).

Definition at line 258 of file config_store.cpp.

◆ getTimeReference()

sbg::TimeReference ConfigStore::getTimeReference ( void  ) const

Get the time reference.

Returns
Time reference.

Definition at line 343 of file config_store.cpp.

◆ getUartPortName()

const std::string & ConfigStore::getUartPortName ( void  ) const

Get the UART port name.

Returns
UART serial port name.

Definition at line 208 of file config_store.cpp.

◆ getUseEnu()

bool ConfigStore::getUseEnu ( void  ) const

Get use ENU.

Returns
True if the frame convention to use is ENU.

Definition at line 338 of file config_store.cpp.

◆ isInterfaceSerial()

bool ConfigStore::isInterfaceSerial ( void  ) const

Check if the interface configuration is a serial interface.

Returns
True if the interface is serial, False otherwise.

Definition at line 203 of file config_store.cpp.

◆ isInterfaceUdp()

bool ConfigStore::isInterfaceUdp ( void  ) const

Check if the interface configuration is a UDP interface.

Returns
True if the interface is UDP, False otherwise.

Definition at line 223 of file config_store.cpp.

◆ loadAidingAssignementParameters()

void ConfigStore::loadAidingAssignementParameters ( const ros::NodeHandle ref_node_handle)
private

Load aiding assignement parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 98 of file config_store.cpp.

◆ loadCommunicationParameters()

void ConfigStore::loadCommunicationParameters ( const ros::NodeHandle ref_node_handle)
private

Load interface communication parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 40 of file config_store.cpp.

◆ loadDriverParameters()

void ConfigStore::loadDriverParameters ( const ros::NodeHandle ref_node_handle)
private

Load driver parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 26 of file config_store.cpp.

◆ loadFromRosNodeHandle()

void ConfigStore::loadFromRosNodeHandle ( const ros::NodeHandle ref_node_handle)

Load the configuration from a ros parameter handle.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 377 of file config_store.cpp.

◆ loadGnssParameters()

void ConfigStore::loadGnssParameters ( const ros::NodeHandle ref_node_handle)
private

Load Gnss parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 115 of file config_store.cpp.

◆ loadImuAlignementParameters()

void ConfigStore::loadImuAlignementParameters ( const ros::NodeHandle ref_node_handle)
private

Load IMU alignement parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 81 of file config_store.cpp.

◆ loadMagnetometersParameters()

void ConfigStore::loadMagnetometersParameters ( const ros::NodeHandle ref_node_handle)
private

Load magnetometers parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 106 of file config_store.cpp.

◆ loadOdometerParameters()

void ConfigStore::loadOdometerParameters ( const ros::NodeHandle ref_node_handle)
private

Load odometer parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 133 of file config_store.cpp.

◆ loadOdomParameters()

void ConfigStore::loadOdomParameters ( const ros::NodeHandle ref_node_handle)
private

Load odometry parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 31 of file config_store.cpp.

◆ loadOutputConfiguration()

void ConfigStore::loadOutputConfiguration ( const ros::NodeHandle ref_node_handle,
const std::string &  ref_key,
SbgEComClass  sbg_msg_class,
SbgEComMsgId  sbg_msg_id 
)
private

Load the output configuration.

Parameters
[in]ref_node_handleROS nodeHandle.
[in]ref_keyString key for the output config.
[in]sbg_msg_classSBG message class.
[in]sbg_msg_idID of the SBG log.

Definition at line 149 of file config_store.cpp.

◆ loadOutputFrameParameters()

void ConfigStore::loadOutputFrameParameters ( const ros::NodeHandle ref_node_handle)
private

Load frame parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 160 of file config_store.cpp.

◆ loadOutputTimeReference()

void ConfigStore::loadOutputTimeReference ( const ros::NodeHandle ref_node_handle,
const std::string &  ref_key 
)
private

Load output time reference.

Parameters
[in]ref_node_handleROS nodeHandle.
[in]ref_keyString key for the output config.

Definition at line 174 of file config_store.cpp.

◆ loadSensorParameters()

void ConfigStore::loadSensorParameters ( const ros::NodeHandle ref_node_handle)
private

Load sensor parameters.

Parameters
[in]ref_node_handleROS nodeHandle.

Definition at line 68 of file config_store.cpp.

Member Data Documentation

◆ m_aiding_assignement_conf_

SbgEComAidingAssignConf sbg::ConfigStore::m_aiding_assignement_conf_
private

Definition at line 94 of file config_store.h.

◆ m_configure_through_ros_

bool sbg::ConfigStore::m_configure_through_ros_
private

Definition at line 86 of file config_store.h.

◆ m_frame_id_

std::string sbg::ConfigStore::m_frame_id_
private

Definition at line 115 of file config_store.h.

◆ m_gnss_installation_

SbgEComGnssInstallation sbg::ConfigStore::m_gnss_installation_
private

Definition at line 102 of file config_store.h.

◆ m_gnss_model_info_

SbgEComModelInfo sbg::ConfigStore::m_gnss_model_info_
private

Definition at line 101 of file config_store.h.

◆ m_gnss_rejection_conf_

SbgEComGnssRejectionConf sbg::ConfigStore::m_gnss_rejection_conf_
private

Definition at line 103 of file config_store.h.

◆ m_in_port_address_

uint32_t sbg::ConfigStore::m_in_port_address_
private

Definition at line 83 of file config_store.h.

◆ m_init_condition_conf_

SbgEComInitConditionConf sbg::ConfigStore::m_init_condition_conf_
private

Definition at line 88 of file config_store.h.

◆ m_mag_calib_bandwidth_

SbgEComMagCalibBandwidth sbg::ConfigStore::m_mag_calib_bandwidth_
private

Definition at line 99 of file config_store.h.

◆ m_mag_calib_mode_

SbgEComMagCalibMode sbg::ConfigStore::m_mag_calib_mode_
private

Definition at line 98 of file config_store.h.

◆ m_mag_model_info_

SbgEComModelInfo sbg::ConfigStore::m_mag_model_info_
private

Definition at line 96 of file config_store.h.

◆ m_mag_rejection_conf_

SbgEComMagRejectionConf sbg::ConfigStore::m_mag_rejection_conf_
private

Definition at line 97 of file config_store.h.

◆ m_motion_profile_model_info_

SbgEComModelInfo sbg::ConfigStore::m_motion_profile_model_info_
private

Definition at line 89 of file config_store.h.

◆ m_odom_base_frame_id_

std::string sbg::ConfigStore::m_odom_base_frame_id_
private

Definition at line 121 of file config_store.h.

◆ m_odom_enable_

bool sbg::ConfigStore::m_odom_enable_
private

Definition at line 118 of file config_store.h.

◆ m_odom_frame_id_

std::string sbg::ConfigStore::m_odom_frame_id_
private

Definition at line 120 of file config_store.h.

◆ m_odom_init_frame_id_

std::string sbg::ConfigStore::m_odom_init_frame_id_
private

Definition at line 122 of file config_store.h.

◆ m_odom_publish_tf_

bool sbg::ConfigStore::m_odom_publish_tf_
private

Definition at line 119 of file config_store.h.

◆ m_odometer_conf_

SbgEComOdoConf sbg::ConfigStore::m_odometer_conf_
private

Definition at line 105 of file config_store.h.

◆ m_odometer_level_arm_

SbgVector3<float> sbg::ConfigStore::m_odometer_level_arm_
private

Definition at line 106 of file config_store.h.

◆ m_odometer_rejection_conf_

SbgEComOdoRejectionConf sbg::ConfigStore::m_odometer_rejection_conf_
private

Definition at line 107 of file config_store.h.

◆ m_out_port_address_

uint32_t sbg::ConfigStore::m_out_port_address_
private

Definition at line 82 of file config_store.h.

◆ m_output_modes_

std::vector<SbgLogOutput> sbg::ConfigStore::m_output_modes_
private

Definition at line 109 of file config_store.h.

◆ m_output_port_

SbgEComOutputPort sbg::ConfigStore::m_output_port_
private

Definition at line 77 of file config_store.h.

◆ m_rate_frequency_

uint32_t sbg::ConfigStore::m_rate_frequency_
private

Definition at line 114 of file config_store.h.

◆ m_ros_standard_output_

bool sbg::ConfigStore::m_ros_standard_output_
private

Definition at line 110 of file config_store.h.

◆ m_sbg_ip_address_

sbgIpAddress sbg::ConfigStore::m_sbg_ip_address_
private

Definition at line 81 of file config_store.h.

◆ m_sensor_alignement_info_

SbgEComSensorAlignmentInfo sbg::ConfigStore::m_sensor_alignement_info_
private

Definition at line 91 of file config_store.h.

◆ m_sensor_lever_arm_

SbgVector3<float> sbg::ConfigStore::m_sensor_lever_arm_
private

Definition at line 92 of file config_store.h.

◆ m_serial_communication_

bool sbg::ConfigStore::m_serial_communication_
private

Definition at line 79 of file config_store.h.

◆ m_time_reference_

TimeReference sbg::ConfigStore::m_time_reference_
private

Definition at line 112 of file config_store.h.

◆ m_uart_baud_rate_

uint32_t sbg::ConfigStore::m_uart_baud_rate_
private

Definition at line 78 of file config_store.h.

◆ m_uart_port_name_

std::string sbg::ConfigStore::m_uart_port_name_
private

Definition at line 76 of file config_store.h.

◆ m_upd_communication_

bool sbg::ConfigStore::m_upd_communication_
private

Definition at line 84 of file config_store.h.

◆ m_use_enu_

bool sbg::ConfigStore::m_use_enu_
private

Definition at line 116 of file config_store.h.


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


sbg_driver
Author(s): SBG Systems
autogenerated on Sat Sep 3 2022 02:53:36