We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Build and control a Python-powered robot.

00:00

Formal Metadata

Title
Build and control a Python-powered robot.
Title of Series
Part Number
08
Number of Parts
169
Author
License
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
Antonio Spadaro - Build and control a Python-powered robot. During this talk you will see how to make a robot able to recognize people with a Raspberry Pi as main board and Python as language. The talk will cover the hardware and modules, discuss briefly the alternatives, and finally show a live demo. ----- The robot uses two main modules: - **OpenCV** (_Open Source Computer Vision Library_), an open-source library that includes several hundreds of computer vision algorithms. Usage ranges from interactive art, to mines inspection, stitching maps on the web or through advanced robotics. - **gpiozero**, a simple interface to everyday GPIO components used with Raspberry Pi. The first is used to recognize the people and the object; the second to control the robot.
Student's t-testPower (physics)RoboticsGroup actionMultiplication signMobile WebGame controllerClosed setLecture/Conference
Line (geometry)Pattern languageProgrammer (hardware)Projective planeTheoryPlanningLecture/Conference
Streaming mediaComputer hardwareDevice driverUltrasoundPower (physics)Game controllerServer (computing)Network socketGraphical user interfaceTelecommunicationCommunications protocolGotcha <Informatik>DistanceUltrasoundPower (physics)Computer hardwareHydraulic motorCommunications protocolRoboticsGame controllerRange (statistics)Multiplication signStreaming mediaDistanceMedical imagingSoftwareFrame problemGreatest elementServer (computing)Network socketPort scannerScaling (geometry)Endliche ModelltheorieChemical equationSet (mathematics)FrequencyDemosceneTheoryVotingRule of inferencePhysical systemRankingFlow separationVideo gameBasis <Mathematik>Field (computer science)Wave packetSurfaceAreaComputer animation
Communications protocolTelecommunicationOpen setData managementComputerOpen sourceObject (grammar)Machine visionLibrary (computing)Medical imagingLecture/ConferenceComputer animation
Type theoryPredictabilityEndliche ModelltheorieVirtual machineOpen setLecture/Conference
PredictionData modelPairwise comparisonFrame problemMachine learningWave packetComputer-generated imageryReliefComputer fileDefault (computer science)Maxima and minimaKey (cryptography)Control flowEndliche ModelltheorieFrame problemScaling (geometry)Medical imagingRectangleFerry CorstenAlgorithmSimilarity (geometry)Object (grammar)Position operatorOpen setClique-widthMultiplication signLink (knot theory)Software maintenanceJSONXML
2 (number)Medical imagingThermodynamic equilibriumLecture/Conference
Computer-generated imageryHypermediaLine (geometry)Interface (computing)Execution unitPoint (geometry)Video gameTheory of relativityUsabilityAsynchronous Transfer ModeCodeMaxima and minimaResultant2 (number)Computer animation
Process (computing)Set (mathematics)RoboticsSynchronizationNetwork socketServer (computing)Communications protocolLecture/Conference
Server (computing)Group actionMoment (mathematics)Scale (map)Frame problemFirst-person shooterImage resolutionComputer-generated imageryServer (computing)SynchronizationConnected spaceMultiplicationClient (computing)Network socketMoment (mathematics)MomentumVideoconferencingMedical imagingEndliche ModelltheorieImage resolutionFlow separationFrame problemObservational studyDataflowInequality (mathematics)Graph coloringVector spaceGame controllerMessage passingGroup actionComputer hardwareSerial portLecture/ConferenceComputer animation
Scale (map)Image resolutionFrame problemFirst-person shooterComputer-generated imageryNormal (geometry)TheoryCoefficient of variationFrequencyEndliche ModelltheorieDataflowSoftware developerDemo (music)JoystickRoboticsPower (physics)UltrasoundLecture/ConferenceComputer animation
FamilyWordData recoveryEndliche ModelltheorieSequenceContent (media)Multiplication signFunction (mathematics)RoboticsHydraulic motorJoystickStreaming media
Scale (map)Image resolutionFrame problemFirst-person shooterComputer-generated imageryComputer animation
Moment (mathematics)Utility software
Lecture/Conference
Moment (mathematics)
Moment (mathematics)Lecture/Conference
Transcript: English(auto-generated)
Introduce you Antonio Spadaro and he's going to talk about how to micro and how to Python power a robot So, please big hand for Antonio
Begin with something about me He goes cool students the next year I'm an interest here. I introduced to fight line Linux user and a pattern programmer
I Live yeah, I live in Italy and Italy and from Okay
Small project because it's too easy to to make This robot what do you do? This robot to stream the camera you take a camera
By camera exactly It don't have to hit against to the wall thanks to ultrasonic sensor It Recognize and watch humans so one with the camera
Where it is an human it model the camera and see The human so what is the hardware? The hardware is a raspberry p3
a Pappy camera abuse For motor DC to motor driver for control the motor DC To servo motors An ultrasound sensor and a power bank for power
This is
This is a little Scan of food a hardware at the center. We thought we found there are very petri
Bottom away from where we can found a picamera and a servo motor The picamera send the data for a very petri Oh Dr. Mob the servo motor
The ultrasound sensor There's a repeat radio from ultrasound sensor the data and control the motor for do not to hear low against the wall a PC control All motors of a therapy and a servo motors
The software is a socket server on the therapy camera socket server To go For control the robot and for receive the
frame of the camera and The server command the motor the motors server motors and the camera
Undirectly it to control the server motors from the camera and The motors from the ultrasound sensor The communication protocol protocol user they use Wi-Fi
But why Wi-Fi wind or not I use Bluetooth Wi-Fi is more speed is a more range of distance and We can connect to more days
So we can send Quality image No time I can We can
Go Open CV these are awesome library for recognize a human recognize a human
object It is an open Acronym of open source computer vision this library allowed to
Use To manage a day image from PC But oh it work. Oh it Recognize object the humans the animals first they made you
Will be Will be signed from a machine learning on Open CV That trying the model and return a predictive model
hard-cached This predictive model will be compared frame We will compare frame with this predictive model and it return the Position for the object before it found it. This is a little
Little example of how to work First we import Open CV Then we open the camera for the PC we connect of the camera, then we load
the arcade the predictive model We File We capture the frame We make a gray scale of the image
Well search some face on the frame It this face return on numpy array with To the position of the face and the
width and the height and Now we make a rectangle around it around it Then we will show the image with the rectangle and all
And we found before we have pressed exit and it exit This is the result. It recognizes smile, people, patternions and the drawing
Because it use a simple algorithm that to try to recognize a similarity from this This is the first from us on our very picturey for found a
face on an image of 60,000 40 for 4080 We it
Will be Zero 52 seconds zero 52 seconds on 30,000 20 for 20,000
40 image it will be 0 5 10 15 seconds But now we can optimize it
We can insert a simple line of code On this line we Specifically Minimizes of the face and the maxes of the face This is the result of the performance
Instead of zero 0.52 0.52 seconds it will be 0.17
0.17 0.17 instead of 0.15 0.15 it will be 0.04 0.04 0.04 0.08 1.08
1.08 1.08 2.08 3.08 4.08
5.08 6.08 8.08 But it is more small, RSVP is more small, because if we take an Arduino, we insert Wi-Fi module, camera module, shield or some shield, it will be more big of RSVP.
So I use RSVP instead of Arduino.
A synchronous socket server. For command the robot, I use a socket server with a SYNGIO protocol.
This socket server allows a synchronous connection for multiple clients. Synchronous action on the same moment, we can move a servo motor while we control the motor.
And we can control the hardware with this.
For syndrome, the frame from RSVP to client, I use another socket server.
But the performance is a problem, a little problem. The big resolution has a big frame delay. If we want to send 60,000 for 4080 image, we can found the video at 4 FPS.
But the grayscale is more speed. So if we want a fluid video, we should use a lower resolution with grayscale.
Instead, if we want the quality with the colors, we should use a higher resolution, but it will be slow.
So because the color has three channels of color, instead of black and gray, it has only one color channel.
So the RSVP use, when we start the robot, RSVP make an hotspot, a Wi-Fi hotspot.
And the client connect to the Wi-Fi hotspot, and then we can control it. For connecting the three cameras, I use a visualized CSI camera socket interconnection.
Camera serial interconnection, sorry. And later, it is more speed of an USB, a normal USB port.
Okay, with the two servo motors, we will move the camera for the face.
So I could be a speed demo or not.
Yes, this is the robot, the little robot.
So at the moment, the RSVP, this is the power bank that power the RSVP and the motors, and this is the ultrasound sensor.
Okay, now it power on.
So for controlling it, I use a joystick gamepad. Now, if you have a PC, you can see a new Wi-Fi hotspot, a led robot.
Okay, now I'm connected to the robot.
We can move the robot, the servo motors with the joystick.
We can rotate the robot, and if we want, wait a moment, we can control the robot with a simple joystick. We can, it can go back, can go back, forward, can rotate on itself.
We can enable the camera, now I can see the output of the camera.
Okay, this is the streaming.
At the moment, it is at the minimum quality.
We have white and black, it is more speed, but white and black. We can set the more beautiful quality, but it will be not lower.
And with the color, so if somebody want to try it, Robin, thank you.
If somebody, anybody has questions, like a moment.