This function is used to analyze the image received as input from the camera, for objects.
Alert: This block processes the image input and updates the values in the other functions hence it needs to be put inside loops while making projects.
Function Definition: analysecamera()
This function is used to analyze the image received as input from the camera, for objects.
Alert: This block processes the image input and updates the values in the other functions hence it needs to be put inside loops while making projects.
sprite = Sprite('Tobi')
quarky = Quarky()
cards = RecognitionCards()
cards.video("on", 0)
cards.enablebox()
cards.setthreshold(0.5)
quarky.setirthreshold("IRL", 3000)
quarky.setirthreshold("IRR", 3000)
quarky.initializelinefollower(35, 40, 10)
quarky.drawpattern("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
while True:
if not (quarky.getirstate(35) and quarky.getirstate(34)):
quarky.dolinefollowing()
else:
quarky.stoprobot()
cards.analysecamera()
if cards.isnumberdetected(1):
quarky.drawpattern("ccccccccccccccccccccccccccccccccccc")
break
quarky.runrobot("FORWARD", 40)
A sign detector Mecanum robot is a robot that can recognize and interpret certain signs or signals, such as hand gestures or verbal commands, given by a human. The robot uses sensors, cameras, and machine learning algorithms to detect and understand the sign, and then performs a corresponding action based on the signal detected.
These robots are often used in manufacturing, healthcare, and customer service industries to assist with tasks that require human-like interaction and decision making.
sprite = Sprite('Tobi')
quarky = Quarky()
import time
meca=Mecanum(1,2,7,8)
recocards = RecognitionCards()
recocards.video("on flipped")
recocards.enablebox()
recocards.setthreshold(0.6)
while True:
recocards.analysecamera()
sign = recocards.classname()
sprite.say(sign + ' detected')
if recocards.count() > 1:
if 'Go' in sign:
meca.runtimedrobot("forward",100,2)
if 'Turn Left' in sign:
meca.runtimedrobot("lateral left",100,2)
if 'Turn Right' in sign:
meca.runtimedrobot("lateral right",100,2)
if 'U Turn' in sign:
meca.runtimedrobot("backward",100,2)
Forward Motion:
Right-Left Motions:
Copyright 2024 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy