| What | Link |
|---|---|
| Repository | https://github.com/rohaan2802/Robotic_Car |
| GitHub Pages | https://rohaan2802.github.io/Robotic_Car/ |
| Project report | https://github.com/rohaan2802/Robotic_Car/blob/main/docs/project_report.pdf |
Overview · What's Inside · Project Breakdown · Folder Structure · Setup · Mapping Workbench · Results · Limitations · Figure Index · About the Author
Robotic Car is a NodeMCU-powered teleoperation and occupancy-mapping prototype. A phone or laptop connects to the car’s ESP8266 access point. The firmware controls the L298N motor driver and exposes ultrasonic range and MPU6050 orientation over HTTP. The Python tools inspect the saved map, demonstrate the mapping algorithm offline, and query or send short drive pulses to the board.
The Fall 2024 FAST-NUCES CS-3015 group project was titled Nano Navigators: Mapping with Precision. The archive retains the source associated with the original GitHub submission and the report preserves the group’s implementation and design material.
| Material | Contents |
|---|---|
| Firmware sketch | Drive control and onboard web interface |
| Desktop workbench | Offline grid viewer, manual range input, and NumPy export |
| Python tools | HTTP client, occupancy grid and offline review |
| Saved occupancy grid | Original 500 × 500 probability array |
| Chassis measurements | Original dimensions worksheet |
| Project report | Group report and alternate TCP implementation |
| Assignment brief | Original course requirements |
| Hardware video | Original recording |
| Prototype archive | Original HTTP sketch and Python mapper |
| Subsystem | Input | Output |
|---|---|---|
| Drive control | F, B, L, R, RL, RR, S | ESP8266 translates commands into L298N pin states and caps requested motion at 1 second. |
| Range | Forward ultrasonic echo | Measured centimeters or −1 when no echo arrives. |
| Orientation | MPU6050 DMP packet | Yaw, pitch and roll in degrees. Missing or stale samples return HTTP 503. |
| Mapping | Pose (x, y, heading) and a range ≤100 cm | Mark preceding cells free and the measured cell occupied with bounded Bayesian evidence. |
| Review | Saved .npy grid or eight synthetic observations | Inspectable map plot with classified cell counts. |
Each valid observation starts at the externally supplied pose. The mapper samples the ray at half-cell intervals, updates each traversed cell once, excludes the hit cell from the free evidence, and then applies occupied evidence to that endpoint. Missing, non-finite, non-positive or over-range measurements leave the grid unchanged. The 0.35 and 0.65 classification thresholds make free, unknown and occupied cells visible. The historical map retains its original values.
The maintained sketch starts with the outputs stopped, validates all drive requests, and polls the motion expiry before and after handling HTTP. The onboard controller sends one short pulse per tap and exposes an explicit Stop. The Python client checks the firmware protocol identifier before issuing motion.
Robotic_Car/
├── launch_workbench.cmd Windows desktop launcher
├── firmware/NodeMCU_Car/ ESP8266 sketch and onboard controls
├── robotic_car/ Python client, mapper and command line
├── tests/ Mapping and client regression checks
├── data/ Saved occupancy grid and measurements
├── docs/ Course report, brief and hardware setup
├── media/ Original hardware demonstration
├── archive/ap_prototype/ Original HTTP sketch and mapper
├── assets/ Site styling, scripts and 24 figures
└── index.html GitHub Pages entry point
Use Python 3.10 or newer. From the repository root in PowerShell:
python -m venv .venv
.venv\Scripts\python.exe -m pip install -r requirements.txt
.venv\Scripts\python.exe -m unittest discover -s tests -v
.venv\Scripts\python.exe -m robotic_car review
.venv\Scripts\python.exe -m robotic_car demoAppend --image path.png to either map command for a headless plot. The demo mode can also export a NumPy array with --save-map path.npy. Open index.html to preview the Pages site.
For the car, follow the hardware setup and HTTP API. After flashing and joining the SoftAP, open the car controller at http://192.168.4.1/ or run:
.venv\Scripts\python.exe -m robotic_car telemetry
.venv\Scripts\python.exe -m robotic_car pulse F --ms 250
.venv\Scripts\python.exe -m robotic_car pulse STo add one live range reading at a known pose without commanding motion, run:
.venv\Scripts\python.exe -m robotic_car scan --pose 0 0 90 --save-map scan.npyPass --map scan.npy to extend a previous scan. The pose is supplied as x and y in centimeters and heading in degrees counterclockwise from +x. View the resulting array with python -m robotic_car review --map scan.npy.
Run python -m robotic_car.workbench from an environment with the dependencies installed, or open launch_workbench.cmd on Windows. The workbench starts with the synthetic map, so the first demonstration works without hardware or Wi-Fi.
- Open Original saved map to inspect the original 500 × 500 probability grid. Use Open .npy for another square probability array.
- Select Blank grid or Synthetic demo. Enter x and y in centimeters, a heading in degrees counterclockwise from +x, and a range from just above zero to 100 cm.
- Apply the observation. The dashed overlay shows the latest observation. Cell counts update using the same probability thresholds as the command-line tool.
- Export the grid and reopen it in the workbench or command-line reviewer.
For a short demonstration, start from a blank grid and apply a 22 cm range at (0, 0) with a 45° heading. Then repeat from the same pose to reinforce the evidence, or change the heading to inspect how a second ray projects into the map.
The GUI uses the same mapping model as the CLI. The desktop workbench never connects to the robot. Use the HTTP client and the documented CLI commands for physical telemetry or drive pulses.
The original 500 × 500 snapshot contains 1,195 free, 248,801 unknown, and 4 occupied cells at the documented thresholds. The sparse rays are evidence from the saved grid. The synthetic demo runs eight labeled range observations from two poses to exercise the same mapping code without hardware.
The hardware video, report excerpts and saved map are original project artifacts. The offline commands and regression suite recompute results locally. The tests cover range validation, cell classification, ray endpoints, edge clipping, deterministic demonstrations and the Python HTTP interface. See the verification notes for the checks performed on this version.
The MPU6050 yaw can drift. A single forward ultrasonic sensor samples a narrow region, and the map assumes that pose is supplied and calibrated. The grid does not recover position, fuse scans from multiple cars, or perform autonomous planning. The course report describes a multi-robot design, while the maintained code controls one car over HTTP. The requested motion timeout is enforced in the firmware loop and can be affected by loop latency. Treat the saved occupancy grid as sparse scan evidence.
Open any preview to inspect its full 1440 × 900 capture.
Crop around classified cells in the original occupancy map.
Eight deterministic range observations from two poses. This is a software demonstration.
A 22 cm observation at 45° is applied to the synthetic grid. The dashed line shows the newly added ray.
The ESP8266 checks elapsed time and stops the motor outputs after a requested pulse.
The desktop workbench validates the pose and range before modifying the grid.
Original report page 8 documents the physical chassis and assembly.
Frame at 22.1 seconds from the original hardware demonstration video.
Frame at 38.4 seconds from the original hardware demonstration video.
Original report page 9 records the assembled hardware.
Original report page 24 shows captured software output.
Original report page 25 preserves visual output from the semester project.
Original report page 26 collects demonstration visuals.
Original report page 28 illustrates the planned workflow.
The original 500 × 500 probability grid, shown at full extent.
Counts are computed from the saved grid at the documented 0.35 and 0.65 thresholds.
Counts from the current mapper running the deterministic synthetic demo.
A 7 cm hit leaves cells beyond the endpoint unchanged.
Excerpt from the archived CarMeasures workbook.
Pin pairs follow the maintained NodeMCU sketch.
Source excerpt showing per-ray deduplication and bounded Bayesian evidence.
The HTTP client validates command names and pulse durations before dispatch.
Malformed and non-positive range values are represented as missing.
Request paths from the maintained ESP8266 interface.
Behaviors exercised by the local Python regression suite.
Mohammad Rohaan collaborated with Famia Malik and Awais Khan on the Fall 2024 FAST-NUCES CS-3015 project, supervised by Umarah Qaseem. GitHub profile
