{"id":15197082,"url":"https://github.com/ahmedanwar123/robot_ekf","last_synced_at":"2025-09-11T16:16:40.253Z","repository":{"id":253656343,"uuid":"844142952","full_name":"ahmedanwar123/robot_ekf","owner":"ahmedanwar123","description":"An Extended Kalman Filter Package with a GUI attached to tune covariance values in realtime","archived":false,"fork":false,"pushed_at":"2024-11-14T10:28:35.000Z","size":55,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-12T16:57:01.975Z","etag":null,"topics":["ekf","ekf-localization","kalman-filter","pose-estimation","python","python3","raspberry-pi","raspberrypi","robot-pose","robotics","ros","rpi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ahmedanwar123.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"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-08-18T14:12:45.000Z","updated_at":"2024-11-14T10:28:38.000Z","dependencies_parsed_at":"2024-08-26T12:16:57.358Z","dependency_job_id":"3b921081-707c-4c48-b157-91d954d77f0c","html_url":"https://github.com/ahmedanwar123/robot_ekf","commit_stats":null,"previous_names":["ahmedanwar123/robot_ekf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ahmedanwar123/robot_ekf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedanwar123%2Frobot_ekf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedanwar123%2Frobot_ekf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedanwar123%2Frobot_ekf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedanwar123%2Frobot_ekf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ahmedanwar123","download_url":"https://codeload.github.com/ahmedanwar123/robot_ekf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ahmedanwar123%2Frobot_ekf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274666466,"owners_count":25327446,"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","status":"online","status_checked_at":"2025-09-11T02:00:13.660Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ekf","ekf-localization","kalman-filter","pose-estimation","python","python3","raspberry-pi","raspberrypi","robot-pose","robotics","ros","rpi"],"created_at":"2024-09-28T00:41:28.093Z","updated_at":"2025-09-11T16:16:40.192Z","avatar_url":"https://github.com/ahmedanwar123.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EKF for Pose Estimation\n\nThis ROS package implements an Extended Kalman Filter (EKF) to estimate the pose of a robot using odometry and IMU data. It is designed to fuse sensor data from IMU and Encoders to improve pose estimation accuracy.\n\n## Overview\n\nThe `robot_ekf` package includes:\n\n- **KalmanFilter**: Class Implements the Extended Kalman Filter for state estimation.\n- **SesnorData**: Class Manages sensor data subscriptions, performs EKF updates, and publishes the estimated pose.\n- **CovarianceGUI**: Graphical User Interface updates covariance values live.\n\n## Features\n\n- **State Prediction**: Predicts the robot's state using odometry and IMU data.\n- **State Update**: Updates the state estimate with incoming sensor measurements.\n- **Message Publishing**: Publishes the estimated pose to the `/pose_combined` topic.\n\n## Installation\n\n1. **Install Dependencies**\n\n   Install the required Python packages:\n   ```bash\n   pip3 install numpy scipy\n   ```\n   or\n   ```bash\n   sudo apt install numpy scipy\n   ```\n\n2. **Create A package**\n   ```bash\n   catkin_create_pkg robot_ekf geometry_msgs nav_msgs rospy sensor_msgs std_msgs\n   ```\n3. **Clone the Repository**\n\n   Clone this repository to your ROS workspace:\n   ```bash\n   cd ~/catkin_ws/src/robot_ekf\n   git clone https://github.com/ahmedanwar123/robot_ekf.git\n   ```\n      *note*: you will ned **/src** directory only\n4. **Build the Package**\n\n   Build the package in your catkin workspace:\n   ```bash\n   cd ~/catkin_ws\n   catkin_make\n   ```\n\n5. **Source the Workspace**\n\n   Source the setup file to make the package available:\n   ```bash\n   source devel/setup.bash\n   ```\n\n## Configuration\n\nSet the following parameters for EKF in the code:\n\n- `~odom_covariance`: Covariance matrix for odometry measurements.\n- `~imu_covariance`: Covariance matrix for IMU measurements.\n\n**Example Configuration**:\n```python\n~odom_covariance =[0.1, 0.1, 0.1, 0.1]\n~imu_covariance =[0.1, 0.1]\n```\n\n## Running the Node\n\nTo run the EKF node:\n```bash\nroslaunch robot_ekf main.py\n```\n\nTo run the GUI for tuning covariance values:\n```bash\npython3 gui.py\n```\n\n**Node Description**\n\n- `ekf_node/kalman_dyn.py`: Main script for running the EKF. It subscribes to `/odom` and `/imu_data`, performs EKF updates, and publishes the pose to `/pose_combined`. Note that `dyn` refers to dynamic, as covariances can be tuned while the system is running, which is very helpful.\n\n## Message Types\n\n**Pose2D** (from `geometry_msgs`):\n```plaintext\nfloat64 x       # X position in meters\nfloat64 y       # Y position in meters\nfloat64 theta   # Orientation in radians\n```\n\n**Imu** (from `sensor_msgs`):\n```plaintext\nHeader header\ngeometry_msgs/Quaternion orientation\nfloat64[9] orientation_covariance\ngeometry_msgs/Vector3 angular_velocity\nfloat64[9] angular_velocity_covariance\ngeometry_msgs/Vector3 linear_acceleration\nfloat64[9] linear_acceleration_covariance\n```\n\n**Odometry** (from `nav_msgs`):\n```plaintext\nHeader header\nstring child_frame_id\ngeometry_msgs/PoseWithCovariance pose\ngeometry_msgs/TwistWithCovariance twist\n```\n\n### Notes\n\n- **Pose2D:** Used for publishing the combined pose estimated by the Kalman filter.\n- **Imu:** Subscribed to get IMU data (orientation and angular velocity).\n- **Odometry:** Subscribed to get odometry data (position, orientation, and velocity).\n\n### License\n[MIT](https://opensource.org/license/mit)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedanwar123%2Frobot_ekf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fahmedanwar123%2Frobot_ekf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fahmedanwar123%2Frobot_ekf/lists"}