Book Image

Learning Robotics using Python - Second Edition

By : Lentin Joseph
Book Image

Learning Robotics using Python - Second Edition

By: Lentin Joseph

Overview of this book

Robot Operating System (ROS) is one of the most popular robotics software frameworks in research and industry. It has various features for implementing different capabilities in a robot without implementing them from scratch. This book starts by showing you the fundamentals of ROS so you understand the basics of differential robots. Then, you'll learn about robot modeling and how to design and simulate it using ROS. Moving on, we'll design robot hardware and interfacing actuators. Then, you'll learn to configure and program depth sensors and LIDARs using ROS. Finally, you'll create a GUI for your robot using the Qt framework. By the end of this tutorial, you'll have a clear idea of how to integrate and assemble everything into a robot and how to bundle the software package.
Table of Contents (12 chapters)

Interfacing quadrature encoder with Tiva C Launchpad

The wheel encoder is a sensor attached to the motor to sense the number of rotations of the wheel. If we know the number of rotations, we can compute the velocity and displacement of the wheel.

For this robot, we have chosen a motor with an in-built encoder. This encoder is a quadrature type, which can sense both the direction and speed of the motor. Encoders use different types of sensors, such as optical and hall sensors, to detect these parameters. This encoder uses the hall effect to sense the rotation. The quadrature encoder has two channels, namely Channel A and Channel B. Each channel will generate digital signals with a 90-degree phase shift. The following diagram shows the wave form of a typical quadrature encoder:

Quadrature encoder waveforms

If the motor rotates in a clockwise direction, Channel A will lead Channel...