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')
od = ObjectDetection()
speech = TexttoSpeech()
quarky = Quarky()
od.video("on", 1)
od.enablebox()
od.setthreshold(0.5)
speech.setvoice('alto')
speech.setlanguage('en')
while True:
od.analysecamera()
if od.isdetected('banana'):
quarky.drawpattern("ccccccccccccccccccccccccccccccccccc")
speech.speak("Biodegradable Waste")
if od.isdetected('bottle'):
quarky.drawpattern("fffffffffffffffffffffffffffffffffff")
speech.speak("Non Biodegradable Waste")
A sign detector Mars Rover 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')
# sprite = Sprite('Tobi')
quarky = Quarky()
import time
recocards = RecognitionCards()
rover = MarsRover(4, 1, 7, 2, 6)
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:
rover.home()
rover.setinangle(0)
quarky.runtimedrobot("F",100,3)
if 'Turn Left' in sign:
rover.home()
rover.setinangle(40)
quarky.runtimedrobot("L",100,3)
if 'Turn Right' in sign:
rover.home()
rover.setinangle(40)
quarky.runtimedrobot("R",100,3)
if 'U Turn' in sign:
rover.home()
rover.setinangle(0)
quarky.runtimedrobot("B",100,3)
Forward-Backward Motions:
Right-Left Motions:
Sign detection is being performed using a camera and a RecognitionCards object. The RecognitionCards object is set up with a threshold value and is enabled to draw a box around the detected object. 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
quad=Quadruped(4,1,8,5,3,2,7,6)
recocards = RecognitionCards()
recocards.video("on flipped")
recocards.enablebox()
recocards.setthreshold(0.6)
quad.home()
while True:
recocards.analysecamera()
sign = recocards.classname()
sprite.say(sign + ' detected')
if recocards.count() > 0:
if 'Go' in sign:
quarky.drawpattern("jjjijjjjjiiijjjiiiiijjjjijjjjjjijjj")
quad.move("forward",1000,1)
if 'Turn Left' in sign:
quarky.drawpattern("jjjddjjjjjdddjdddddddjjjdddjjjjddjj")
quad.move("lateral right",1000,1)
if 'Turn Right' in sign:
quarky.drawpattern("jjggjjjjgggjjjgggggggjgggjjjjjggjjj")
quad.move("lateral left",1000,1)
if 'U Turn' in sign:
quarky.drawpattern("jjjbjjjjjjbjjjjbbbbbjjjbbbjjjjjbjjj")
quad.move("backward",1000,1)
else:
quad.home()
Copyright 2024 – Agilo Research Pvt. Ltd. All rights reserved – Terms & Condition | Privacy Policy