Reader small image

You're reading from  Python Robotics Projects

Product typeBook
Published inMay 2018
Reading LevelIntermediate
PublisherPackt
ISBN-139781788832922
Edition1st Edition
Languages
Concepts
Right arrow
Author (1)
Prof. Diwakar Vaish
Prof. Diwakar Vaish
author image
Prof. Diwakar Vaish

Prof. Diwakar Vaish is a robotics scientist and the inventor of Manav (India's first indigenous humanoid robot), the world's first mind-controlled wheelchair, brain cloning, and the world's cheapest ventilator. He has also been a guest lecturer at over 13 IITs and various other institutions. He is the founder of A-SET Robotics, a leading robotics research company based in New Delhi.
Read more about Prof. Diwakar Vaish

Right arrow

Making the guard robot


Now that we have understood how the learning works and how the learned data can be used to identify people, it's time to put it to use. As the name of the chapter suggests, we will be making a guard robot using this technology. Now, let's have a look at the following program. Before you start programming, take out the robotic vehicle you had and make the connection like we did before in Chapter 6Bluetooth-Controlled Robotic Car. Attach the motor, motor driver, and Raspberry Pi. Once you have done that, then write the following code. This code is utilizing all the learning of the previous programs in the chapter and we would be able to distinguish between an intruder and a resident of the house based on vision processing. So let's get going:

import numpy as np
import cv2
Import RPi.GPIO as GPIO

Motor1F = 20
Motor1R = 21
Motor2F = 2
Motor2R = 3
Buzzer = 24

GPIO.setmode(GPIO.BCM)  
GPIO.setwarnings(False)
GPIO.setup(Motor1a,GPIO.OUT)
GPIO.setup(Motor1b,GPIO.OUT)
GPIO...
lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Python Robotics Projects
Published in: May 2018Publisher: PacktISBN-13: 9781788832922

Author (1)

author image
Prof. Diwakar Vaish

Prof. Diwakar Vaish is a robotics scientist and the inventor of Manav (India's first indigenous humanoid robot), the world's first mind-controlled wheelchair, brain cloning, and the world's cheapest ventilator. He has also been a guest lecturer at over 13 IITs and various other institutions. He is the founder of A-SET Robotics, a leading robotics research company based in New Delhi.
Read more about Prof. Diwakar Vaish