Extended Kalman Filter (EKF) SLAM for Duckiebots
Project Resources
- Objective: Implement an Extended Kalman Filter (EKF) SLAM system to estimate accurate Duckiebot pose and landmark positions in Duckietown environments.
- Approach: Fuse odometry and AprilTag landmark detections using EKF to achieve robust localization and mapping for small-scale autonomous Duckiebots.
- Authors: Amir Hossein Zamani, Léonard Oest O'Leary, Kevin Lessard from the University of Montreal.
Project highlights
In SLAM, everything that can drift will drift, and the role of the filter is to drift more slowly than entropy.

















Extended Kalman Filter (EKF) SLAM for Duckiebots - the objectives
This SLAM-Duckietown project addresses a famous challenge in robotics: concurrently estimating the agent’s pose and mapping the environment under uncertainty.
This project implements an Extended Kalman Filter (EKF) SLAM algorithm on Duckiebots (DB21-J4), combining odometry from wheel encoders and landmark observations from April tags.
The objective is to maintain an evolving posterior over the Duckiebot’s pose (x,y,θ) and landmark positions by recursively integrating noisy control inputs and observations.
This upgrade shifts Duckiebots from open-loop dead reckoning units into closed-loop, state-estimating agents. For Duckietown, it reinforces its use as an experimental ground for real-world robotics challenges, including data association, observability, filter consistency, and multi-sensor fusion.
The challenges and approach
The system applies the EKF-SLAM pipeline in two stages: motion prediction and measurement correction.
Prediction propagates the robot’s belief through a non-holonomic kinematic model under process noise, using arc-based interpolation to reduce discretization error.
Correction incorporates April tag detections via a Perspective-n-Point (PnP) solution, updating the state with landmark-relative observations under observation noise. The state vector grows dynamically as new landmarks are observed, and the covariance matrix tracks both robot and landmark uncertainty.
The technical challenges include maintaining filter consistency under linearization errors, ensuring landmark observability despite partial fields of view, and synchronizing asynchronous data from wheel encoders, camera frames, and Vicon ground-truth captures.
Moreover, AprilTag detection is constrained by lighting artifacts and pose ambiguity at shallow viewing angles, introducing non-Gaussian errors that the EKF must approximate linearly.
Moreover, tuning noise parameters presents the classical tradeoff: too little noise leads to overconfidence and divergence; too much noise leads to filter paralysis. Deployment exposes the systemic difference between simulation and physical experiments: real Duckiebots do not move with perfect kinematics, cameras suffer from radial distortion, and computation suffers from non-deterministic latency.
In SLAM, everything that can drift will drift, and the role of the filter is to drift more slowly than entropy.
Did this work spark your curiosity?
Check out the follow works on path planning with Duckietown:
Extended Kalman Filter (EKF) SLAM for Duckiebots: Authors
AmirHossein Zamani was a former Duckietown student, and currently, he is pursuing his Ph.D. in Computer Science at Mila (Quebec AI Institute) and Concordia University, Canada. He is also working as an AI Research Scientist Intern at Autodesk in Montreal, Canada.
Léonard Oest O’Leary was a former Duckietown student, and currently, he is pursuing his Master of Science in Computer Science at the University of Montreal, Canada.
Kevin Lessard was a former Duckietown student, and currently, he is pursuing his Master of Science in Machine Learning at Mila – Quebec AI Institute in Montreal, Canada.
Learn more
Duckietown is a modular, customizable, and state-of-the-art platform for creating and disseminating robotics and AI learning experiences.
Duckietown is designed to teach, learn, and do research: from exploring the fundamentals of computer science and automation to pushing the boundaries of knowledge.
These spotlight projects are shared to exemplify Duckietown’s value for hands-on learning in robotics and AI, enabling students to apply theoretical concepts to practical challenges in autonomous robotics, boosting competence and job prospects.