![]() |
sensor_fusion package from robotics_software_engineer repocontrol_systems custom_robots drive_mobile_robot mapping navigation_ path_planning robot_sensing sensor_fusion |
Package Summary
Tags | No category tags. |
Version | 0.0.0 |
License | TODO: License declaration |
Build type | AMENT_CMAKE |
Use | RECOMMENDED |
Repository Summary
Description | Curated Learning Path for Robotics Software Engineer . Theory , Programming and Research |
Checkout URI | https://github.com/robotisim/robotics_software_engineer.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-01-24 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | opencv robotics computer gazebo cpp17 pcl drones mobile-robots ros2 robotic-arm moveit2 rviz2 |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- luqman
Authors
Introduction
The sensor_fusion
package is a comprehensive tool designed for teaching and implementing sensor fusion techniques in robotics. The package includes practical implementations of 1D and 2D Kalman Filters as well as the Extended Kalman Filter (EKF). These algorithms are crucial for combining data from various sensors to accurately estimate the state of a robot, which is essential in applications such as localization, navigation, and control.
How to Run
System Requirements: ROS 2 Humble on Ubuntu 22.04 (tested).
To build the package:
colcon build --packages-select sensor_fusion
To source the setup file:
source install/setup.bash
Running Simulations
- EKF with KITTI Dataset:
ros2 launch sensor_fusion kitti_data_run.launch.py
- Download KITTI Dataset:
# Navigate to the directory containing the bash script (raw_data_downloader.sh)
chmod +x raw_data_downloader.sh
./raw_data_downloader.sh
- Arrange KITTI Data in your workspace: Ensure your workspace has the following structure:
ros2_ws
├── data
└── 2011_09_26
├── 2011_09_26_drive_0001_sync
│ ├── image_00
│ │ ├── data ...
- Run KITTI Data Sample:
ros2 run ros2_kitti_publishers kitti_publishers
- Run IMU and GPS Data Fusion Node:
ros2 run sensor_fusion ekf_imu_gps
- Kalman Filter with TurtleBot3 in Gazebo:
ros2 launch sensor_fusion linear_kf.launch.py
# In a new terminal, run:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
- EKF with TurtleBot3 IMU and Odometry:
ros2 launch sensor_fusion ekf_tb3_imu_odom.launch.py
Note: File names might have changed since the initial lectures, as this represents the final form of the package as it evolved by the last lecture.
Test your Learnings with Assignments
Source Files
-
ekf_lib.cpp / ekf_lib.hpp
- Purpose: Implements the core logic for the Extended Kalman Filter (EKF) algorithm, allowing for sensor fusion in non-linear systems.
- Algorithm: The EKF is used to estimate the state of a robot by fusing data from multiple sensors, such as IMU and GPS.
-
ekf_node.cpp
-
Purpose: A ROS 2 node that uses the
ekf_lib
to perform sensor fusion with the EKF. This node is designed to integrate and process sensor data in real-time, producing accurate state estimates.
-
Purpose: A ROS 2 node that uses the
-
linear_kf.cpp
- Purpose: Implements a node for 1D or 2D Kalman Filter algorithms, suitable for linear state estimation tasks in robotics.
Launch Files
-
ekf_tb3_imu_odom.launch.py
- Purpose: Launches the EKF node for fusing IMU and odometry data from a TurtleBot3 robot. This configuration is useful for accurate state estimation in environments where both IMU and odometry data are available.
-
Nodes Launched:
-
ekf_filter_node
- Performs sensor fusion using the EKF algorithm.
-
-
kitti_data_run.launch.py
- Purpose: Sets up the environment for running sensor fusion with data from the KITTI dataset, using RViz for visualization and the EKF node for processing.
-
Nodes Launched:
-
rviz2
- Visualizes the data and state estimates. -
kitti_publishers
- Publishes KITTI dataset data to the ROS 2 environment. -
ekf_node
- Runs the EKF algorithm on the KITTI data.
-
-
linear_kf.launch.py
- Purpose: Launches the Kalman Filter node in a TurtleBot3 simulation environment within Gazebo, along with RViz for visualization. This setup is ideal for understanding how linear Kalman Filters operate in a simulated robotic environment.
-
Nodes Launched:
-
linear_kalman_filter
- Runs the linear Kalman Filter for state estimation. -
rviz2
- Provides visualization for the sensor fusion process.
-
Package Dependencies
The CMakeLists.txt
file specifies the necessary dependencies for building and running the sensor_fusion
package:
-
Dependencies:
-
rclcpp
- ROS 2 C++ API for creating nodes, publishers, and subscribers. -
std_msgs
- Standard ROS 2 message types, used in the publisher and subscriber nodes. -
sensor_msgs
- ROS 2 message types for handling sensor data. -
nav_msgs
- ROS 2 message types for navigation data, such as odometry. -
visualization_msgs
- ROS 2 message types for visualization, such as markers in RViz. -
Eigen3
- A C++ template library for linear algebra, used in the EKF and Kalman Filter implementations. -
gazebo_ros
- Integration with the Gazebo simulator for launching and controlling the robot in a simulated environment.
-
This package is an excellent resource for learning and applying sensor fusion techniques in robotics. It offers practical examples and configurations that can be directly used or adapted for real-world applications.