Skip to main content
AI Robotics 200
Introduction to Artificial Intelligence and Robotics
Xiaoli Zhang, PhD and Christine Liebe, PhD
Contents
Index
Search Book
Search Results:
No results.
Read aloud
Continue
Read aloud settings
Voice
Reading speed
1Γ
Collapsed content
Announce, do not read
Read automatically
Follow along (auto-scroll)
Continue to the next page automatically
Readability settings
Readability settings
Line height
1.35
Content font size
100%
Theme
System
Light
Dark
Assistive technologies
π
Expose permalinks
Reset All
Prev
Up
Next
Scratch ActiveCode
Profile
title here
\(\newcommand{\N}{\mathbb N} \newcommand{\Z}{\mathbb Z} \newcommand{\Q}{\mathbb Q} \newcommand{\R}{\mathbb R} \newcommand{\lt}{<} \newcommand{\gt}{>} \newcommand{\amp}{&} \definecolor{fillinmathshade}{gray}{0.9} \newcommand{\fillinmath}[1]{\mathchoice{\colorbox{fillinmathshade}{$\displaystyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\textstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptstyle \phantom{\,#1\,}$}}{\colorbox{fillinmathshade}{$\scriptscriptstyle\phantom{\,#1\,}$}}} \)
Front Matter
Colophon
Dedication
Acknowledgements
Preface
1
Introduction to Robotic Subsystems & Control Loop
Introduction
1.1
The Core Paradigms of Robotics
1.1.1
The Sense-Plan-Act Loop
1.1.2
Real-World Robotics Examples
1.1.2.1
Self-Driving Car Engineer
1.1.2.2
Warehouse Robotics Engineer
1.1.2.3
Agricultural Robotics Engineer
1.1.2.4
Surgical Robotics Engineer
1.1.2.5
Planetary Exploration Engineer
1.1.2.6
Industrial Manufacturing Engineer
1.1.3
Comparing Robotics Careers
1.1.4
Reading Questions
1.2
Control System Foundations
1.2.1
Open-Loop Control Systems
1.2.2
Real-World Open-Loop Examples
1.2.3
Why Engineers Still Use Open Loop
1.2.4
Reading Questions
1.3
Closed-Loop Control Systems
1.3.1
Real-World Closed-Loop Examples
1.3.1.1
Automobile Cruise Control
1.3.1.2
Drone Altitude Hold
1.3.2
Reading Questions
1.4
Fundamentals of PID Control
1.4.1
Breakdown of the Car Analogy
1.4.2
Interactive PID Simulator
1.4.3
The Proportional Term (P) β "How far am I right now?"
1.4.4
The Integral Term (I) β "How long have I been stuck?"
1.4.5
The Derivative Term (D) β "How fast am I approaching?"
1.4.6
Summary of PID Roles
1.4.7
Section 1.4 Interactive Exercises
1.4.7.1
Exercise 1.4.1: Tuning Proportional Gain (
\(K_p\)
) & Integral Gain (
\(K_i\)
) Simulation
1.4.8
Reading Questions
1.5
Glossary
2
Robot Kinematics & Coordinate Spaces
Introduction
2.1
Coordinate Spaces and Robot Pose
2.1.1
Local Body Frame vs. Global Frame
2.1.2
Translating Body-Frame Velocity into the Global Frame
2.1.3
Real-World & VEX AIM Examples
2.1.4
Section 2.1 Interactive Exercises
2.1.4.1
Exercise 2.1.2: CodeLens Trace β Global Pose Update
2.1.5
Reading Questions
2.2
Differential Drive Forward Kinematics
2.2.1
Forward Kinematics Equations
2.2.2
State Integration Over Time Step
\(\Delta t\)
2.2.3
Real-World & VEX AIM Examples
2.2.4
Section 2.2 Interactive Exercises
2.2.4.1
Exercise 2.2.1: Forward Kinematics Implementation Challenge
2.3
Inverse Kinematics and Wheel Velocity Commands
2.3.1
Inverse Kinematics Formula
2.3.2
Real-World & VEX AIM Examples
2.3.3
Section 2.3 Interactive Exercises
2.3.3.1
Exercise 2.3.2: Parsons Problem β Inverse Kinematics Motor Command Pipeline
2.3.4
Reading Questions
2.4
Turning Geometry and Radius of Curvature
2.4.1
Instantaneous Center of Rotation (ICR)
2.4.2
Key Turning Scenarios
2.4.3
Real-World & VEX AIM Examples
2.4.4
Section 2.4 Interactive Exercises
2.4.4.1
Exercise 2.4.1: Parsons Problem β Turning in a Perfect Circle of Radius
\(R\)
2.4.4.2
Exercise 2.4.2: Circle Driving Velocity Simulation
2.5
Glossary
3
Map Representations & Path Planning (A*)
Introduction
3.1
Representing Space: Grid Maps and Graphs
3.1.1
Occupancy Grid Maps
3.1.2
Grid Connectivity: 4-Way vs. 8-Way
3.1.3
Section 3.1 Interactive Exercises
3.1.3.1
Exercise 3.1.2: CodeLens Trace β Neighbor Generation
3.1.4
Reading Questions
3.2
Pathfinding Heuristics: Estimating Distance
3.2.1
Common Distance Metrics
3.2.1.1
Manhattan Distance (
\(h_{\text{manhattan}}\)
)
3.2.1.2
Euclidean Distance (
\(h_{\text{euclidean}}\)
)
3.2.2
Section 3.2 Interactive Exercises
3.2.2.1
Exercise 3.2.2: Parsons Problem β Manhattan Heuristic Function
3.2.3
Reading Questions
3.3
The A* Algorithm: Balancing Past Cost and Future Estimation
3.3.1
The A* Cost Formula
3.3.2
Intuition: Why A* Beats Breadth-First or Greedy Search
3.3.3
Section 3.3 Interactive Exercises
3.3.3.1
Exercise 3.3.2: Parsons Problem β A* Main Loop Steps
3.3.4
Reading Questions
3.4
Interactive A* Pathfinding ActiveCode
3.4.1
Section 3.4 Interactive Exercises
3.4.1.1
Exercise 3.4.1: A* Pathfinding Completion Challenge
3.5
Glossary
4
Reactive Navigation & Obstacle Avoidance
Introduction
4.1
Introduction to Reactive Control and State Machines
4.1.1
Real-World & VEX Robotics Applications
4.1.2
Structuring Reactive Logic: Finite State Machines (FSM)
4.1.3
Why FSMs Minimize Cognitive Load
4.1.4
Section 4.1 Interactive Exercises
4.1.4.1
Exercise 4.1.2: CodeLens Trace β Basic FSM State Switch
4.1.5
Reading Questions
4.2
Distance Sensor Arrays and Local Obstacle Avoidance
4.2.1
Real-World & VEX Robotics Applications
4.2.2
Intuitive Sensor Rule Logic
4.2.3
Section 4.2 Interactive Exercises
4.2.3.1
Exercise 4.2.1: Parsons Problem β Sensor Array Decision Logic
4.2.3.2
Exercise 4.2.2: Virtual Roomba Sensor Loop Challenge
4.3
Artificial Potential Fields: Attractors and Repellers
4.3.1
Real-World & VEX Robotics Applications
4.3.2
Resultant Vector Combination
4.3.3
Reading Questions
4.4
ActiveCode Exercise: Reactive Wall Avoidance Steering Logic
4.4.1
Controller Rules
4.4.2
Try It
4.4.3
Test Case Interpretation
4.5
Limitations of Reactive Navigation: Local Minima Traps
4.5.1
What is a Local Minimum?
4.5.2
Real-World & VEX Robotics Applications
4.5.3
The Solution: Hybrid Navigation Frameworks
4.5.4
Section 4.5 Interactive Exercises
4.5.4.1
Exercise 4.5.2: Local Minima Trap Simulator
4.5.5
Reading Questions
4.6
Glossary
5
Spatial Mapping & Localization Basics
Introduction
5.1
The Localization Problem and Odometry Drift
5.1.1
The Problem of Cumulative Encoder Drift
5.1.2
Real-World & VEX Robotics Examples
5.1.3
Section 5.1 Interactive Exercises
5.1.3.1
Exercise 5.1.2: CodeLens Trace β Odometry Error Accumulation
5.1.4
Reading Questions
5.2
Landmarks, Range Sensors, and Feature-Based Mapping
5.2.1
What is a Landmark?
5.2.2
Feature-Based Mapping vs. Occupancy Grids
5.2.3
Real-World & VEX Robotics Examples
5.2.4
Section 5.2 Interactive Exercises
5.2.4.1
Exercise 5.2.2: Parsons Problem β Feature Map Lookup Function
5.2.5
Reading Questions
5.3
The Chicken-and-Egg Paradox of SLAM
5.3.1
Why SLAM is Hard: The Core Paradox
5.3.2
Solving the Paradox: Probabilistic Co-estimation
5.3.3
Real-World & VEX Robotics Examples
5.3.4
Reading Questions
5.4
ActiveCode Exercise: Simulating Random Heading Drift
5.4.1
Simulation Setup
5.4.2
Try It
5.4.3
Interpreting the Drift
5.4.4
Test Case Interpretation
5.5
ActiveCode Challenge: Wheel Slip Drift and Landmark Correction
5.5.1
Section 5.5 Interactive Exercises
5.5.1.1
Exercise 5.5.1: Encoder Drift Simulation ActiveCode
5.6
Glossary
6
Intro to Machine Learning & Computer Vision
Introduction
6.1
Fundamentals of Supervised Learning
6.1.1
Supervised Learning: Learning with a Teacher
6.1.2
Unsupervised Learning: Finding Hidden Structure
6.1.3
Why We Rely Heavily on Supervised Learning in Autonomous Robotics
6.1.4
Classification vs. Regression
6.1.5
Section 6.1 Interactive Exercises
6.1.5.1
Exercise 6.1.3: ActiveCode Exercise β Building a Lightweight Decision Tree Classifier
6.1.6
Reading Questions
6.2
Introduction to Image Processing
6.2.1
Images as Pixel Grids & Color Spaces
6.2.1.1
Understanding Color Spaces: RGB vs. HSV
6.2.2
Color Thresholding & Binary Segmentation
6.2.3
Real-World Robotics Examples
6.2.3.1
Industrial Inspection & Autonomous Agricultural Pickers
6.2.3.2
Warehouse Line-Following AMRs
6.2.4
Competition Robotics Examples: VEX V5 & VEX AI
6.2.5
Section 6.2 Interactive Exercises
6.2.5.1
Exercise 6.2.2: ActiveCode Exercise β Pure Python Color Threshold Simulator
6.2.5.2
Exercise 6.2.3: Parsons Problem β Image Thresholding Pipeline Order
6.2.6
Reading Questions
6.3
Object Detection & Bounding Boxes
6.3.1
Real-World Robotics Applications
6.3.1.1
Autonomous Vehicles & Warehouse AMRs
6.3.1.2
Competition Robotics: VEX AI Vision Sensor
6.3.2
Section 6.3 Interactive Exercises
6.3.2.1
Exercise 6.3.2: Conceptual Check β Interactive Bounding Box & Center Calculation
6.3.2.2
Exercise 6.3.3: ActiveCode Exercise β VEX Vision Target Centering Logic
6.3.2.3
Exercise 6.3.4: Parsons Problem β Bounding Box Calculation Algorithm
6.3.3
Reading Questions
6.4
ActiveCode Challenge: Decision Tree Classifier for Obstacle Sorting
6.4.1
Section 6.4 Interactive Exercises
6.4.1.1
Exercise 6.4.1: Decision Tree Classifier Challenge
6.5
Model Evaluation: Classification, Confusion Matrices, and Regression Metrics
6.5.1
Evaluating Classification: The Confusion Matrix & Accuracy
6.5.1.1
The Four Outcomes Explained
6.5.1.2
Classification Accuracy
6.5.2
Evaluating Regression: MSE and
\(R^2\)
Score
6.5.2.1
Mean Squared Error (MSE)
6.5.2.2
R-Squared (
\(R^2\)
) Score (Coefficient of Determination)
6.5.3
Reading Questions
6.6
Glossary
7
End-to-End Autonomous Driving
Introduction
7.1
Behavioral Cloning & End-to-End Mappings
7.1.1
Behavioral Cloning: Learning by Demonstration
7.1.2
Real-World & VEX AI Examples
7.1.2.1
Real-World Autonomous Vehicles: NVIDIA PilotNet & Wayve
7.1.2.2
VEX AI Competition (VAIC) Applications
7.1.3
Reading Questions
7.2
Training Loops & Regression Evaluation
7.2.1
Section 7.2 Interactive Exercises
7.2.1.1
Exercise 7.2.1: ActiveCode Exercise β Building a Motor Command Regression Evaluation Loop
7.2.1.2
Exercise 7.2.2: Parsons Problem β End-to-End Data Pipeline Execution
7.3
Dataset Bias & The "Right-Turn Trap"
7.3.1
The "Right-Turn Trap"
7.3.2
Mitigating Bias: Data Augmentation & Recovery Trajectories
7.3.3
Conceptual Check: Dataset Bias Scenarios
7.3.4
Reading Questions
7.4
Chapter 7 Interactive Mastery Suite (Lab 7 Preparation)
7.4.1
Section 7.4 Interactive Exercises
7.4.1.1
Exercise 7.4.1: ActiveCode Challenge β Complete the End-to-End Data Augmentation Pipeline
7.4.1.2
Exercise 7.4.2: Parsons Problem β End-to-End Behavioral Cloning Execution Pipeline
7.4.1.3
Exercise 7.4.3: Conceptual Check β Troubleshooting Behavioral Cloning Failures
7.4.2
Reading Questions
7.5
Glossary
8
Multi-Robot Systems & Swarm Coordination
Introduction
8.1
Introduction to Multi-Agent Systems and Communication Paradigms
8.1.1
Coordination Architectures: Centralized vs. Decentralized
8.1.2
Real-World & VEX Robotics Examples
8.1.3
Section 8.1 Interactive Exercises
8.1.3.1
Exercise 8.1.2: CodeLens Trace β Peer-to-Peer Message Handling
8.1.4
Reading Questions
8.2
Swarm Intelligence: Emergent Behavior and Simple Rules
8.2.1
The Classic Boids Model (Reynoldsβ Rules)
8.2.2
Stigmergy: Indirect Communication
8.2.3
Real-World & VEX Robotics Examples
8.2.4
Section 8.2 Interactive Exercises
8.2.4.1
Exercise 8.2.2: Parsons Problem β Flocking Separation Force Calculation
8.2.5
Reading Questions
8.3
Multi-Robot Task Allocation (MRTA) and Fleet Coordination
8.3.1
Market-Based Auction Protocols
8.3.2
Traffic Control: Priority-Based Intersection Management
8.3.3
Real-World & VEX Robotics Examples
8.3.4
Reading Questions
8.4
ActiveCode Challenge: Simulating a Multi-Robot Auction System
8.4.1
Section 8.4 Interactive Exercises
8.4.1.1
Exercise 8.4.1: Multi-Robot Auction Simulator
8.4.2
Reading Questions
8.5
Glossary
9
Introduction to ROS2 Architecture
Introduction
9.1
Middleware & The ROS 2 Computation Graph
9.1.1
Understanding Robotics Middleware
9.1.2
The ROS 2 Graph
9.1.3
Section 9.1 Interactive Exercises
9.1.3.1
Exercise 9.1.2: Parsons Problem β Assembling ROS 2 Architecture Layers
9.1.4
Reading Questions
9.2
Nodes, Topics, and Messages (.msg)
9.2.1
Nodes: Single-Purpose Workers
9.2.2
Topics: The Publish-Subscribe Pattern
9.2.3
Messages (.msg files)
9.2.4
Section 9.2 Interactive Exercises
9.2.4.1
Exercise 9.2.1: ActiveCode Exercise β Python Parsing
9.2.4.2
Exercise 9.2.2: Parsons Problem β Python ROS 2 Node Creation Sequence
9.3
ROS 2 Command Line Interface (CLI) Tools
9.3.1
Key Debugging Commands
9.3.2
Section 9.3 Interactive Exercises
9.3.2.1
Exercise 9.3.1: Conceptual Matching Check
9.4
The ROS 2 Workspace Environment
9.4.1
Build & Sourcing Workflow
9.4.2
Reading Questions
9.5
Glossary
10
The Publisher/Subscriber Pattern
Introduction
10.1
Asynchronous Communication & Mechanics
10.1.1
What is Asynchronous Communication?
10.1.2
The Pub/Sub Model in Real-World Robotics
10.1.3
Reading Questions
10.2
Writing ROS 2 Publishers
10.2.1
Key Components of a Publisher Node
10.2.2
Section 10.2 Interactive Exercises
10.2.2.1
Exercise 10.2.1: Parsons Problem β Assemble a Minimal ROS 2 Publisher
10.3
Writing ROS 2 Subscribers & Callback Functions
10.3.1
Section 10.3 Interactive Exercises
10.3.1.1
Exercise 10.3.1: ActiveCode Exercise β Safety Laser Scan Processing
10.4
ActiveCode Exercise: LaserScan Safety Stop Callback
10.4.1
Callback Structure
10.4.2
Try It
10.4.3
Threshold Logic
10.4.4
Test Case Interpretation
10.5
TurtleSim Simulation Navigation (Homework Primer)
10.5.1
Key Topics in TurtleSim
10.6
Homework: Initial TurtleSim Simulation Navigation
10.6.1
Assignment
10.6.2
Purpose
10.7
Glossary
Backmatter
A.
Selected Hints
B.
Selected Solutions
C.
List of Symbols
Index
Colophon
Acknowledgements
Acknowledgements
We are grateful to the Colorado School of Mines, Zhaoda Du, PhD Student, and high school teachers who participated in our summer AI Robotics Research Experiences for Teachers programs.
π
π