Case Study
Automatic Parking — 4WS Vehicle
Final-year thesis (Cum Laude): implemented an autonomous parking system for a four-wheel steering vehicle in ROS2/Gazebo with forward and inverse kinematic modelling, LiDAR-SLAM, NAV2 with RPP controller, A* path planning, and AMCL.
Interactive Demo
Try the live simulation
The real EKF and Pure Pursuit controllers ported to TypeScript. Dial sensor noise, flip filter modes, and watch tracking change in real time.
Open Demo →Problem
Conventional autonomous parking research focuses almost entirely on Ackermann-steered passenger cars. Four-wheel steering (4WS) platforms have a fundamentally different kinematic envelope — they can crab sideways, pivot on the spot and cover parking manoeuvres that a two-wheel-steered car physically cannot — but there was very little open-source work showing how to drive one through the full autonomy stack.
For my final-year Mechatronics thesis at Stellenbosch University I set out to close that gap: model a 4WS vehicle, simulate it inside the ROS2 / Gazebo stack, and make it autonomously park into a target spot using standard robotics building blocks (SLAM, a costmap, a path planner and a path-following controller).
Approach
I built the project bottom-up in ROS2 so that every layer could be swapped or tuned in isolation. Starting from the vehicle itself — forward and inverse kinematics for a 4WS platform — then a URDF and Gazebo model, then the perception and planning stack on top.
The autonomy stack is standard ROS2: LiDAR-based SLAM to build and localise against a map of the parking environment, AMCL for on-line localisation, A* as the global planner, NAV2's Regulated Pure Pursuit (RPP) controller for path following, and a mission layer that sequences approach, manoeuvre and final alignment. 4WS-specific behaviours — crab steering, in-place rotation — are exposed as primitives that the mission layer can call when the standard path doesn't fit the envelope.
Technical Details
Modelled the 4WS vehicle with both forward kinematics (wheel angles + speeds → body velocity) and inverse kinematics (desired body twist → per-wheel commands), with the two front and two rear steering angles treated as independent inputs. The model supports the three canonical 4WS modes: conventional, crab and counter-steer.
The ROS2 graph runs sensor ingest (2D LiDAR, odometry), a slam_toolbox node producing a 2D occupancy grid, AMCL against that map, the NAV2 stack (costmap_2d, A* planner, RPP controller) and a custom mission node that picks between standard NAV2 goals and 4WS primitives based on the target pose relative to the vehicle. Gazebo provides the physics, sensors and world; RViz visualises the live plan, costmap, and trajectory.
Code and launch files are open-sourced on GitHub with a minimal reproduction path — clone, build the workspace, and a single launch file brings the simulator, map, localisation and planner up together.
Outcome
The thesis was awarded Cum Laude. The final system parks a simulated 4WS vehicle into pre-defined parking spots using a mix of NAV2-driven trajectories and 4WS-native manoeuvres, with live visualisation of the plan, costmap and vehicle pose in RViz.
Just as importantly, it became the project where I got fluent in the ROS2 / NAV2 stack — which directly set up the production robotics work I took on straight afterwards at BATTALION Technologies. A live TypeScript re-implementation of the 4WS kinematics and four scenarios — one per primitive — is available as an interactive demo, with the repo itself now polished to senior-engineer shape (CI, unit tests, docs, Docker).
Tech Stack