Book Image

Learning Robotics using Python

Book Image

Learning Robotics using Python

Overview of this book

Table of Contents (19 chapters)
Learning Robotics Using Python
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Working with ultrasonic distance sensors


One of the most important features of a mobile robot is navigation. An ideal navigation means a robot can plan its path from its current position to the destination and can move without any obstacles. We use ultrasonic distance sensors in this robot for detecting objects in close proximity that can't be detected using the Kinect sensor. A combination of Kinect and ultrasonic sound sensors provides ideal collision avoidance for this robot.

Ultrasonic distance sensors work in the following manner. The transmitter will send an ultrasonic sound which is not audible to human ears. After sending an ultrasonic wave, it will wait for an echo of the transmitted wave. If there is no echo, it means there are no obstacles in front of the robot. If the receiving sensor receives an echo, a pulse will be generated on the receiver, and it can calculate the total time the wave will take to travel to the object and return to the receiver sensors. If we get this time...