sbg_driver package from sbg_driver repo

sbg_driver

Package Summary

Tags No category tags.
Version 1.0.1
License MIT
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/SBG-Systems/sbg_ros2.git
VCS Type git
VCS Version master
Last Updated 2020-07-09
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Package Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

ROS driver package for communication with the SBG navigation systems.

Additional Links

Maintainers

  • Rémi Burtin

Authors

  • SBG Systems

sbg_driver

Build Status Build Status

Overview

ROS package for SBG Systems IMU.
The driver allows the user to configure the IMU (if possible, according to the device), to receive messages from the Sbg message protocol, publish ROS standard messages , and to calibrate the magnetometers.

Initial work has been done by ENSTA Bretagne.

Author : SBG Systems
Maintainer : Hadrien Pomès, hadrien.pomes@sbg-systems.com

Installation

Installation from Packages

User can install the sbg_ros2_driver through the standard ROS installation system. * Dashing sudo apt-get install ros-dashing-sbg-driver * Eloquent sudo apt-get install ros-eloquent-sbg-driver * Foxy sudo apt-get install ros-foxy-sbg-driver

Building from sources

Dependencies

Building

  1. Clone the repository (use a Release version)
  2. Build using the normal ROS catkin build system
cd colcon_ws/src
git clone https://github.com/SBG-Systems/sbg_ros2.git
cd sbg_ros2
rosdep update
rosdep install --from-path .
cd ../..
colcon build
source install/setup.bash

Usage

To run the default Ros2 node with the default configuration

ros2 launch sbg_driver sbg_device_launch.py

To run the magnetic calibration node

ros2 launch sbg_driver sbg_device_mag_calibration_launch.py

Config files

Default config files

Every configuration file is defined according to the same structure.

  • sbg_device_uart_default.yaml
    This config file is the default one for Uart connection with the device.
    It does not configure the device through the ROS node, so it has to be previously configured (manually or with the ROS node).
    It defines a few outputs for the device :

    • /sbg/imu_data, /sbg/ekf_quat at 25Hz
    • ROS standard outputs /imu/data, /imu/velocity, /imu/temp at 25Hz
    • /sbg/status, /sbg/utc_time and /imu/utc_ref at 1Hz.
  • sbg_device_udp_default.yaml
    This config file is the default one for an Udp connection with the device.
    It does not configure the device through the ROS node, so it has to be previously configured (manually or with the ROS node).
    It defines a few outputs for the device :

    • /sbg/imu_data, /sbg/ekf_quat at 25Hz
    • ROS standard outputs /imu/data, /imu/velocity, /imu/temp at 25Hz
    • /sbg/status, /sbg/utc_time and /imu/utc_ref at 1Hz.

Example config files

  • ellipse_A_default.yaml
    Default config file for an Ellipse-A.

  • ellipse_E_default.yaml
    Default config file for an Ellipse-E with an external antenna and external Gnss.

  • ellipse_N_default.yaml
    Default config file for an Ellipse-N with an external antenna and internal Gnss.

Launch files

Default launch files

  • sbg_device_launch.py
    Launch the sbg_device node to handle the receivde data, and load the sbg_device_uart_default.yaml configuration.

  • sbg_device_mag_calibration_launch.py
    Launch the sbg_device_mag node to calibrate the magnetometers, and load the ellipse_E_default.yaml configuration.

Nodes

sbg_device

The sbg_device node handles the communication with the connected device, and publishes the SBG output to the Ros environment.

Published Topics

SBG specific topics

Provides informations about the general status (Communication, Aiding, etc..).

Provides UTC time reference.

IMU status, and sensors values.

Computed orientation using Euler angles.

Computed orientation using Quaternion.

Computed navigation data.

Magnetic data.

Magnetometer calibration data.

Heave, surge and sway data.

GPS velocities from GPS receiver.

GPS positions from GPS receiver.

GPS true heading from dual antenna system.

GPS raw data for post processing.

Odometer velocity.

Event on sync in the corresponding pin.

Pressure data.

ROS standard topics

In order to define ROS standard topics, it requires sometimes several SBG messages, to be merged. For each ROS standard, you have to activate the needed SBG outputs.

IMU data. Requires /sbg/imu_data and /sbg/ekf_quat.

IMU temperature data. Requires /sbg/imu_data.

IMU velocity data. Requires /sbg/imu_data.

IMU magnetic field. Requires /sbg/mag.

IMU pressure data. Requires /sbg/pressure.

Earth-Centered Earth-Fixed position. Requires /sbg/ekf_nav.

UTC time reference. Requires /sbg/utc_time.

Navigation satellite fix for any Global Navigation Satellite System. Requires /sbg/gps_pos.

sbg_device_mag

The sbg_device_mag node handles the magnetic calibration for suitable devices.

Services

Service to start/stop the magnetic calibration.

Service to save the magnetic calibration to the connected device.

HowTo

Configure the SBG device

The SBG Ros driver allows the user to configure the device before starting the data handling.
To do so, set the corresponding parameter in the used config file.

# Configuration of the device with ROS.
confWithRos: true

Then, modify the desired parameters in the config file, using the SBG Firmware Manual, to see which features are configurable, and which parameter values are available.

Calibrate the magnetometers

Ellipse-A/E/N use magnemoter to provide heading. A calibration is then required to compensate soft and hard iron distortions due to the environmenent (motors, batteries, ...). The magnetic calibration procedure should be held in a non magnetic area (outside of buildings).

roslaunch sbg_driver sbg_device_mag_calibration.launch
rosservice call /sbg/mag_calibration

success: True
message: "Magnetometer calibration process started."

Proceed rotations of the IMU (every orientation if possible).

rosservice call /sbg/mag_calibration

success: True
message: "Magnetometer calibration is finished. See the output console to get calibration informations."

If the magnetic calibration is satisfaying (Quality, Confidence), it could be uploaded/saved to the device.

rosservice call /sbg/mag_calibration_save

success: True
message: "Magnetometer calibration has been uploaded to the device."

Enable communication with the SBG device

To be able to communicate with the device, be sure that your user is part of the dialout group.
Once added, restart your machine to save and apply the changes.

sudo adduser $USER dialout

Create udev rules

Udev rules can be defined for communication port, in order to avoid modifying the port in configuration if it has changed. Udev documentation

A symlink can be configured and defined to uniquely identify the connected device.
Once it is done, configuration file could be updated portName: "/dev/sbg".

See the docs folder, to see an example of rules with the corresponding screenshot using the udev functions.

Synchronize the ROS messages from an external time source

No external source

When no external time source is available, the header time of messages is the system Epoch (Unix) processing time of the SBG callback, given by the ros::Time::now() .

External Gnss receiver and/or External antenna

When the SBG device is connected with an external Gnss receiver, if the device receives a full valid SBG Utc log, i.e : * A stable input clock to be synchronized with the internal clock * A valid Utc time data (with or without the leap second) * The clock has converged to the PPS

then, the time header will be computed from the last received Utc log and the device timestamp given by the internal clock.

Contributing

Bugs and issues

Please report bugs and/or issues using the Issue Tracker

Features requests or additions

In order to contribute to the code, please use Pull requests to the devel branch.
If you have some feature requests, use the Issue Tracker as well.

CHANGELOG

Changelog for package sbg_driver

1.0.1 (2020-07-09)

  • Update Licenses
  • First version

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Recent questions tagged sbg_driver at answers.ros.org