Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro jazzy showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Repo symbol

imu_calib repository

imu_calib

ROS Distro
humble

Repository Summary

Checkout URI https://github.com/Nathan85001/imu_calib.git
VCS Type git
VCS Version ros2
Last Updated 2025-07-31
Dev Status UNMAINTAINED
Released RELEASED
Tags No category tags.
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Packages

Name Version
imu_calib 0.1.0

README

imu_calib (ROS 2 Humble)

This repository contains a ROS 2 package with tools for computing and applying calibration parameters to IMU measurements.

Originally developed for ROS 1 by Daniel Koch, and now ported to ROS 2 Humble by Nathan Romany Fares.


Supported ROS 2 Distribution

  • ROS 2 Humble Hawksbill

Installation

To build the package in your ROS 2 workspace:

cd ~/ros2_ws/src
git clone https://github.com/Nathan85001/imu_calib.git -b ros2
cd ..
rosdep install --from-paths src -r -y
colcon build
source install/setup.bash
ros2 run imu_calib do_calib #Follow the instructions until the node stop working
ros2 run imu_calib apply_calib

Usage

The package contains two nodes. The first computes the accelerometer calibration parameters and saves them to a YAML file, and needs to be run only once. After you have run this node to generate the YAML calibration file, the second node uses that file to apply the calibration to an uncalibrated IMU topic to produce a calibrated IMU topic.

Nodes

do_calib

Computes the accelerometer calibration parameters. It should be run directly with a rosrun in a terminal rather than from a launch file, since it requires keyboard input. After receiving the first IMU message, the node will prompt you to hold the IMU in a certain orientation and then press Enter to record measurements. After all 6 orientations are complete, the node will compute the calibration parameters and write them to the specified YAML file.

The underlying algorithm is a least-squares calibration approach based on and similar to that described in STMicroeletronics Application Note AN4508. Due to the nature of the algorithm, obtaining a good calibration requires fairly accurate positioning of the IMU along each of its axes.

Topics

Subscribed Topics
  • imu (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file to which the calibration parameters will be written
  • ~measurements (int, default: 500)
    The number of measurements to collect for each orientation
  • ~reference_acceleration (double, default: 9.80665)
    The expected acceleration due to gravity

apply_calib

Applies the accelerometer calibration parameters computed by the do_calib node. Also optionally (enabled by default) computes the gyro biases at startup and subtracts them off.

Topics

Subscribed Topics
  • raw (sensor_msgs/Imu)
    The raw, uncalibrated IMU measurements
Published Topics
  • corrected (sensor_msgs/Imu)
    The corrected, calibrated IMU measurements

Parameters

  • ~calib_file (string, default: “imu_calib.yaml”)
    The file from which to read the calibration parameters
  • ~calibrate_gyros (bool, default: true)
    Whether to compute gyro biases at startup and subsequently subtract them off
  • ~gyro_calib_samples (int, default: 100)
    The number of measurements to use for computing the gyro biases

Acknowledgment

Originally developed by Daniel Koch for ROS 1.
Ported to ROS 2 Humble and maintained by Nathan Romany Fares.