The function returns whether the specified signal is detected in the analysis or not:
- Go
- Stop
- GoStraight
- TurnLeft
- TurnRight
- UTurn
- PedestrianCrossing
- CrossRoad
Function Definition: issignaldetected(signal_name = "Go")
Name | Type | Description | Expected Values | Default Value |
---|---|---|---|---|
signal_name | string | The signal name which you want to check for. | "Go", "Stop", "GoStraight", "TurnLeft", "TurnRight", "UTurn", "PedestrianCrossing", or "CrossRoad" | "Go" |
The function returns whether the specified signal is detected in the analysis or not:
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