This project presents the design, modeling, simulation, and control of a camera-equipped differential-drive robotic platform for environment mapping and 3D reconstruction.
The robot autonomously navigates a discretized path, stopping at specific points to capture images for mapping.

The kinematic and dynamic models of the robot were derived under ideal motion conditions (no slip, slide, or bounce).
The control system was designed to meet the following objectives:
- Trajectory adherence
The path between consecutive reference points should converge to the straight line connecting them. - Arrival heading angle
Upon reaching a target point, the robotβs heading should align with the inclination angle of the line connecting start and target points, ensuring smooth transitions. - Elapsed time
The traversal time between two target points should be minimal.
These objectives are combined into a single performance error metric, which facilitates optimal control gain selection.
The controller was structured into two loops:
-
High-level control loop
Generates linear and angular reference velocity profiles that guide the robot to the target.- Uses Lyapunov stability criterion for stable velocity profiles (based on position/orientation errors).
- Incorporates an MLP neural network to adaptively choose optimal control gains.
-
Low-level control loop
Ensures the dynamic system tracks the reference velocities quickly.- Uses LQR method with a full-order observer.
The MLP neural network selects optimal high-level control gains that balance the three objectives.
- Training dataset generation: training_data_generation
- Training code: MLP_training
The trained neural network was integrated into MATLAB simulations to evaluate performance on various paths.
The table below shows:
- Row 1: Neural network-based controller (PNN) outperforming Lyapunov and PID controllers.
- Row 2: PNN performance on discretized Line, Circle, and Infinity-shaped trajectories.
The control algorithm was ported to ROS for execution on a Raspberry Pi, with an Arduino acting as an interface for motors and sensors (via serial communication).
- ROS nodes: src
Before real-world deployment, the robot was tested in Gazebo under realistic conditions:
---This video shows the robotic platform achieving the task of tracking a discretized path:
FULL_CONTROL.mp4
- OS/Tooling:
Python β₯ 3.10
,ROS Noetic
,MATLAB 2014a+
# Clone repository
git clone https://github.com/B-A-IntelliBots/AI-optimized-LQR-Lyapunov-Control-System.git
# Build ROS workspace
cd ~/catkin_ws/src
ln -s /path/to/AI-optimized-LQR-Lyapunov-Control-System/DDWMR .
cd ~/catkin_ws
catkin_make
# Make sure that the serial communication betweeb Arduino and Raspbery pi is established via rosserial-noetic-devel package, then run the following command
roslaunch DDWMR start.launch
- The proposed neural network-based controller surpasses the classical control methods such as (PID, fixed_gains Lyapunov) in solving stabilization task.
- The neural network achieves a better trade-off between all control objectives proposed for this project.
- The incorporation of LQR method in the low level control loop helped prioritizing energy efficiency.
-
Programming: MATLAB, Python (with ROS integration)
-
Simulation: MATLAB/Simulink, ROS, Gazebo
-
Hardware: Raspberry Pi, Arduino
β DDWMR (main ROS package)
β βββ src # ROS node files
β βββ srv # Service definitions
β βββ launch # Launch files
β βββ CMakeLists.txt
β βββ package.xml
β MLP_training # Training data & code
β arduino # Arduino node code
β training_data_generation # MATLAB scripts for dataset generation
β README.md
@software{myproject2025,
author = {Ali Deeb and Bisher Alsaleh},
title = {Autonomous 3D Mapping: AI-Optimized LQR-Lyapunov Control System},
year = {2025},
publisher = {GitHub},
note = {Supervised by Prof. Iyad Hatem},
url = {https://github.com/B-A-IntelliBots/AI-optimized-LQR-Lyapunov-Control-System}
}