Develop an extendable smart robot capable of performing a complex series of actions with Python and Raspberry Pi
Key FeaturesGet up to speed with the fundamentals of robotic programming and build intelligent robotsLearn how to program a voice agent to control and interact with your robot's behaviorEnable your robot to see its environment and avoid barriers using sensorsBook DescriptionWe live in an age where the most complex or repetitive tasks are automated. Smart robots have the potential to revolutionize how we perform all kinds of tasks with high accuracy and efficiency. With this second edition of Learn Robotics Programming, you'll see how a combination of the Raspberry Pi and Python can be a great starting point for robot programming.
The book starts by introducing you to the basic structure of a robot and shows you how to design, build, and program it. As you make your way through the book, you'll add different outputs and sensors, learn robot building skills, and write code to add autonomous behavior using sensors and a camera. You'll also be able to upgrade your robot with Wi-Fi connectivity to control it using a smartphone. Finally, you'll understand how you can apply the skills that you've learned to visualize, lay out, build, and code your future robot building projects.
By the end of this book, you'll have built an interesting robot that can perform basic artificial intelligence operations and be well versed in programming robots and creating complex robotics projects using what you've learned.
What you will learnLeverage the features of the Raspberry Pi OSDiscover how to configure a Raspberry Pi to build an AI-enabled robotInterface motors and sensors with a Raspberry PiCode your robot to develop engaging and intelligent robot behaviorExplore AI behavior such as speech recognition and visual processingFind out how you can control AI robots with a mobile phone over Wi-FiUnderstand how to choose the right parts and assemble your robotWho this book is forThis second edition of Learn Robotics Programming is for programmers, developers, and robotics enthusiasts who want to develop a fully functional robot and leverage AI to build interactive robots. Basic knowledge of the Python programming language will help you understand the concepts covered in this robot programming book more effectively.
Table of ContentsIntroduction to RoboticsExploring Robot Building Blocks - Code and ElectronicsIntroducing the Raspberry Pi - Starting with RaspbianPreparing a Raspberry Pi for a Robot - Headless by DefaultProtecting Robot Code with Git and SD Card CopiesBuilding Robot Basics - Wheels, Power, and WiringMoving Motors with PythonProgramming Distance Sensors with PythonProgramming RGB Strips in PythonUsing Python to Control Servo MotorsProgramming Encoders with PythonIMU Programming with Python Robot Vision - Using a Pi Camera and OpenCVLine Following With A Camera with PythonVoice Communication with a Robot Using MycroftDiving Deeper with the IMUControlling the Robot With A Phone and PythonTaking Your Robot Programming Skills Further&
There is a lot involved in building your own robot: sourcing adequate parts, knowing how to assemble them and then how to get the robot to do things by writing software. Buying a robot kit glosses over these steps as the parts are provided together with assembly instructions and often a software library to make programming simple. Going from building such a kit to your own robot can be quite a shock for this reason.
This is why this book is valuable. It covers a lot of ground! The author, Danny Staple, guides us through the process of building a wheeled robot without relying on a kit. Instead, Danny describes the components required and provides some recommendations but allows for variation. Step by step we are shown how to set up a Raspberry Pi and control motors & servos, read inputs from an IMU, and use the Raspberry Pi camera. Everything, hardware and software, is explained from scratch without assuming any prior knowledge and in an easy to read style. Instead of relying on a library of code Danny shows us how to implement everything required a small feature at a time. He also explains the principles behind why he structures the code as he does; so we learn how to extend the software on our own without it becoming a hard-to-maintain mess.
This second edition makes some sensible updates. There is a slightly greater emphasis on computer vision and line following is done using image processing instead of a dedicated sensor. The chapter on distance sensors has been replaced by using an IMU (Inertial Measurement Unit) with a temperature sensor. Instead of controlling the robot via a GamePad the book now describes a simple phone app instead.