Skip to content

Instantly share code, notes, and snippets.

@robertbenjamin
Created July 1, 2015 13:21
Show Gist options
  • Save robertbenjamin/ac909c991398e42fe2f6 to your computer and use it in GitHub Desktop.
Save robertbenjamin/ac909c991398e42fe2f6 to your computer and use it in GitHub Desktop.
Robot PBJ Exercise
1. Turn on
Run boot loader
Enable kernel
Scan I/O ports, access hardware
Run init
Start daemon processes
Scan HD for "pbj.script"
Run pbj.script
2. Find your own location
Scan in a 360 degree with LIDAR and video sensors
Access GPS coordinates
build 3D map of location in relation to self
3. Find location of kitchen
Find GPS coordinates of nearest kitchen
Use LIDAR and video sensors to move to the kitchen
4. Find location of supplies needed to create a PB&J sandwhich
Scan surrounding area with LIDAR and video sensors
Analyze scanned area for drawers, cupboards, and refrigerator
Drawer - horizontal rectangle, slides out
Cupboard - vertical rectangle, slides out
Refrigerator - Wider vertical rectangle, swings open, typically from the left side
Open all drawers, cupboards, and refrigerators, while scanning for: peanut butter, jelly, bread, or knives
5. Assembly supplies in one location
When: peanut butter (1 jar), jelly (1 jar), bread (at least 2 pieces), or knives (2 knives) are found, grab them
Bring supplies onto a flat, empty surface that is at about waist height, preferably a clean countertop
6. Make the sandwhich
Get lay the (2) pieces of bread side by side
If either piece of bread is a crusty end piece, make sure the non-end side is facing upwards
Open the jar of peanut butter
Open the jar of jelly
Grab (1) knife, stick it into the jar of peanut butter, and scoop in a circular motion until around 1 tbsp of peanut butter is on the knife
Remove the knife from the jar (with the peanut butter) and apply the peanut butter to one slice of bread with a downward stroking motion
Spread the peanut butter over the whole slice of bread using similar downward stroking
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment