SSC-32 Servo Controller V2 icon SSC-32 Servo Controller V2 — Bridge ARC to Lynxmotion SSC-32: maps V0-V31 to SSC-32 channels for reliable, high-performance serial control via USB, EZB/Arduino UART. Try it →
New Zealand
LinkedIn Thingiverse Twitter Google+ YouTube
Asked — Edited
1 Participant

Face Recognition Script

When I ask for input for one reason or another from a human I use this script to check before I have my robot speak It returns a $Face_Found=1 (YES) if it finds a human after about 5-10 seconds.

----------------------------------------------|

Visual Confirmation of Human Presence |

----------------------------------------------|

Print ("+-----------------------------+") Print ("| Checking for human presence |") Print ("+-----------------------------+")

Initialise Variables

$CameralsTracking=0 $count_down=20000 ControlCommand("Camera", CameraFaceTracking)

Start the sequence

Print("Scanning for faces....") ControlCommand("Camera", CameraFaceTrackingEnable) :Find_face $count_down=$count_down-1 $Face_found=$CameraIsTracking

Print("Scan $count_down")

IF ($count_down<=0) Print ("No faces visible!") Goto (Face_Check_Complete) ELSEIF ($Face_found=0) goto (Find_Face) ELSEIF ($Face_found=1) Print("Face located...") ControlCommand("Camera", CameraSnapshot) Print("Image recorded.") Goto (Face_Check_Complete) ENDIF

:Face_Check_Complete Print ("Scan completed!")

ControlCommand("Camera", CameraFaceTrackingDisable) halt()


ARC Pro

Upgrade to ARC Pro

With Synthiam ARC Pro, you're not just programming a robot; you're shaping the future of automation, one innovative idea at a time.

Author Avatar
United Kingdom
LinkedIn Twitter Google+ YouTube
#1  

These are great, loads of ideas on how to do things in scripts. I'm sure I will be borrowing parts for my code.

Author Avatar
New Zealand
LinkedIn Thingiverse Twitter Google+ YouTube
#2  

Glad to be able to give back....