The official code repository for Learn Robotics Programming, Third Edition, published by Packt.
Danny Staple
In an era dominated by automation, smart robots are enhancing our ability to perform complex and repetitive tasks with unprecedented precision and efficiency. Learn Robotics Programming, Third Edition is your gateway to the future of robotics, offering a comprehensive guide to designing, building, and programming AI-powered robots using the Raspberry Pi.
This edition is brimming with innovative projects and advanced technologies that will empower you to create remarkable machines — from robots to Mars rovers and even automated home helpers. Gain expert insights on selecting the right components and mastering Raspberry Pi setups. Effortlessly command your robots using interactive dashboards and control panel integration, and explore advanced navigation techniques like encoder-based localization. Elevate your robotics with cutting-edge AI for voice interaction, making your creations not only functional but interactive.
Ready to push the boundaries of robotics? This updated guide is packed with hands-on projects, advanced algorithms, and the latest AI features, making it your ultimate resource for next-generation robot creation.
- Manage your robots with control panels and view their state with interactive dashboards
- Integrate complex sensor systems for dynamic robot navigation and interaction
- Learn voice recognition with Vosk and computer vision with OpenCV
- Explore encoder-based localization with the BNO055 module to enhance your robot's movement accuracy
- Streamline installation and updates with automated scripts to keep your robot up-to-date effortlessly
- Explore algorithms that optimize sensor data and computing for better robotic performance
- Introduction to Robotics
- Exploring Robot Building Blocks — Code and Electronics
- Preparing a Headless Raspberry Pi for a Robot
- Protecting Robot Code with Git
- Building Robot Basics — Wheels, Power, and Wiring
- Drive and Turn — Moving Motors with Python
- Driving the Robot With A Phone and Python
- Programming Distance Sensors with Python
- Obstacle Avoiding with Distance Sensors
- Using Python to Control Servo Motors
- Programming Encoders with Python
- Encoder-Based Localisation
- IMU Programming with Python
- Robot Vision — Using a Pi Camera and OpenCV
- Line Following With A Camera with Python
- Voice Communication with a Robot in Python
- Localising the Robot with Python
- Taking Your Robot Programming Skills Further
This book is aimed at someone in software engineering who would like to explore more hardware, or a mechanical/electronics engineer who would like to get to know control software and a little AI. It is also useful for people who want to play and experiment with robotics outside of a work context: workshop hobbyists, parents with children, or in an education setting to get students familiar with building a challenging project — in other words, the broad group known as makers.
Programming: You will only need a little programming experience. You do not need to be an expert-level programmer, but you do have to have written some lines of code and be comfortable with looping, conditionals, and functions. Knowledge of object-oriented programming (classes and objects) isn't necessary, but is introduced in the book. You will come away with hands-on Python knowledge, having applied AI in the real world, worked with MQTT, and explored robotics algorithms.
Electronics: You do not need to be an electronics expert, and soldering is not required to build this robot. You will learn some skills around connecting and debugging electronic parts, including electronic buses, which are useful to embedded engineers.
Mechanical: There isn't much mechanical engineering, as many parts are prefabricated, but you will learn to assemble them, modify them for our purposes with skills like measuring and cutting holes, and make computer-assisted sketches of where things need to fit. The book does not require a specialist workshop, but the tools needed will be introduced in the book.
Most importantly, you will need to bring a healthy interest in electronics, making things, learning, trying code, and solving challenges. Being keen to build a robot, get it to do stuff, and find out what to do with it next is the most important aspect of the book.
Danny Staple builds robots and gadgets as a hobbyist, makes videos about his work with robots, and attends community events such as PiWars and Arduino Day. He has been a professional Python programmer, later moving into DevOps, since 2009, and a software engineer since 2000. He has worked with embedded systems, including embedded Linux systems, throughout the majority of his career.
He has been a mentor at a local CoderDojo, where he taught how to code with Python, and has run Lego Robotics clubs with Mindstorms. He has also developed Bounce!, a visual programming language targeted at teaching code using the NodeMCU IoT platform. The robots he has built with his children include TankBot, SkittleBot (now the Pi Wars robot), ArmBot, and SpiderBot.