Engineers Clinic
BeginnerEngineering trackFP-MR-03

Tuning a line-following hospital delivery trolley with PID

Build a line-following robot in Webots, tune its PID steering from data until it holds the line within 2 cm at 0.4 m/s, and make it stop at ward stations and for obstacles.

Core EngineeringRobotics
6 Guided Steps35h Internship TierSubmit: Webots world and robot + Python controller with logging + tuning plots for P, PD and PID + station and obstacle logic + tuning report for the biomedical team + 2-minute demo videoVerified CertificateAI Rubric Graded
Program Overview

Industry project · for Annapurna Hospital, a 300-bed hospital in Indore that wants a line-following trolley to carry medicine trays from the pharmacy to three wards

Annapurna's pharmacy sends medicine trays to three wards on the ground floor about 40 times a day. A ward attendant walks each one, a 140 m round trip that takes 6–8 minutes, and attendants are often pulled away from patients to do it. The hospital's biomedical engineering team wants to try a small trolley that follows a black tape line on the corridor floor and stops at each ward.

They built a first version from a hobby kit. It wobbles on straights, cuts the corner at the two 0.6 m-radius bends, and once ran off the line into a wheelchair. Nobody tuned it properly. They copied gains from a video.

The requirements are: - cruise at 0.4 m/s on straights; - stay within 2 cm of the line centre on straights and 4 cm on bends; - stop within 3 cm of a station marker (a short cross-line) and wait for a button press; - stop within 0.5 m of an obstacle in front and wait until it clears.

You will build a model of the trolley and corridor in Webots, a free robot simulator, with a five-sensor infrared array. You will write the controller in Python and tune it step by step: first P, then PD, then PID, logging error data and plotting it at each step.

You do not need a robot kit. If you have one, such as an Arduino car with an IR array, you may test the same controller on it as a bonus.

Done looks like a controller that meets every requirement on the full corridor track in simulation, a set of plots that show how each gain changed the behaviour, and a short report the biomedical team can use to tune the real trolley.

Sensor reading and calibrationLine position estimationPID controlData logging and plottingState machines for stopsSimulation testingTechnical reporting
What you submit

Webots world and robot + Python controller with logging + tuning plots for P, PD and PID + station and obstacle logic + tuning report for the biomedical team + 2-minute demo video

Stack: Webots, Python, Matplotlib, pandas (optional), Arduino kit (optional)

How it is graded
  • Meets the requirements30

    On the full track at 0.4 m/s the trolley stays within 2 cm on straights and 4 cm on bends, and stops within 3 cm at stations and 0.5 m from obstacles.

  • Tuning from data30

    P, PD and PID runs are logged and plotted, and each gain change is explained by what the plot shows.

  • Clean controller20

    Sensor reading, line estimate, PID and stop logic are separate functions with gains and speeds as named settings.

  • Usable report20

    A short report explains the tuning steps so the biomedical team can repeat them on the real trolley.

Pass 60% · Merit 75% · Distinction 90%

Learning Outcomes
Calibrate and read an IR sensor array
estimate line position
tune P, PD and PID controllers from logged data
add stop logic with a state machine
write a tuning guide others can follow
Target Audience

Engineering Students

Diploma, B.Tech, B.E., BCA, MCA, or M.Tech students seeking practical experience.

Aspiring Developers

Developers who want to build proof-of-work capstone projects for tech resumes.

Job Seekers

Graduates looking for AI-evaluated code review & verified industry credentials.