GETTING STARTED
ROBOTICS
TAKING LEARNING TO THE REAL WORLD
CAPSTONE PROJECT

ACTIVITY: Detecting Signs & Landmarks

Detecting Signs & Landmarks – Overview

Before we jump in to make our self-driving car using Quarky, we must first understand how it will detect the signs and landmarks. Let’s have a look.

Understanding the Logic

We’ll be using our Smartphone’s camera to detect the numbers. The logic here is pretty simple. We’ll bring a random sign in front of the camera. PictoBlox will detect it and tell us which sign it is.

Now, let’s make the script.

Let’s Code!

We’re going to use the PictoBlox app to make this script.

  1. Open a new project in PictoBlox App.
  2. Add a when flag clicked block from the Events palette into the scripting area.
  3. Next, tap the purple-coloured Add Extension button in the bottom-left corner of the screen. Then, select the Autonomous Driving extension to add it to your palette.
  4. Then, add a turn () video on stage with () % transparency block from the Autonomous Driving extension and select on flipped from the drop-down. This will turn on the rear camera of your Smartphone.
  5. Add a () bounding box block.
  6. Next, add a set detection threshold to () block. We’re going to set it as 0.6.
  7. Now, from the Control palette, add a forever block.
  8. Inside the forever block, add an analyse image from () block. This block will detect and analyse the objects the camera sees.
  9. Add a say () block from the Looks palette.
  10. Place a join () () block from the Operators palette, in the space given.
  11. Place () of object () block in the first space and write Detected in the second space.
  12. Now, run the script by clicking the green flag and bring one by one signs and landmarks cards in front of the camera to check whether the script is running perfectly fine.

self driving car

In the next activity, we’re going to modify this script to add blocks to transform Quarky into a self-driving car.

×
×

Cart