0% found this document useful (0 votes)
18 views

CS123 Lec01 Introduction

Uploaded by

mickeysu2016
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

CS123 Lec01 Introduction

Uploaded by

mickeysu2016
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 28

CS123 - Introduction

Programming Your Personal Robot

Kyong-Sok “KC” Chang, David Zhu


Fall 2015-16

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Course Description
An introduction to the programming of a sensor-rich personal robot.
This course extends programming from the virtual environment into
the physical world, which presents unique challenges. Focus is on
three areas of intellectual discourse that are fundamental to the
programming of physical devices: communication with the devices;
programming of event driven behaviors; and reasoning with
uncertainty. The concepts introduced will be put into practical use
through a series of class projects centered around programming
your personal robot. This course also serves as a good introduction
to Experimental Robotics by exposing students to basic concepts
and techniques that are relevant for real world robot programming.

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Is This Class For Me?
CS157
CS225A CS123
FRENLANG 60D
CS221
CS223A

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


What It Is Not
• It’s not about programming a “humanoid” robot
• It’s not about low level robot control (i.e. dynamics
and kinematics)
• It’s not about AI
(e.g. motion
planning)

Darpa Robotics Challenge 2015: Programming humanoid


robot with dynamics/kinematics control with AI. (TEAM SNU)
Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu
What It Is
• An introductory class for students who have no (or very
limited) experience of programming robots(physical
devices) but are interested in learning more.
• A “sampler” (overview): we will cover a range of
fundamental topics of robot programming, but we will not
be able to go into any specific topic in depth.
• Communication, Behavior, Uncertainty, Extension, Team
• It’s a good preparatory class for “Experimental Robotics”
• A very hands-on class (learning by doing)

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Why Physical Device Programming
• Traditional computer (i.e. workstations, desktops, laptops)
have very limited I/O (e.g. keyboards/monitors) and are
constrained physically (offices/home)
• Smart Phones have “liberated” computer - can be taken
almost everywhere and have more sensors (camera,
GPS, G-sensors, and etc.)
• “Smart Device” is “the next big thing”– rich with I/O and
connecting to the internet or other computing devices
(phone and computer), these smart devices reach further
into our life

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


What Are Smart Devices?

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Robots Are Also Smart Devices
(That Can Move)

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


What are Robots Essentially?
• Computers with
• More sensing - Get more (information) from the
environment
• More actuation - Interact more with the environment

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Unique Challenges
• Communication has limits
• Sensing is imperfect
• Control is inaccurate
• Knowledge of the world
incomplete
• Not available
• Impractical
• In fact, human has the same
limitation

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


The World is “Messy”

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


A Simplified Paradigm

Virtual World Real (Physical) World


Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu
Introducing Hamster

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


“Karel” Comes Into the Physical World

Karel (Virtual Robot): Hamster (Real Robot):


• Perfect communication • Limited communication
• Perfect knowledge • Incomplete knowledge
• Perfect sensing • Uncertainty in sensing
• Perfect (accurate) control • Imperfect control
• High-level abstraction • Low-level access
Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu
What You Should Know
• CS106
• OOP
• CS107 a plus
• Python
• Basic understanding
• Enjoy programming in general
• Very hands-on

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Syllabus
• Part 1 - Communicating with robot (2 weeks)
• BLE communication and robot API
• Part 2 - Event Driven Behavior (2 weeks)
• Finite State Machine (Behavior Tree)
• Part 3 - Reasoning with Uncertainty (2 weeks)
• Dealing with noisy data, uncertainty in sensing and control
• Part 4 - Extending the robot (1 weeks)
• I/O extensions: digital, analog, servo, pwm, etc
• Part 5 – Putting it together (including UI/UX) (3 weeks)
• Design and implement of final (group) project
• Encourage you to go “above and beyond”

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Course Structure
• Lectures
• Cover basic concepts
• Readings
• Provide background and deeper knowledge on relevant topics
• Projects
• Hands-on experience, learning by doing
• “Freestyle”
• Going beyond class material on your own. Hamster is an open
platform

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Grading
• This class will be project base only
• No exam ☺
• There will be 4 individual projects and 1 team (final) project
• Project #1 (Communication) – 20%
• 2 weeks
• Project #2 (Finite State Machine) - 20%
• 2 weeks
• Project #3 (Uncertainty) - 20%
• 2 weeks
• Project #4 (Robot Extension) - 10%
• 1 week
• Project #5 (Final, Group project) - 30%
• 3 weeks
• Design your (team) project (need to get approval)

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


About US
• Instructors
• Dr. Kyong-Sok “KC” Chang
• Dr. David Zhu
• TA
• Jocelyn Neff
• Kornel Niedziela

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Dr. Kyong-Sok “KC” Chang
• CS Ph.D. 2000 Stanford (Robotics)
• Professional Interest
• Software framework for efficient modeling,
simulation, and control of robotic systems
• SimLab: Robotics Company (Korea)
• Quadruped
• Robotic Hand
• Mobile base
• Humanoid: DRC

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Dr. David Zhu
• CS Ph.D. ’91: Stanford (Robotics)
• Professional Interest
• Games
• Toys to Life
• Robots For Education
• China

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Jocelyn Neff
• BS CS 2015, MS MS&E 2016
• Professional Interests
• Autonomous Cars
• Smart Home
• Wearables
• Geo
• Knowledge Graph

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Kornel Niedziela
• B.ASc in Mechatronics Eng., U of Waterloo
• MSME, Stanford – Design Methodology focus
• Interested in:
• Robotics
• Product Design
• Automotive

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Logistics
• Getting your own Hamster
• Sign-up sheet
• Programming environment
• Mac
• PC
• Website for the class
• TA sessions (office hours)
• Location
• Time
• Emails

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Feedbacks Are Appreciated

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


Calendar

Part 2

Part 1 Part 3

Part 4 Part 5

Part 5

KC David
Teaching Teaching
Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu
BLE: Hamster
Generic Apps: connecting to Hamster Effectors: (UUID: 0x0000A0000...)
-- iPhone, iPad, Mac: LightBlue -- Write 11 bytes to Hamster.
-- Android: nRF Master Control Panel <0000103232020300000040>
(in hex)
Sensors: (UUID: 0x00009001...) 0x00: version/topology
-- Read data (20 bytes) from Hamster. 0x00: network ID
(in hex) 0x10: command/security
1st byte: version/topology 0x32: left wheel speed (50: -100~100)
2nd byte: network ID 0x32: right wheel speed (50: -100~100)
3rd byte: command/security 0x02: left LED color (green: 0~7)
4th byte: Signal Strength (-128~0) 0x03: right LED color (blue: 0~7)
5th byte: Left Proximity (0~255) 0x00: buzzer high
6th byte: Right Proximity (0~255) 0x00: buzzer middle
7th byte: Left Floor (0~255) 0x00: buzzer low
8th byte: Right Floor (0~255) 0x40: musical note (C4: middle C: 0-88)

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu


BLE: Reading
This week's(and future) reading for BLE.

“Getting started with Bluetooth Low Energy” by Townsend, Davidson & Akiba,
O’Reilly

https://www.safaribooksonline.com/library/view/getting-started-
with/9781491900550/cover.html

Stanford University (cs123.stanford.edu) ©Kyong-Sok (KC) Chang & David Zhu

You might also like