Autonomous Robot Navigation
A* path planning for a TurtleBot, with a post-processing pass that turns its grid zigzags into straight lines. Then PID control and Kalman-filter tuning for a simulated quadcopter. ROS2 and C++.
- Context
- Robotics course, National University of Singapore, exchange semester, spring 2026
- Team size
- 3, this page covers only my parts
- My part
- Line-of-sight post-processing on the TurtleBot, plus pure pursuit (the latter following the course manual); PID control and Kalman-filter noise tuning on the quadcopter
- Status
- Completed
Planning on the TurtleBot
A* finds the shortest path, but only on the 8-connected grid it searches. In the real room, that path isn't the shortest.
On that grid, every step is a multiple of 45°, so the paths come out as zigzags: optimal on the grid, but not the straight lines the robot could drive. So I added a post-processing pass: walk the path, and wherever two nodes have line of sight, delete everything between them and refill the straight segment by line rasterization.
Over the whole plan, the path got about 3% shorter (9.54 m to 9.23 m), with long straight segments instead of a correction at every grid corner.
The rasterization is a supercover variant of Bresenham. It flags every cell the straight line touches rather than a one-cell-wide trace, so a shortcut cannot slip diagonally between two obstacle cells. A teammate wrote that part.
Control and localization on the quadcopter
Part two: a simulated quadcopter that follows a TurtleBot. I wrote its controller and tuned the noise model of the team's Kalman filter.
The controller is pure pursuit with PID terms, tuned with Ziegler–Nichols and then by hand.
I measured each sensor's noise on the ground, but the measured IMU variance made the filter drift between the 2 Hz GPS fixes. Raising the IMU variance lets the GPS dominate more, while the IMU fills the 0.5 s gaps between fixes. Holding each GPS reading would lag up to 0.5 m behind a moving drone; the filter stays around 0.2 m off, at 30 Hz.
With this tuning, the drone flew the whole mission on its estimate. The benchmark against ground truth was only run at the very end, for the report. Looking at it afterwards, the variance assigned to the GPS was too high, and pure GPS signal (at correction time) was closer to ground truth than our filtered estimate: A better approach would have been to give the GPS 100% authority upon correction, and to use IMU data only to fill the gaps between corrections.