Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Artificial Intelligence for Robotics

You're reading from   Artificial Intelligence for Robotics Build intelligent robots using ROS 2, Python, OpenCV, and AI/ML techniques for real-world tasks

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781805129592
Length 344 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Francis X. Govers III Francis X. Govers III
Author Profile Icon Francis X. Govers III
Francis X. Govers III
Arrow right icon
View More author details
Toc

Table of Contents (18) Chapters Close

Preface 1. Part 1: Building Blocks for Robotics and Artificial Intelligence
2. Chapter 1: The Foundation of Robotics and Artificial Intelligence FREE CHAPTER 3. Chapter 2: Setting Up Your Robot 4. Chapter 3: Conceptualizing the Practical Robot Design Process 5. Part 2: Adding Perception, Learning, and Interaction to Robotics
6. Chapter 4: Recognizing Objects Using Neural Networks and Supervised Learning 7. Chapter 5: Picking Up and Putting Away Toys using Reinforcement Learning and Genetic Algorithms 8. Chapter 6: Teaching a Robot to Listen 9. Part 3: Advanced Concepts – Navigation, Manipulation, Emotions, and More
10. Chapter 7: Teaching the Robot to Navigate and Avoid Stairs 11. Chapter 8: Putting Things Away 12. Chapter 9: Giving the Robot an Artificial Personality 13. Chapter 10: Conclusions and Reflections 14. Answers 15. Index 16. Other Books You May Enjoy Appendix

Task analysis

As we do for each chapter, let’s review what we are aiming to accomplish. We will be driving the robot around the house, looking for toys. Once we have a toy, we will take that toy to the toy box and put it away by dropping it into the toy box. Then, the robot will go look for more toys. Along the way, we need to avoid obstacles and hazards, which include a set of stairs going downward that would definitely damage the robot.

Note

I used a baby gate to cover the stairs for the first part of testing and put pillows on the stairs for the second part. There is no need to bounce the robot down the stairs while it is still learning.

We are going to start with the assumption that nothing in this task list requires the robot to know where it is. Is that true? We need to find the toy box – that is important. Can we find the toy box without knowing where it is? The answer is, of course, that the robot can just search for the toy box using its camera until it locates it. We developed a technique for recognizing the toy box back in Chapter 4 with a neural network.

Now, if the robot was doing a bigger job, such as cleaning a 1,000,000-square-foot warehouse, then we would need a map. But our task is to clean a single 16 x 16 room. The time lost searching for the toy box is not all that significant, considering we can’t get too far away, and we must drive to the toy box anyway. We will set this as a challenge, then, to accomplish our task without making a map.

Note

I once oversaw the evaluation of a robot system created at the Massachusetts Institute of Technology. They had a navigation system that did not use a map, and I was quite skeptical. In my defense, the robot actually got lost during the test. Now, I’m making a mapless navigator, and they are welcome to offer critique.

We also need to get the robot to do the following:

  1. Navigate the room avoiding obstacles (toys and furniture) and hazards (stairs).
  2. Find toys in the room (with the toy detector we created earlier).
  3. Drive to a location where the robot arm can reach the toy.
  4. Pick up the toy with the robot arm.
  5. Carry the toy to the toy box.
  6. Put the toy in the toy box.
  7. Go and find another toy.
  8. If there are no more toys, then stop.

We’ve covered finding the toy and picking it up in other chapters. In this chapter, we will discuss driving up to the toy to pick it up.

I’m a big fan of the movie The Princess Bride. It has sword fights, cliffs, two battles of wits, and Rodents of Unusual Size (ROUS). It also has a lesson in planning that we can emulate. When our heroes, Fezzik the Giant, Inigo Montoya, and Westley, plan on storming the castle to rescue the princess, the first things Westley asks are “What are our liabilities?” and “What are our assets?” Let’s do this for our use case:

  • Our liabilities: We have a small robot with a very limited sensor and compute capability. We have a room full of misplaced toys and a set of deadly stairs the robot can fall down.
  • Our assets: We have a robot with omni wheels that can drive around, a voice, one camera, and a robot arm. The robot has a datalink via Wi-Fi to a control computer. We have this book. We have a toy box that is a distinctive color. And lots of Toys of Usual Size (TOUS).

The appropriate next step, whether we are designing robots or invading castles, is to do some brainstorming. How would you go about solving this problem?

We could use SLAM and make a map, then locate the robot on the map, and use that to navigate. Although we ultimately will not be following this method, let’s quickly take a look at how it works.

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image