Class MessageWrapper

Inheritance Relationships

Base Type

  • public rclcpp::Node

Class Documentation

class MessageWrapper : public rclcpp::Node

Class to wrap the SBG logs into ROS messages.

Public Functions

MessageWrapper()

Default constructor.

void setTimeReference(TimeReference time_reference)

Set the time reference.

Parameters:

time_reference[in] Time reference.

void setFrameId(const std::string &frame_id)

Set Frame ID.

Parameters:

frame_id[in] Frame ID.

void setUseEnu(bool enu)

Set use ENU.

Parameters:

enu[in] If true publish data in the ENU convention.

void setOdomEnable(bool odom_enable)

Set odom enable.

Parameters:

odom_enable[in] If true enable odometry.

void setOdomPublishTf(bool publish_tf)

Set odom publish_tf.

Parameters:

publish_tf[in] If true publish odometry transforms.

void setOdomFrameId(const std::string &ref_frame_id)

Set the odometry frame ID.

Parameters:

ref_frame_id[in] Odometry frame ID.

void setOdomBaseFrameId(const std::string &ref_frame_id)

Set the odometry base frame ID.

Parameters:

ref_frame_id[in] Odometry base frame ID.

void setOdomInitFrameId(const std::string &ref_frame_id)

Set the odometry init frame ID.

Parameters:

ref_frame_id[in] Odometry init frame ID.

const sbg_driver::msg::SbgEkfEuler createSbgEkfEulerMessage(const SbgEComLogEkfEuler &ref_log_ekf_euler) const

Create a SBG-ROS Ekf Euler message.

Parameters:

ref_log_ekf_euler[in] SBG Ekf Euler log.

Returns:

Ekf Euler message.

const sbg_driver::msg::SbgEkfNav createSbgEkfNavMessage(const SbgEComLogEkfNav &ref_log_ekf_nav) const

Create a SBG-ROS Ekf Navigation message.

Parameters:

ref_log_ekf_nav[in] SBG Ekf Navigation log.

Returns:

Ekf Navigation message.

const sbg_driver::msg::SbgEkfQuat createSbgEkfQuatMessage(const SbgEComLogEkfQuat &ref_log_ekf_quat) const

Create a SBG-ROS Ekf Quaternion message.

Parameters:

ref_log_ekf_quat[in] SBG Ekf Quaternion log.

Returns:

Ekf Quaternion message.

const sbg_driver::msg::SbgEkfVelBody createSbgEkfVelBodyMessage(const SbgEComLogEkfVelBody &ref_log_ekf_vel_body) const

Create a SBG-ROS Ekf Velocity Body message.

Parameters:

ref_log_ekf_vel_body[in] SBG Ekf Velocity Body log.

Returns:

Ekf Velocity body message.

const sbg_driver::msg::SbgEkfRotAccel createSbgEkfRotAccelMessage(const SbgEComLogEkfRotAccel &ref_log_ekf_rot_accel) const

Create a SBG-ROS Ekf Rotation Acceleration message.

Parameters:

ref_log_ekf_rot_accel[in] SBG Ekf Rotation Acceleration log.

Returns:

Ekf Rotation Acceleration message.

const sbg_driver::msg::SbgEvent createSbgEventMessage(const SbgEComLogEvent &ref_log_event) const

Create a SBG-ROS event message.

Parameters:

ref_log_event[in] SBG event log.

Returns:

Event message.

const sbg_driver::msg::SbgGpsHdt createSbgGpsHdtMessage(const SbgEComLogGnssHdt &ref_log_gps_hdt) const

Create SBG-ROS GPS-HDT message.

Parameters:

ref_log_gps_hdt[in] SBG GPS HDT log.

Returns:

GPS HDT message.

const sbg_driver::msg::SbgGpsPos createSbgGpsPosMessage(const SbgEComLogGnssPos &ref_log_gps_pos) const

Create a SBG-ROS GPS-Position message.

Parameters:

ref_log_gps_pos[in] SBG GPS Position log.

Returns:

GPS Position message.

const sbg_driver::msg::SbgGpsRaw createSbgGpsRawMessage(const SbgEComLogRawData &ref_log_gps_raw) const

Create a SBG-ROS GPS raw message.

Parameters:

ref_log_gps_raw[in] SBG GPS raw log.

Returns:

GPS raw message.

const sbg_driver::msg::SbgGpsVel createSbgGpsVelMessage(const SbgEComLogGnssVel &ref_log_gps_vel) const

Create a SBG-ROS GPS Velocity message.

Parameters:

ref_log_gps_vel[in] SBG GPS Velocity log.

Returns:

GPS Velocity message.

const sbg_driver::msg::SbgImuData createSbgImuDataMessage(const SbgEComLogImuLegacy &ref_log_imu_data) const

Create a SBG-ROS Imu data message.

Parameters:

ref_log_imu_data[in] SBG Imu data log.

Returns:

Imu data message.

const sbg_driver::msg::SbgMag createSbgMagMessage(const SbgEComLogMag &ref_log_mag) const

Create a SBG-ROS Magnetometer message.

Parameters:

ref_log_mag[in] SBG Magnetometer log.

Returns:

Magnetometer message.

const sbg_driver::msg::SbgMagCalib createSbgMagCalibMessage(const SbgEComLogMagCalib &ref_log_mag_calib) const

Create a SBG-ROS Magnetometer calibration message.

Parameters:

ref_log_mag_calib[in] SBG Magnetometer calibration log.

Returns:

Magnetometer calibration message.

const sbg_driver::msg::SbgOdoVel createSbgOdoVelMessage(const SbgEComLogOdometer &ref_log_odo) const

Create a SBG-ROS Odometer velocity message.

Parameters:

ref_log_odo[in] SBG Odometer log.

Returns:

Odometer message.

const sbg_driver::msg::SbgShipMotion createSbgShipMotionMessage(const SbgEComLogShipMotion &ref_log_ship_motion) const

Create a SBG-ROS Shipmotion message.

Parameters:

ref_log_ship_motion[in] SBG Ship motion log.

Returns:

Ship motion message.

const sbg_driver::msg::SbgStatus createSbgStatusMessage(const SbgEComLogStatus &ref_log_status) const

Create a SBG-ROS status message from a SBG status log.

Parameters:

ref_log_status[in] SBG status log.

Returns:

Status message.

const sbg_driver::msg::SbgUtcTime createSbgUtcTimeMessage(const SbgEComLogUtc &ref_log_utc)

Create a SBG-ROS UTC time message from a SBG UTC log.

Parameters:

ref_log_utc[in] SBG UTC log.

Returns:

UTC time message.

const sbg_driver::msg::SbgAirData createSbgAirDataMessage(const SbgEComLogAirData &ref_air_data_log) const

Create a SBG-ROS Air data message from a SBG log.

Parameters:

ref_air_data_log[in] SBG AirData log.

Returns:

SBG-ROS airData message.

const sbg_driver::msg::SbgImuShort createSbgImuShortMessage(const SbgEComLogImuShort &ref_short_imu_log) const

Create a SBG-ROS Short Imu message.

Parameters:

ref_short_imu_log[in] SBG Imu short log.

Returns:

SBG-ROS Imu short message.

const sensor_msgs::msg::Imu createRosImuMessage(const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg, const sbg_driver::msg::SbgEkfQuat &ref_sbg_quat_msg) const

Create a ROS standard IMU message from SBG messages.

Parameters:
  • ref_sbg_imu_msg[in] SBG-ROS IMU message.

  • ref_sbg_quat_msg[in] SBG_ROS Quaternion message.

Returns:

ROS standard IMU message.

const nav_msgs::msg::Odometry createRosOdoMessage(const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg, const sbg_driver::msg::SbgEkfNav &ref_sbg_ekf_nav_msg, const sbg_driver::msg::SbgEkfQuat &ref_sbg_ekf_quat_msg, const sbg_driver::msg::SbgEkfEuler &ref_sbg_ekf_euler_msg)

Create a ROS standard odometry message from SBG messages.

Parameters:
  • ref_sbg_imu_msg[in] SBG-ROS IMU message.

  • ref_sbg_ekf_nav_msg[in] SBG-ROS Ekf Nav message.

  • ref_sbg_ekf_quat_msg[in] SBG-ROS Ekf Quaternion message.

  • ref_sbg_ekf_euler_msg[in] SBG-ROS Ekf Euler message.

Returns:

ROS standard odometry message.

const nav_msgs::msg::Odometry createRosOdoMessage(const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg, const sbg_driver::msg::SbgEkfNav &ref_sbg_ekf_nav_msg, const sbg_driver::msg::SbgEkfEuler &ref_sbg_ekf_euler_msg)

Create a ROS standard odometry message from SBG messages.

Parameters:
  • ref_sbg_imu_msg[in] SBG-ROS IMU message.

  • ref_sbg_ekf_nav_msg[in] SBG-ROS Ekf Nav message.

  • ref_sbg_ekf_euler_msg[in] SBG-ROS Ekf Euler message.

Returns:

ROS standard odometry message.

const nav_msgs::msg::Odometry createRosOdoMessage(const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg, const sbg_driver::msg::SbgEkfNav &ref_sbg_ekf_nav_msg, const tf2::Quaternion &ref_orientation, const sbg_driver::msg::SbgEkfEuler &ref_sbg_ekf_euler_msg)

Create a ROS standard odometry message from SBG messages and tf2 quaternion.

Parameters:
  • ref_sbg_imu_msg[in] SBG-ROS IMU message.

  • ref_sbg_ekf_nav_msg[in] SBG-ROS Ekf Nav message.

  • orientation[in] Orientation as a Tf2 quaternion.

  • ref_sbg_ekf_euler_msg[in] SBG-ROS Ekf Euler message.

Returns:

ROS standard odometry message.

const sensor_msgs::msg::Temperature createRosTemperatureMessage(const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg) const

Create a ROS standard Temperature message from SBG message.

Parameters:

ref_sbg_imu_msg[in] SBG-ROS IMU message.

Returns:

ROS standard Temperature message.

const sensor_msgs::msg::MagneticField createRosMagneticMessage(const sbg_driver::msg::SbgMag &ref_sbg_mag_msg) const

Create a ROS standard MagneticField message from SBG message.

Parameters:

ref_sbg_mag_msg[in] SBG-ROS Mag message.

Returns:

ROS standard Mag message.

const geometry_msgs::msg::TwistStamped createRosTwistStampedMessage(const sbg_driver::msg::SbgEkfEuler &ref_sbg_ekf_euler_msg, const sbg_driver::msg::SbgEkfNav &ref_sbg_ekf_nav_msg, const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg) const

Create a ROS standard TwistStamped message from SBG messages.

Parameters:
  • ref_sbg_ekf_euler_msg[in] SBG-ROS Ekf Euler message.

  • ref_sbg_ekf_nav_msg[in] SBG-ROS Ekf Nav message.

  • ref_sbg_imu_msg[in] SBG-ROS IMU message.

Returns:

ROS standard TwistStamped message.

const geometry_msgs::msg::TwistStamped createRosTwistStampedMessage(const sbg_driver::msg::SbgEkfQuat &ref_sbg_ekf_vel_msg, const sbg_driver::msg::SbgEkfNav &ref_sbg_ekf_nav_msg, const sbg_driver::msg::SbgImuData &ref_sbg_imu_msg) const

Create a ROS standard TwistStamped message from SBG messages.

Parameters:
  • ref_sbg_ekf_quat_msg[in] SBG-ROS Ekf Quaternion message.

  • ref_sbg_ekf_nav_msg[in] SBG-ROS Ekf Nav message.

  • ref_sbg_imu_msg[in] SBG-ROS IMU message.

Returns:

ROS standard TwistStamped message.

const geometry_msgs::msg::PointStamped createRosPointStampedMessage(const sbg_driver::msg::SbgEkfNav &ref_sbg_ekf_msg) const

Create a ROS standard PointStamped message from SBG messages.

Parameters:

ref_sbg_ekf_msg[in] SBG-ROS EkfNav message.

Returns:

ROS standard PointStamped message (ECEF).

const sensor_msgs::msg::TimeReference createRosUtcTimeReferenceMessage(const sbg_driver::msg::SbgUtcTime &ref_sbg_utc_msg) const

Create a ROS standard timeReference message for a UTC time.

Parameters:

ref_sbg_utc_msg[in] SBG-ROS UTC message.

Returns:

ROS standard timeReference message.

const sensor_msgs::msg::NavSatFix createRosNavSatFixMessage(const sbg_driver::msg::SbgGpsPos &ref_sbg_gps_msg) const

Create a ROS standard NavSatFix message from a Gps message.

Parameters:

ref_sbg_gps_msg[in] SBG-ROS GPS position message.

Returns:

ROS standard NavSatFix message.

const sensor_msgs::msg::FluidPressure createRosFluidPressureMessage(const sbg_driver::msg::SbgAirData &ref_sbg_air_msg) const

Create a ROS standard FluidPressure message.

Parameters:

ref_sbg_air_msg[in] SBG-ROS AirData message.

Returns:

ROS standard fluid pressure message.

const nmea_msgs::msg::Sentence createNmeaGGAMessageForNtrip(const SbgEComLogGnssPos &ref_log_gps_pos) const

Create a ROS NMEA GGA message especially designed to support NTRIP VRS operations.

This message is limited to 80 chars and only sent at up to 1 Hz to maximize VRS providers compatibility.

WARNING: Don’t use this GGA message for navigation purposes as the accuracy is limited.

Parameters:

ref_log_gps_pos[in] SBG GPS Position log.

Returns:

ROS NMEA GGA message.

Public Members

std::shared_ptr<tf2_ros::TransformBroadcaster> tf_broadcaster_
std::shared_ptr<tf2_ros::StaticTransformBroadcaster> static_tf_broadcaster_