Humanoid Robot
Humanoid Robot
The humanoid robot
We programmed an EZ-Robot JD humanoid robot to autonomously navigate a damaged building for a simulated rescue mission. By utilizing its camera and AI identification, the robot learns to locate and identify victims trapped inside a building and leads them to an exit. This project highlights how artificial intelligence is practically used in real-world emergency response scenarios.
Our Code: EZ-Script
# ---- JD: walk, stop, scan, announce Victim 3 ----
$driftMs = 250 # straightness fix: left-turn correction after walking.
# Left leg stronger = JD drifts RIGHT, so we correct LEFT.
# If he turns too far left, lower it. Drifts right still? Raise it.
$numSteps = 3
$headCenter = 90
$headLeft = 140
$headRight = 40
:main
# ---- walk a few steps ----
$i = 0
:walkloop
IF ($i >= $numSteps)
Goto(scan)
ENDIF
Forward()
Sleep(600)
Stop()
Sleep(300)
IF ($driftMs > 0)
Left()
Sleep($driftMs)
Stop()
Sleep(150)
ENDIF
$i = $i + 1
Goto(walkloop)
# ---- stop and scan with the head ----
:scan
Stop()
Sleep(800)
ServoSpeed(D0, 3)
Servo(D0, $headCenter)
Sleep(1500)
IF ($CameraIsTracking = 1)
Goto(check)
ENDIF
Servo(D0, $headLeft)
Sleep(2000)
IF ($CameraIsTracking = 1)
Goto(check)
ENDIF
Servo(D0, $headRight)
Sleep(2500)
IF ($CameraIsTracking = 1)
Goto(check)
ENDIF
Servo(D0, $headCenter)
Sleep(1500)
Goto(main)
# ---- victim check ----
:check
IF ($CameraObjectName = "Victim 3")
Stop()
SayEZB("Victim found")
Sleep(3000)
ENDIF
Servo(D0, $headCenter)
Sleep(1500)
Goto(main)