Book Image

Raspberry Pi Robotic Projects - Third Edition

By : Richard Grimmett, Jon Witts
Book Image

Raspberry Pi Robotic Projects - Third Edition

By: Richard Grimmett, Jon Witts

Overview of this book

This book will allow you to take full advantage of Raspberry Pi Zero and Raspberry Pi 3 by building both simple and complex robotic projects. The book takes a mission-critical approach to show you how to build amazing robots and helps you decide which board to use for which type of robot. The book puts a special emphasis on designing mobile (or movable) robots using the Raspberry Pi Zero. The projects will show inexpensive, yet powerful, ways to take full advantage. It will teach you how to program Raspberry Pi, control the movement of your robot, and add features to your robots.
Table of Contents (13 chapters)
Raspberry Pi Robotic Projects - Third Edition
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Accessing the Kinect 360 using the Raspberry Pi


Once you have the unit connected and up and working, you can access the images. First, you'll need to install a library called freenect, which will make it very easy to access both the regular and depth images from the Kinect 360. To do this, type sudo apt-get install freenect. You'll also need a library to allow you to access freenect from Python; to get this, type sudo apt-get install python-freenect. Once you have the libraries installed, you'll also need to install a library that will allow you to access the images on the Raspberry Pi graphics system. To do this, type sudo apt-get install libgl1-mesa-swx11.

You can check to see if everything is working by opening a vncserver window and typing freenect-glview. You should see something like this:

This shows both the depth and regular image. The depth image is color coded: white is closer, then red, then yellow, then green.

This is neat, but you'll want to access both images using OpenCV just...