Wiki

Package Summary

Standalone QT-based IMU/GPS decoder nodes for Witmotion UART-compatible sensor devices

Package Summary

Standalone QT-based IMU/GPS decoder nodes for Witmotion UART-compatible sensor devices

Overview

witmotion.jpg

This package implements a ROS 1 wrapper for Witmotion IMU driver library. It reads the data from the family of TTL-compatible inertial pose estimation units (IMUs) manufactured by WitMotion Shenzhen Co.,Ltd publishing the information in a ROS-native way using sensor_msgs, geometry_msgs and std_msgs message definition packages. The port access model is implemented in a monopolistic way according to UNIX specifications, so only one instance of the module can be executed for the dedicated virtual device. The library allows programming of any control over the Witmotion sensors. There is native support for baud rates up to 115200 baud, and polling frequencies up to 200 Hz. Please refer to the example controller application to learn how to program a sensor that is not supported now.

The package was developed under Remotization and Robotization Initiative at Elettra Sincrotrone Trieste by the members of the ICT Group.

Installation

sudo apt install ros-${ROS_DISTRO}-witmotion-ros

Supported/tested Devices

The initial tests of the module were done using the following Witmotion sensor devices:

The polling frequency of 200 Hz declared by Witmotion is actually a packet drop frequency which is slightly higher than the maximal possible measurement frequency.

Community-driven tests

Actual bandwidth and measurement frequencies

According to the official Witmotion command table, the available bandwidth values and connected measurement frequencies are the following:

Measurement frequency

256 (if supported)

184

94

44

21

10

5

Hz

ID value

0x00

0x01

0x02

0x03

0x04

0x05

0x06

HEX

Datasheets and official documentation

The module is developed according to the specifications released by Witmotion, the presented snapshot has a download date is 23.02.2022. The official website https://wiki.wit-motion.com is not always accessible, so the PDF snapshots are placed under IPFS web directory:

As additional material, there is the command table, consisting of the list of special commands used to configure 9XX series of sensors.

Published message types

The module published the following message types (once the incoming data is available from the sensor, all the topic names and publisher availability are configurable):

Nodes

All the topic names listed here are configurable. The general rule is the following: the topic name is taken from the configuration parameter naming the corresponding publisher: <measurement-name>_publisher/topic_name. One can adjust the topic names using a config file. Also, all publishers of the node except IMU, orientation and GPS publishers, are ready for linear calibration because there can be differences in decoding coefficients between the sensors (proven for WT31N and JY901B sensors). To set the linear calibration for a publisher, use coefficient and addition parameters in the dedicated configuration namespace (see the sample config file).

witmotion_imu

Opens a serial port to read data from Witmotion sensor.

Published Topics

imu (sensor_msgs/Imu) temperature (sensor_msgs/Temperature) magnetometer (sensor_msgs/MagneticField) barometer (sensor_msgs/FluidPressure) altitude (std_msgs/Float64) orientation (geometry_msgs/Quaternion) gps (sensor_msgs/NavSatFix) gps_altitude (std_msgs/Float32) gps_satellites (std_msgs/UInt32) gps_variance (geometry_msgs/Vector3) gps_ground_speed (geometry_msgs/Twist) witmotion_clock (rosgraph_msgs/Clock)

Services

restart_imu (std_srvs/Empty)

Parameters

restart_service_name (string, default: /restart_imu) port (string, default: ttyUSB0) baud_rate (integer, default: 9600) polling_interval (integer, default: 50) timeout_ms (integer, default: 50) imu_publisher/topic_name (string, default: /imu) imu_publisher/frame_id (string, default: imu) imu_publisher/use_native_orientation (bool, default: false) imu_publisher/measurements (group) temperature_publisher/topic_name (string, default: /temperature) temperature_publisher/frame_id (string, default: base_link) temperature_publisher/enabled (bool, default: true) temperature_publisher/from_message (string, default: acceleration) temperature_publisher/variance (float, default: 0) magnetometer_publisher/topic_name (string, default: /magnetometer) magnetometer_publisher/frame_id (string, default: base_link) magnetometer_publisher/enabled (bool, default: true) magnetometer_publisher/covariance (Row-major matrix 3x3) barometer_publisher/enabled (bool, default: true) barometer_publisher/variance (float, default: 0) barometer_publisher/frame_id (string, default: base_link) barometer_publisher/topic_name (string, default: /barometer) altimeter_publisher/enabled (bool, default: true) altimeter_publisher/topic_name (string, default: /altimeter) orientation_publisher/topic_name (string, default: /orientation) orientation_publisher/enabled (bool, default: false) gps_publisher/enabled (bool, default: false) gps_publisher/navsat_fix_frame_id (string, default: world) gps_publisher/navsat_fix_topic_name (string, default: /gps) gps_publisher/navsat_altitude_topic_name (string, default: /gps_altitude) gps_publisher/navsat_satellites_topic_name (string, default: /gps_satellites) gps_publisher/navsat_variance_topic_name (string, default: /gps_variance) gps_publisher/ground_speed_topic_name (string, default: /gps_ground_speed) rtc_publisher/enabled (bool, default: false) rtc_publisher/topic_name (string, default: /witmotion_clock) rtc_publisher/presync (bool, default: true)

Report a Bug

Usage of controller applications

The underlying library is shipped with a set of controller applications. They allow the users to set up sensors' internal parameters and specify output data. These applications could be run using rosrun. Here only the brief list and set of usage examples is presented. Please refer to the underlying library documentation for a detailed description of controller applications and their options.

Message Enumerator

This application enumerates and catalogizes all messages emitted by the sensor once they comply with Witmotion 11-byte serial protocol. Use this message_enumerator to determine the desired baudrate, port and exact message set your sensor produces. The following example demonstrates the running of enumeration from /dev/ttyUSB0 port on 115200 baud with a polling interval of 10 ms.

rosrun witmotion_ros message-enumerator -d ttyUSB0 -b 115200 -p 10

Troubleshooting

Please refer to the dedicated Troubleshooting wiki page.

Citation

ROS module

DOI: 10.5281/zenodo.7682518

Modern BibTeX

@software{witmotion_ros_2023,
  author       = {Vukolov, Andrey and Kitagawa, Shingo and ElettraSciComp and
                  Baskara and
                  zacharykratochvil},
  title        = {{ElettraSciComp/witmotion\_IMU\_ros: Version 1.2.27}},
  month        = August,
  year         = 2023,
  publisher    = {Zenodo},
  version      = {1.2.27},
  doi          = {10.5281/zenodo.7682518},
  url          = {https://doi.org/10.5281/zenodo.7682518}
}

Plain BibTeX

@misc{witmotion_ros_2023,
  author       = {Vukolov, Andrey and Kitagawa, Shingo and ElettraSciComp and
                  Baskara and
                  zacharykratochvil},
  title        = {{ElettraSciComp/witmotion\_IMU\_ros: Version 1.2.27}},
  year         = 2023,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.7682518},
  howpublished = {Github Releases \url{https://github.com/ElettraSciComp/witmotion_IMU_ros/tree/1.2.27}}
}

Library

DOI: 10.5281/zenodo.7017118

Modern BibTeX

@software{andrei_vukolov_2022_7017118,
  author       = {Vukolov, Andrey},
  title        = {ElettraSciComp/witmotion\_IMU\_QT: Version 0.9.17},
  month        = August,
  year         = 2022,
  publisher    = {Zenodo},
  version      = {v0.9.17-alpha},
  doi          = {10.5281/zenodo.7017118},
  url          = {https://doi.org/10.5281/zenodo.7017118}
}

Plain BibTeX

@misc{andrei_vukolov_2022_7017118,
  author       = {Vukolov, Andrey},
  title        = {ElettraSciComp/witmotion\_IMU\_QT: Version 0.9.17},
  year         = 2022,
  publisher    = {Zenodo},
  doi          = {10.5281/zenodo.7017118},
  howpublished = {Github Releases \url{https://github.com/ElettraSciComp/witmotion_IMU_QT/releases/tag/v0.9.17-alpha}}
}

Wiki: witmotion_ros (last edited 2024-03-07 14:01:59 by Andrey Vukolov)