Skip to content

My workspace about the reading, processing and calibration of IMU sensor.

Notifications You must be signed in to change notification settings

yanliang-wang/imu_ws

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Workspace about IMU

Introduction

Function 1: Provide ROS drivers for Xsens Mti series.

Function 2: Generate odometry message by median discrete integral of IMU data.

Function 3: Calibrate the noise and random walk noise of bias of IMU.

Quick Start

1. Download & Build

git clone --recursive https://github.com/yanliang-wang/imu_ws.git

Modify imu_ws/src/code_utils/src/sumpixel_test.cpp: #include "backward.hpp" --> #include “code_utils/backward.hpp”

catkin_make -DCATKIN_WHITELIST_PACKAGES="code_utils"

catkin_make -DCATKIN_WHITELIST_PACKAGES=""

2. Read Sensor Data(Only for Xsens Mti series)

roslaunch imu_odom read_data.launch  

If there is an error called [ERROR] [1627211303.220970]: Fatal: could not find proper MT device. May the following code will solve the problem.

sudo chmod 777 /dev/ttyUSB0

3. Display Odom of IMU by directly discrete integral

a. Configure the yaml file

Modify imu_ws/src/imu_odom/config/test.yaml

imu_odom:
  {
    hz: 200,					# the rate of odom published
    g_vec: [0.0, 0.0, -9.81],	# the gravity vector relative to initial frame
    enable_position: false,		# enable display of position of odom
    sub_imu_topic: /imu/data,	# the topic name of IMU to subscribe
    pub_odom_topic: /imu/odom	# the topic name of Odom to publish
  }

b. Run it

roslaunch imu_odom test.launch

c. Result demo

  • Orientation change with low drift.

  • Position change with high drift( IMU is stationary in this case ).

4. Calibrate the noise and random walk noise of bias

Refer to imu_utils.

Step:

  • collect the data while the IMU is Stationary, with a two hours duration, at least two hours suggested;
  • modify the param of the launch file;
<launch>
    <node pkg="imu_utils" type="imu_an" name="imu_an" output="screen">
        <param name="imu_topic" type="string" value= "/imu/data"/>
        <param name="imu_name" type="string" value= "xsens"/>
        <param name="data_save_path" type="string" value= "$(find imu_utils)/data/"/>
        <param name="max_time_min" type="int" value= "200"/> <!-- the duration of your bag (Unit: minute) -->
        <param name="max_cluster" type="int" value= "100"/>
    </node>
</launch>
  • roslaunch the rosnode and play the bag file;
roslaunch imu_utils xsens.launch

rosbag play -r 200 XXX.bag
  • see the result;

The calibration result is saved in imu_ws/src/imu_utils/data.

About

My workspace about the reading, processing and calibration of IMU sensor.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published