Ready, Set, Go! No Wires or Strings Attached
Core Robot Programming Skills Introduced in This Book
BURT—Basic Universal Robot Translator
BRON—Bluetooth Robot Oriented Network
Assumptions About the Reader’s Robot(s)
How Midamba Learned to Program a Robot
The Seven Criteria of Defining a Robot
Criterion #1: Sensing the Environment
Criterion #2: Programmable Actions and Behavior
Criterion #3: Change, Interact with, or Operate on Environment
Criterion #4: Power Source Required
Criterion #5: A Language Suitable for Representing Instructions and Data
Criterion #6: Autonomy Without External Intervention
Criterion #7: A Nonliving Machine
What Scenario Is the Robot In?
Meeting the Robot’s Language Halfway
How Is the Robot Scenario Represented in Visual Programming Environments?
The Autonomous Robot’s ROLL Model
Robot Roles in Scenarios and Situations
3 RSVP: Robot Scenario Visual Planning
Pseudocode and Flowcharting RSVP
Flow of Control and Control Structures
Statecharts for Robots and Objects
4 Checking the Actual Capabilities of Your Robot
The Reality Check for the Microcontroller
Determine Your Robot’s Sensor Limitations
Actuators End-Effectors Reality Check
Reading Analog and Digital Signals
Sensor Interfacing with Microcontrollers
6 Programming the Robot’s Sensors
Lighting in the Robot’s Environment
Digital Cameras Used to Detect and Track Color Objects
Tracking Colored Objects with RS Media
Tracking Colored Objects with the Pixy Vision Sensor
Training Pixy to Detect Objects
A Closer Look at the Attributes
Ultrasonic Sensor Limitations and Accuracy
Modes of the Ultrasonic Sensor
Calibration of the Ultrasonic Sensor
Programming the Ultrasonic Sensor
Compass Sensor Calculates Robot’s Heading
7 Programming Motors and Servos
Actuators Are Output Transducers
Motor Configurations: Direct and Indirect Drivetrains
Terrain Challenge for Indoor and Outdoor Robots
Dealing with Terrain Challenges
Torque Challenge for Robot Arm and End-Effectors
Calculating Torque and Speed Requirements
Programming Motors to Travel to a Location
Programming Motors Using Arduino
Robotic Arms and End-Effectors
Different Types of End-Effectors
8 Getting Started with Autonomy: Building Your Robot’s Softbot Counterpart
The Scenarios/Situations Section
The Robot’s ROLL Model and Softbot Frame
BURT Translates Softbots Frames into Classes
Our First Pass at Autonomous Robot Program Designs
What Happens If Pre/Postconditions Are Not Met?
What Action Choices Do I Have If Pre/Postconditions Are Not Met?
A Closer Look at Robot Initialization Postconditions
Power Up Preconditions and Postconditions
Coding Preconditions and Postconditions
Where Do the Pre/Postconditions Come From?
SPACES Checks and RSVP State Diagrams
10 An Autonomous Robot Needs STORIES
Converting Unit1
’s Scenario into STORIES
A Closer Look at the Scenario’s Ontology
Paying Attention to the Robot’s Intention
Object-Oriented Robot Code and Efficiency Concerns
11 Putting It All Together: How Midamba Programmed His First Autonomous Robot
Midamba Becomes a Robot Programmer Overnight!
Step 1. Robots in the Warehouse Scenario
Step 2. The Robot’s Vocabulary and ROLL Model for Facility Scenario #1
Step 3. RSVP for Facility Scenario #1
Visual Layouts of a Robot POV Diagram
Midamba’s Facility Scenario #1 (Refined)
Graphical Flowchart Component of the RSVP
State Diagram Component of the RSVP
Midamba’s STORIES for Robot Unit1 and Unit2
Autonomous Robots to Midamba’s Rescue
12 Open Source SARAA Robots for All!
Low-Cost, Open-Source, Entry-Level Robots
Scenario-Based Programming Supports Robot Safety and Programmer Responsibility
Recommendations for First-Time Robot Programmers
Complete RSVPs, STORIES, and Source Code for Midamba’s Scenario