witmotion_ros
module 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 ROS-native way using sensor_msgs
and std_msgs
message definition packages. The module is focused on read-only access, so calibration and bias regulation functions are implemented in the underlying library. Port access model is implemented in monopolistic way acccording to UNIX specification, so only one instance of the module can be executed for the dedicated virtual device.
The initial tests of the module were done using the following Witmotion sensor devices:
- WT31N 3-Axis Accelerometer/Gyroscope (Linear accelerations + 2-axis Euler angles gravity tracking)
- JY901B 9-Axis Combined IMU/Magnetometer/Altimeter (Linear accelerations, angular velocities, Euler angles, magnetic field, barometry, altitude)
All the devices were connected to the machine using USB-TTL converter under reference schematics.
The module is developed according to the specifications released by Witmotion, the presented snapshot has 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:
- JY901 9-Axis Combined IMU/Magnetometer/Altimeter Sensor
- WT61C 3-Axis Combined Accelerometer/Gyroscope Sensor
- WT(9)31N 3-Axis Accelerometer/Gyroscope Sensor
roslaunch witmotion_ros witmotion_launch
Configuration of the node is done by default via the configuration YAML file config.yml
. But it also can be done using roslaunch
XML syntax under the node's internal namespace. The single value measurements, like pressure and temperature, are enabled for the linear calibration because there can be differences in decoding coefficients between the sensors (proven for WT31N and JY901B sensors).
port
- the virtual kernel device name for a port,ttyUSB0
by defaultbaud_rate
- port rate value to be used by the library for opening the port, 9600 baud by defaultpolling_interval
- the sensor polling interval in milliseconds. If this parameter is omitted, the default value is set up by the library (50 ms).restart_service_name
- the service name used to restart the sensor connection after an error.imu_publisher:
topic_name
- the topic name for IMU data publisher,imu
in the node's namespace by defaultframe_id
- IMU message header frame IDmeasurements
- every measurement in IMU message data pack can be enabled or disabled. If the measurement is disabled, the corresponding covariance matrix is set to begin from-1
as it is described in the message definition.acceleration
enabled
covariance
- row-major matrix 3x3, all zeros for unknown covariation
angular_velocity
enabled
covariance
- row-major matrix 3x3, all zeros for unknown covariation
orientation
enabled
covariance
- row-major matrix 3x3, all zeros for unknown covariation
temperature_publisher
enabled
- enable or disable temperature measurement extractiontopic_name
- the topic name for publishing temperature dataframe_id
- message header frame IDfrom_message
- the message type string to determine from which type of Witmotion measurement message the temperature data should be extracted (please refer to the original documentation for detailed description). The possible values are:acceleration
,angular_vel
,orientation
ormagnetometer
.variance
- the constant variance, if applicable, otherwise 0coefficient
- linear calibration multiplier, 1.0 by defaultaddition
- linear calibration addendum, 0 by default
magnetometer_publisher
enabled
- enable or disable magnetometer measurement extractiontopic_name
- the topic name for publishing the dataframe_id
- message header frame IDcoefficient
- linear calibration multiplier, 1.0 by defaultaddition
- linear calibration addendum, 0 by defaultcovariance
- row-major matrix 3x3, all zeros for unknown covariation
barometer_publisher
enabled
- enable or disable barometer measurement extractiontopic_name
- the topic name for publishing the dataframe_id
- message header frame IDcoefficient
- linear calibration multiplier, 1.0 by defaultaddition
- linear calibration addendum, 0 by defaultvariance
- the constant variance, if applicable, otherwise 0
altimeter_publisher
enabled
- enable or disable altitude measurement extractiontopic_name
- the topic name for publishing the datacoefficient
- linear calibration multiplier, 1.0 by defaultaddition
- linear calibration addendum, 0 by default
orientation_publisher
enabled
- enable or disable orientation measurement extractiontopic_name
- the topic name for publishing the data