{"id":19746693,"url":"https://github.com/maximilian-nitsch/IMU-Simulator","last_synced_at":"2025-09-17T16:32:15.041Z","repository":{"id":235760504,"uuid":"791162222","full_name":"rwth-irt/IMU-Simulator","owner":"rwth-irt","description":"C++ Simulator and ROS 2 Node for Inertial Measurement Units.","archived":false,"fork":false,"pushed_at":"2024-07-30T09:39:42.000Z","size":13029,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2024-11-12T02:15:07.714Z","etag":null,"topics":["autonomous-robots","autonomous-underwater-vehicle","autonomous-vehicles","auv","auv-simulator","imu","imu-sensor","inertial-measurement-units","inertial-sensors","mems-sensors","navigation","robotics","robotics-simulation","rov","sensor","simulation","simulator"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rwth-irt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-24T07:55:17.000Z","updated_at":"2024-10-15T04:17:42.000Z","dependencies_parsed_at":null,"dependency_job_id":"67fc890a-e84a-4caa-bf67-0df3df34b322","html_url":"https://github.com/rwth-irt/IMU-Simulator","commit_stats":null,"previous_names":["rwth-irt/imu-simulator"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FIMU-Simulator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FIMU-Simulator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FIMU-Simulator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rwth-irt%2FIMU-Simulator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rwth-irt","download_url":"https://codeload.github.com/rwth-irt/IMU-Simulator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233408249,"owners_count":18671812,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autonomous-robots","autonomous-underwater-vehicle","autonomous-vehicles","auv","auv-simulator","imu","imu-sensor","inertial-measurement-units","inertial-sensors","mems-sensors","navigation","robotics","robotics-simulation","rov","sensor","simulation","simulator"],"created_at":"2024-11-12T02:15:31.509Z","updated_at":"2025-09-17T16:32:15.034Z","avatar_url":"https://github.com/rwth-irt.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# IRT C++/ROS 2 IMU-Simulator\n![Build](https://github.com/maximilian-nitsch/IMU-Simulator/actions/workflows/ci.yaml/badge.svg)\u003c!-- --\u003e\n![License](https://img.shields.io/github/license/maximilian-nitsch/IMU-Simulator.svg)\u003c!-- --\u003e\n[![Last Commit](https://img.shields.io/github/last-commit/maximilian-nitsch/IMU-Simulator)](https://github.com/maximilian-nitsch/IMU-Simulator/commits/main)\u003c!-- --\u003e\n[![ROS2 Humble](https://img.shields.io/badge/ROS2-Humble-blue)](https://index.ros.org/doc/ros2/Installation/Humble/)\u003c!-- --\u003e\n[![Release](https://img.shields.io/github/v/release/maximilian-nitsch/IMU-Simulator)](https://github.com/maximilian-nitsch/IMU-Simulator/releases)\u003c!-- --\u003e\n[![Open Issues](https://img.shields.io/github/issues/maximilian-nitsch/IMU-Simulator)](https://github.com/maximilian-nitsch/IMU-Simulator/issues)\u003c!-- --\u003e\n[![Contributors](https://img.shields.io/github/contributors/maximilian-nitsch/IMU-Simulator)](https://github.com/maximilian-nitsch/IMU-Simulator/graphs/contributors)\n\n\u003cimg src=\"./data/icon.png\" alt=\"Icon\" width=\"50%\"\u003e\n\n\u003c!--- protected region package header begins --\u003e\n**Author:**\n- Maximilian Nitsch \u003cm.nitsch@irt.rwth-aachen.de\u003e (Institute of Automatic Control - RWTH Aachen University)\n\n**Maintainer:**\n  - Maximilian Nitsch \u003cm.nitsch@irt.rwth-aachen.de\u003e (Institute of Automatic Control - RWTH Aachen University)\n\n**Contributors:**\n  - Dmitrii Likhachev \u003cdmitrii.likhachev@rwth-aachen.de\u003e (Institute of Automatic Control - RWTH Aachen University)\n  - Philippe Panten \u003cp.panten@tu-braunschweig.de\u003e (Institute of Flight Guidance  - Technical University of Braunschweig)\n\u003c!--- protected region package header ends --\u003e\n\n## Description\nThis project provides a high-fidelity IMU simulator written in C++.\n\nThe simulator implements the following features:\n- Accelerometer and gyroscope measurement simulation\n- WELMEC gravity model (accelerometer)\n- WGS84 Earth angular velocity model (gyroscope)\n- Transport rate angular velocity model (gyroscope)\n- Turn-on bias\n- Scaling errors\n- Misalignment and orthogonality errors\n- Stochastic noise (colored/non-white noise)\n  - Velocity/angular random walk\n  - Bias instability\n  - Acceleration/rate random walk\n- Saturation\n- Quantization errors\n- All parameters for an IMU can be configured in a YAML file\n- All models and effects can be enabled/disabled separately\n\nAn example configuration from real data of a STIM300 IMU is provided.\n\nMATLAB scripts are provided to extract the stochastic noise components using Allan variance analysis.\nFor this, you must provide a long-term (minimum six hours) dataset of acceleration/gyroscope measurements.\nThe IMU must be static, temperature- and vibration-compensated during the recording.\n\n## Table of Contents\n\n- [Dependencies](#dependencies)\n- [Installation](#installation)\n- [Usage](#usage)\n- [ROS 2 Nodes](#ros-2-nodes)\n  - [Publisher Node](#publisher-node)\n  - [Subscriber Node](#subscriber-node)\n- [Coding Guidelines](#coding-guidelines)\n- [References](#references)\n- [Contributing](#contributing)\n- [License](#license)\n\n# Dependencies\n\nThis project depends on the following literature and libraries:\n\n- **Eigen3**: Eigen is a C++ template library for linear algebra: [Eigen website](https://eigen.tuxfamily.org/).\n- **ROS 2 Humble**: ROS 2 is a set of software libraries and tools for building robot applications: [ROS 2 Installation page](https://docs.ros.org/en/humble/Installation.html)).\n\n\n# Installation\n\nTo install the `imu_simulator_package`, you need to follow these steps:\n\n1. **Install Eigen3**: Eigen3 is a dependency for your package. You can install it using your package manager. For example, on Ubuntu, you can install it using the following command:\n\n    ```bash\n    sudo apt-get install libeigen3-dev\n    ```\n\n2. **Install ROS 2 Humble**: Make sure you have ROS 2 (Humble) installed. You can follow the official installation instructions provided by ROS 2. Visit [ROS 2 Humble Installation page](https://docs.ros.org/en/humble/Installation.html) for detailed installation instructions tailored to your platform.\n\n3. **Clone the Package**: Clone the package repository to your ROS 2 workspace. If you don't have a ROS 2 workspace yet, you can create one using the following commands:\n\n    ```bash\n    mkdir -p /path/to/ros2_workspace/src\n    cd /path/to/ros2_workspace/src\n    ```\n\n    Now, clone the package repository:\n\n    ```bash\n    git clone \u003crepository_url\u003e\n    ```\n\n    Replace `\u003crepository_url\u003e` with the URL of your package repository.\n\n4. **Build the Package**: Once the package is cloned, you must build it using colcon, the default build system for ROS 2. Navigate to your ROS 2 workspace and run the following command:\n\n    ```bash\n    cd /path/to/ros2_workspace\n    colcon build\n    ```\n\n    This command will build all the packages in your workspace, including the newly added package.\n\n5. **Source the Workspace**: After building the package, you need to source your ROS 2 workspace to make the package available in your ROS 2 environment. Run the following command:\n\n    ```bash\n    source /path/to/ros2_workspace/install/setup.bash\n    ```\n\n    Replace `/path/to/ros2_workspace` with the actual path to your ROS 2 workspace.\n\nThat's it! Your `imu_simulator_package` should now be installed along with its dependencies and ready to use in your ROS 2 environment.\n\n## Usage\n\n1. **Configure your YAML file** for your IMU or use the default file.\n\n2. **Start the IMU simulator** with the launch file:\n    ```bash\n    ros2 launch imu_simulator_package imu_simulator.launch.py\n    ```\n  The IMU simulator prints your settings and waits for a ground truth odometry message.\n\n3. **Provide an odometry publisher** from you vehicle simulation.\n  For testing, you can launch the odometry_test_publisher node:\n    ```bash\n    ros2 launch imu_simulator_package odometry_test_publisher.py\n    ```\n\n4. The IMU values should now be published.\n\n5. ![Accelerometer and gyroscope values visualized with PlotJuggler.](./data/example.gif)\n\n**Important Usage Information**:\n- The odometry message must be published with at least the IMU data rate/sample time.\n- The message `/imu/diagnostic` will show `WARN` if the odometry rate is lower.\n- If no odometry message is published, the message `/imu/diagnostic` will show `STALE`.\n- If everything is correct, `/imu/diagnostic` will show `OK`. \n\n## ROS 2 Nodes\n\nThe IMU simulator node implements five publishers and subscribes to one topic.\nROS 2 services or actions are not provided.\n\n### Publisher Node\n\nThis node publishes the following topics:\n\n| Topic Name       | Message Type        | Description                        |\n|------------------|---------------------|------------------------------------|\n| `*/imu/data`   | `sensor_msgs/Imu.msg`   | Publishes IMU sensor data.|\n| `*/imu/data_visualization`   | `geometry_msgs/AccelStamped.msg`   | Publishes IMU sensor data for visualization (rviz).|\n| `*/imu/true_linear_acceleration`   | `geometry_msgs/Vector3.msg`   | Publishes Itrue linear acceleration.|\n| `*/imu/true_linear_angular_velocity`   | `geometry_msgs/Vector3.msg`   | Publishes true angular velocity.|\n| `*/imu/diagnostic`  | `diagnostic_msgs/DiagnosticStatus.msg` | Publishes diagnostic status of IMU data.\n\n### Subscriber Node\n\nThis node subscribes to the following topics:\n\n| Topic Name        | Message Type        | Description                        |\n|-------------------|---------------------|------------------------------------|\n| `*/odometry`| `nav_msgs/Odometry.msg`| Subscribes to ground truth vehicle odometry.|\n\n## Coding Guidelines\n\nThis project follows these coding guidelines:\n- https://google.github.io/styleguide/cppguide.html\n- http://docs.ros.org/en/humble/The-ROS2-Project/Contributing/Code-Style-Language-Versions.html \n\n## References\n\nThe IMU simulator implementation closely follows the work:\n- M. Nitsch, \"Navigation of a miniaturized autonomous underwater vehicle exploring waters under ice,\" Dissertation, Rheinisch-Westfälische Technische Hochschule Aachen, Aachen, RWTH Aachen University, 2024. [DOI: 10.18154/RWTH-2024-05964](https://www.researchgate.net/publication/382562855_Navigation_of_a_Miniaturized_Autonomous_Underwater_Vehicle_Exploring_Waters_Under_Ice?_sg%5B0%5D=xNyP6RXVcEfazembhPB6cRxGQTBAvWqw6qMza26FExHUVzWcV9VUd35T4l6KjUqbo1a7W6okgPi3zqqUQYww5dmfZgsQcoJlvBE3ss1T.JLcM4K_iQyfJO7N73P9ebOmEd0xchppKYQemo5hh6ecobLxw5ZSaPgwEvlqYcQtr25iVtPvdMorpxfHK_Oldag\u0026_tp=eyJjb250ZXh0Ijp7ImZpcnN0UGFnZSI6ImhvbWUiLCJwYWdlIjoicHJvZmlsZSIsInBvc2l0aW9uIjoicGFnZUNvbnRlbnQifX0).\n- J. A. Farrell, F. O. Silva, F. Rahman and J. Wendel, \"Inertial Measurement Unit Error Modeling Tutorial: Inertial Navigation System State Estimation with Real-Time Sensor Calibration,\" in IEEE Control Systems Magazine, vol. 42, no. 6, pp. 40-66, Dec. 2022, [DOI: 10.1109/MCS.2022.3209059](https://doi.org/10.1109/MCS.2022.3209059).\n- J. A. Farrell, \"Aided Navigation Systems: GPS and High Rate Sensors,\" New York, NY, McGraw-Hill, 552 pages, 2008.\n\nThe MATLAB scripts are in parts taken from:\n- [AV-MATLAB-SW](https://github.com/jaffarrell/AV-Matlab-SW)\n\n## Contributing\n\nIf you want to contribute to the project, see the [CONTRIBUTING](CONTRIBUTING) file for details.\n\n## License\n\nThis project is licensed under the BSD-3-Clause License. See the [LICENSE](LICENSE) file for details.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilian-nitsch%2FIMU-Simulator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaximilian-nitsch%2FIMU-Simulator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaximilian-nitsch%2FIMU-Simulator/lists"}