SBG-Systems / sbg_ros_driver

ROS 1 driver for SBG Systems IMU/AHRS/INS units such as ELLIPSE or QUANTA.
https://www.sbg-systems.com
MIT License
75 stars 43 forks source link
driver ellipse-imu ros sbg

sbg_driver

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 : SBG Systems, support@sbg-systems.com

Installation

Installation from Packages

User can install the sbg_ros_driver through the standard ROS installation system.

Building from sources

Dependencies

Building

  1. Clone the repository (use a Release version)
  2. Build using the normal ROS catkin build system
cd catkin_ws/src
git clone https://github.com/SBG-Systems/sbg_ros_driver.git
cd ../
catkin_make

Usage

To run the default Ros node with the default configuration

roslaunch sbg_driver sbg_device.launch

To run the magnetic calibration node

roslaunch sbg_driver sbg_device_mag_calibration.launch

Config files

Default config files

Every configuration file is defined according to the same structure.

Example config files

Launch files

Default launch files

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
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.

sbg_device_mag

The sbg_device_mag node handles the magnetic calibration for suitable devices.

Services

How To

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.

Time source & reference

ROS uses an internal system time to time stamp messages. This time stamp is generally gathered when the message is processed and published. As a result, the message is not time stamped accurately due to transmission and processing delays.

SBG Systems INS however provides a very accurate timing based on GNSS time if available. The following conditions have to be met to get absolute accurate timing information:

You can select which time source to use with the parameter time_reference to time stamp messages published by this driver:

Configuration example to use an absolute and accurate time reference to UNIX epoch:

# Time reference:
time_reference: "ins_unix"

Change frame parameters

Frame ID

The frame_id of the header can be set with this parameter:

# Frame convention
frame_id: "imu_link_ned"

Frame convention

The frame convention can be set to NED or ENU

Troubleshooting

If you experience higher latency than expected and have connected the IMU via an USB interface, you can enable the serial driver low latency mode:

/bin/setserial /dev/<device> low_latency

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.