舉報

會員
Hands-On Robotics Programming with C++
C++isoneofthemostpopularlegacyprogramminglanguagesforrobotics,andacombinationofC++androboticshardwareisusedinmanyleadingindustries.ThisbookwillbridgethegapbetweenRaspberryPiandC/C++programmingandenableyoutodevelopapplicationsforRaspberryPi.Tofollowalongwiththeprojectscoveredinthebook,youcanimplementCprogramsinRaspberryPiwiththewiringPilibrary.Withthisbook,you’lldevelopafullyfunctionalcarrobotandwriteprogramstomoveitindifferentdirections.You’llthencreateanobstacle-avoidingrobotusinganultrasonicsensor.Furthermore,you’llfindouthowtocontroltherobotwirelesslyusingyourPC/Mac.ThisbookwillalsohelpyouworkwithobjectdetectionandtrackingusingOpenCV,andguideyouthroughexploringfacedetectiontechniques.Finally,youwillcreateanAndroidappandcontroltherobotwirelesslywithanAndroidsmartphone.Bytheendofthisbook,youwillhavegainedexperienceindevelopingarobotusingRaspberryPiandC/C++programming.
最新章節
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Chapter 9: Building a Voice-Controlled Robot
- Chapter 8: Face Detection and Tracking Using the Haar Classifier
- Chapter 7: Accessing the RPi Camera with OpenCV
- Chapter 6: Building an Object-Following Robot with OpenCV
品牌:中圖公司
上架時間:2021-06-24 12:25:45
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Leave a review - let other readers know what you think 更新時間:2021-06-24 15:31:16
- Other Books You May Enjoy
- Chapter 9: Building a Voice-Controlled Robot
- Chapter 8: Face Detection and Tracking Using the Haar Classifier
- Chapter 7: Accessing the RPi Camera with OpenCV
- Chapter 6: Building an Object-Following Robot with OpenCV
- Chapter 5: Controlling a Robot Using a Laptop
- Chapter 4: Building an Obstacle-Avoiding Robot
- Chapter 3: Programming the Robot
- Chapter 2: Implementing Blink with wiringPi
- Chapter 1: Introduction to the Raspberry Pi
- Assessments
- Questions
- Summary
- Testing the code
- VoiceBot server program
- Socket programming
- Developing the Bluetooth program for RPi
- Enabling the Bluetooth serial port
- Pairing the Android smartphone and RPi via Bluetooth
- Programming the voice-controlled bot block
- Adding and customizing the components
- Designing the app
- Creating a voice-controlled bot app
- Importing and exporting the .aia file of the app
- The Talking Pi program
- Final block
- Intermediate block
- Main block
- Programming the blocks
- Designing the app
- Creating a Talking Pi Android app
- An introduction to App Inventor
- Technical requirements
- Building a Voice-Controlled Robot
- Section 4: Smartphone-Controlled Robot
- Questions
- Summary
- Using the white dot on the face triangle to move the robot
- The programming logic
- Wiring connections
- Face-tracking robot
- Programming logic for smile recognition
- Recognizing a smile
- Detecting the right eye
- Detecting the left eye
- Eye detection using haarcascade_lefteye_2splits and haarcascade_righteye_2splits
- Eye detection using haarcascade_eye
- Detecting the eyes
- Detecting the eyes and smile
- Face-detection program
- Basic working of the Viola-Jones algorithm
- Face detection using the Haar cascade
- Technical requirements
- Face Detection and Tracking Using the Haar Classifier
- Questions
- Summary
- Object-following robot program
- Setting up the object-following robot
- The ball tracing program
- Programming logic
- Ball tracing using moments
- Building an object-following robot
- The OpenCV camera feed program
- The object detection program
- Finding the RGB pixel values
- Capturing the image
- Object recognition using OpenCV
- Important functions in OpenCV
- Image processing with OpenCV
- Technical requirements
- Building an Object-Following Robot with OpenCV
- Questions
- Summary
- Reading an image using OpenCV
- Installing the v4l2 driver
- Recording a video with the RPi camera
- Capturing images and video with the RPi camera
- Mounting the RPi camera on the robot
- Connecting the RPi camera to RPi
- Enabling and connecting the RPi camera to RPi
- Linking OpenCV to Python
- Compiling and installing OpenCV
- Installing Python
- Downloading and unzipping OpenCV 4.0 and its contribution repository
- Installing the cmake image video and gtk packages
- Updating your RPi
- Uninstalling Wolfram and LibreOffice
- Installing OpenCV 4.0.0 on Raspberry Pi
- Technical requirements
- Accessing the RPi Camera with OpenCV
- Section 3: Face and Object Recognition Robot
- Questions
- Summary
- Controlling a rover using a laptop with QT5
- Dealing with errors
- Creating a QT project
- Controlling LEDs with GUI buttons
- Setting up QT5
- Installing and setting up QT5
- Tracing a square path
- Building a laptop-controlled rover program
- Controlling a rover using a laptop keyboard
- Writing the LEDBuzzer.cpp program
- Wiring connections
- Controlling LEDs and a buzzer using ncurses
- Compiling and running the program
- Writing a HelloWorld program with ncurses
- ncurses functions
- Installing the ncurses library
- Technical requirements
- Controlling a Robot Using a Laptop
- Questions
- Summary
- Programming the obstacle-avoiding robot
- Wiring connections
- Building an obstacle-avoiding robot
- The I2C LCD and the ultrasonic sensor program
- Programming the LCD with the I2C LCD module
- Wiring the I2C LCD and the Raspberry Pi
- What is the I2C protocol?
- The LCD and the ultrasonic sensor program
- The LCD program
- Programming the LCD
- Wiring the 16x2 LCD to the Raspberry Pi
- Using an LCD
- The HC-SR04 sensor program
- Wiring the ultrasonic sensor to the Raspberry Pi
- The arithmetic equation for determining the time taken
- How an ultrasonic sensor measures distances
- Using an ultrasonic sensor
- Technical requirements
- Building an Obstacle-Avoiding Robot
- Questions
- Summary
- Radial right turn
- Radial left turn
- Radial turn
- Axial right turn
- Axial left turn
- Axial turns
- Different types of turns
- Stopping the robot
- Moving the robot backward
- Moving the robot
- Working with H-bridge
- Wiring connections
- What is a motor driver?
- Connecting the motor driver to the Raspberry Pi
- Constructing the robot
- Constructing and connecting the robot
- Choosing a robot chassis
- Technical requirements
- Programming the Robot
- Section 2: Raspberry Pi Robotics
- Questions
- Summary
- Making an LED blink with the softPWM library
- The softPWM library
- How PWM works
- Pulse Width Modulation using softPWM
- Smart light program
- Wiring connection
- The LDR sensor and the way it works
- Smart light – working with digital sensor
- Uploading the code to the Raspberry Pi
- The blinking program
- Wiring connections
- Making an LED blink
- Accessing Raspberry Pi GPIO pins via wiringPi
- Installing the wiringPi library in the Raspberry Pi
- Technical requirements
- Implementing Blink with wiringPi
- Questions
- Summary
- Viewing Raspberry Pi Zero W output on VNC Viewer
- Enabling VNC Viewer for Raspberry Pi Zero W
- Connecting the Raspberry Pi Zero W to a Wi-Fi network using PuTTY
- Connecting the Raspberry Pi Zero W to a laptop via Wi-Fi
- Setting up the Raspberry Pi Zero W
- Setting up the Raspberry Pi Zero W as a desktop computer
- Handling VNC and PuTTY errors
- Increase the VNC's screen resolution
- Viewing the Raspberry Pi output on the VNC Viewer
- Enabling the VNC server
- Connecting the Raspberry Pi 3B+ to a Wi-Fi network using PuTTY
- Creating an SSH file on a microSD card
- Connecting the Raspberry Pi 3B+ to a laptop via Wi-Fi
- Connecting the Raspberry Pi 3B+ to the internet
- Setting up the Raspberry Pi 3B+
- Writing the Raspbian Stretch image to a microSD card
- Downloading the Raspbian Stretch image
- Downloading and installing Etcher
- Installing Raspbian OS on an SD card
- Setting up a Raspberry Pi 3B+ as a desktop computer
- The Raspberry Pi Zero W
- The Raspberry Pi 3B+
- Understanding the Raspberry Pi
- Additional hardware requirements for Raspberry Pi Zero W
- Additional hardware for Raspberry Pi 3B+
- For Raspberry Pi 3B+ and Raspberry Pi Zero W
- Hardware requirements
- Software required
- Technical requirements
- Introduction to the Raspberry Pi
- Section 1: Getting Started with wiringPi on a Raspberry Pi
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewers
- About the author
- Contributors
- Packt.com
- Why subscribe?
- About Packt
- Dedication
- Hands-On Robotics Programming with C++
- Copyright and Credits
- Title Page
- coverpage
- coverpage
- Title Page
- Copyright and Credits
- Hands-On Robotics Programming with C++
- Dedication
- About Packt
- Why subscribe?
- Packt.com
- Contributors
- About the author
- About the reviewers
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- Section 1: Getting Started with wiringPi on a Raspberry Pi
- Introduction to the Raspberry Pi
- Technical requirements
- Software required
- Hardware requirements
- For Raspberry Pi 3B+ and Raspberry Pi Zero W
- Additional hardware for Raspberry Pi 3B+
- Additional hardware requirements for Raspberry Pi Zero W
- Understanding the Raspberry Pi
- The Raspberry Pi 3B+
- The Raspberry Pi Zero W
- Setting up a Raspberry Pi 3B+ as a desktop computer
- Installing Raspbian OS on an SD card
- Downloading and installing Etcher
- Downloading the Raspbian Stretch image
- Writing the Raspbian Stretch image to a microSD card
- Setting up the Raspberry Pi 3B+
- Connecting the Raspberry Pi 3B+ to the internet
- Connecting the Raspberry Pi 3B+ to a laptop via Wi-Fi
- Creating an SSH file on a microSD card
- Connecting the Raspberry Pi 3B+ to a Wi-Fi network using PuTTY
- Enabling the VNC server
- Viewing the Raspberry Pi output on the VNC Viewer
- Increase the VNC's screen resolution
- Handling VNC and PuTTY errors
- Setting up the Raspberry Pi Zero W as a desktop computer
- Setting up the Raspberry Pi Zero W
- Connecting the Raspberry Pi Zero W to a laptop via Wi-Fi
- Connecting the Raspberry Pi Zero W to a Wi-Fi network using PuTTY
- Enabling VNC Viewer for Raspberry Pi Zero W
- Viewing Raspberry Pi Zero W output on VNC Viewer
- Summary
- Questions
- Implementing Blink with wiringPi
- Technical requirements
- Installing the wiringPi library in the Raspberry Pi
- Accessing Raspberry Pi GPIO pins via wiringPi
- Making an LED blink
- Wiring connections
- The blinking program
- Uploading the code to the Raspberry Pi
- Smart light – working with digital sensor
- The LDR sensor and the way it works
- Wiring connection
- Smart light program
- Pulse Width Modulation using softPWM
- How PWM works
- The softPWM library
- Making an LED blink with the softPWM library
- Summary
- Questions
- Section 2: Raspberry Pi Robotics
- Programming the Robot
- Technical requirements
- Choosing a robot chassis
- Constructing and connecting the robot
- Constructing the robot
- Connecting the motor driver to the Raspberry Pi
- What is a motor driver?
- Wiring connections
- Working with H-bridge
- Moving the robot
- Moving the robot backward
- Stopping the robot
- Different types of turns
- Axial turns
- Axial left turn
- Axial right turn
- Radial turn
- Radial left turn
- Radial right turn
- Summary
- Questions
- Building an Obstacle-Avoiding Robot
- Technical requirements
- Using an ultrasonic sensor
- How an ultrasonic sensor measures distances
- The arithmetic equation for determining the time taken
- Wiring the ultrasonic sensor to the Raspberry Pi
- The HC-SR04 sensor program
- Using an LCD
- Wiring the 16x2 LCD to the Raspberry Pi
- Programming the LCD
- The LCD program
- The LCD and the ultrasonic sensor program
- What is the I2C protocol?
- Wiring the I2C LCD and the Raspberry Pi
- Programming the LCD with the I2C LCD module
- The I2C LCD and the ultrasonic sensor program
- Building an obstacle-avoiding robot
- Wiring connections
- Programming the obstacle-avoiding robot
- Summary
- Questions
- Controlling a Robot Using a Laptop
- Technical requirements
- Installing the ncurses library
- ncurses functions
- Writing a HelloWorld program with ncurses
- Compiling and running the program
- Controlling LEDs and a buzzer using ncurses
- Wiring connections
- Writing the LEDBuzzer.cpp program
- Controlling a rover using a laptop keyboard
- Building a laptop-controlled rover program
- Tracing a square path
- Installing and setting up QT5
- Setting up QT5
- Controlling LEDs with GUI buttons
- Creating a QT project
- Dealing with errors
- Controlling a rover using a laptop with QT5
- Summary
- Questions
- Section 3: Face and Object Recognition Robot
- Accessing the RPi Camera with OpenCV
- Technical requirements
- Installing OpenCV 4.0.0 on Raspberry Pi
- Uninstalling Wolfram and LibreOffice
- Updating your RPi
- Installing the cmake image video and gtk packages
- Downloading and unzipping OpenCV 4.0 and its contribution repository
- Installing Python
- Compiling and installing OpenCV
- Linking OpenCV to Python
- Enabling and connecting the RPi camera to RPi
- Connecting the RPi camera to RPi
- Mounting the RPi camera on the robot
- Capturing images and video with the RPi camera
- Recording a video with the RPi camera
- Installing the v4l2 driver
- Reading an image using OpenCV
- Summary
- Questions
- Building an Object-Following Robot with OpenCV
- Technical requirements
- Image processing with OpenCV
- Important functions in OpenCV
- Object recognition using OpenCV
- Capturing the image
- Finding the RGB pixel values
- The object detection program
- The OpenCV camera feed program
- Building an object-following robot
- Ball tracing using moments
- Programming logic
- The ball tracing program
- Setting up the object-following robot
- Object-following robot program
- Summary
- Questions
- Face Detection and Tracking Using the Haar Classifier
- Technical requirements
- Face detection using the Haar cascade
- Basic working of the Viola-Jones algorithm
- Face-detection program
- Detecting the eyes and smile
- Detecting the eyes
- Eye detection using haarcascade_eye
- Eye detection using haarcascade_lefteye_2splits and haarcascade_righteye_2splits
- Detecting the left eye
- Detecting the right eye
- Recognizing a smile
- Programming logic for smile recognition
- Face-tracking robot
- Wiring connections
- The programming logic
- Using the white dot on the face triangle to move the robot
- Summary
- Questions
- Section 4: Smartphone-Controlled Robot
- Building a Voice-Controlled Robot
- Technical requirements
- An introduction to App Inventor
- Creating a Talking Pi Android app
- Designing the app
- Programming the blocks
- Main block
- Intermediate block
- Final block
- The Talking Pi program
- Importing and exporting the .aia file of the app
- Creating a voice-controlled bot app
- Designing the app
- Adding and customizing the components
- Programming the voice-controlled bot block
- Pairing the Android smartphone and RPi via Bluetooth
- Enabling the Bluetooth serial port
- Developing the Bluetooth program for RPi
- Socket programming
- VoiceBot server program
- Testing the code
- Summary
- Questions
- Assessments
- Chapter 1: Introduction to the Raspberry Pi
- Chapter 2: Implementing Blink with wiringPi
- Chapter 3: Programming the Robot
- Chapter 4: Building an Obstacle-Avoiding Robot
- Chapter 5: Controlling a Robot Using a Laptop
- Chapter 6: Building an Object-Following Robot with OpenCV
- Chapter 7: Accessing the RPi Camera with OpenCV
- Chapter 8: Face Detection and Tracking Using the Haar Classifier
- Chapter 9: Building a Voice-Controlled Robot
- Other Books You May Enjoy
- Leave a review - let other readers know what you think 更新時間:2021-06-24 15:31:16