GETTING STARTED
ROBOTICS
TAKING LEARNING TO THE REAL WORLD
CAPSTONE PROJECT

ACTIVITY: Making an AI Assistance Bot

Making an AI Assistance Bot – Overview

It’s time to write the code for our AI Assistance bot. The AI assistant bot should recognize your voice commands, will set the destination based on the command identified, follow the path, stop at the checkpoint, check whether it has reached the correct destination or not without any crashes, and say out the destination name loud.

Let’s set up your arena like this and place your recognition/number cards at the following places.

The robot will start from just ahead of checkpoint 3, and then it will do line following until it reaches the following checkpoints.

Completing the script

Now let’s complete the script to transform Quarky into an AI assistance bot!

  1. Add a forever block below the speak () block in the script we just made.
  2. Add a do line following block from the Robot palette inside the forever block.
  3. Add a stop robot block.
  4. Add an analyze image from () block below the stop robot block. camera is selected as the default option from the drop-down.
  5. Add an if block from the Control palette below the analyze image from () block. Inside the diamond-shaped space, add an () and () block from the Operators palette.
  6. Inside the first space of the () and () block, add an () = () block. In the second space, add an is number () detected ? block from the Autonomous Driving palette. Select 1 from the drop-down. 
  7. Inside the first space of the () = () block, add the Destination variable block and in the second space, write “PHARMACY”.
  8. Add a speak () block inside the if block and write “Reached pharmacy”.
  9. Add a stop () block below the speak () block.
  10. Repeat steps to 9 for CLINIC. Just write “CLINIC” in place of “PHARMACY” in step 7 and “Reached clinic” instead of “Reached pharmacy” in step 9.
  11. Click the green flag to run the scrip and have fun!

Assignment

Before you move on to the next lesson, a small assignment awaits you!

Make a video of the project you made in this activity and upload it to the website.

Submitting the assignment is a must in order to receive the certificate after completing the course.

Follow the steps below to upload your assignment:

  1. First, you need to choose the video file, thus click on Browse.
  2. Select your video file.
  3. And click the Upload button.

Good luck!

×
×

Cart