oak creek, wisconsin martian exchange studentsfll team 16 advanced robot control programming for...
TRANSCRIPT
![Page 1: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/1.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Advanced Robot Control
Programming for Robustness with RoboLab
![Page 2: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/2.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Positioning
• Absolute– Uses features or
‘landmarks’ of the course
• Relative– Robot keeps track of its
moves– Relies on Odometry
![Page 3: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/3.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Positioning Problems
• Absolute– May have difficult time finding small landmarks– Some landmarks & robots are easily damaged
• Relative– Error accumulates with every move– If too many errors, robot maybe too far off course to
find landmark later
![Page 4: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/4.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Common Sources of Error
• Rotation Sensor Resolution
• Gear Backlash
• Program Execution Speed
• Wheel Spin/Skidding
• Inside Turn Wheel
![Page 5: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/5.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Rotation Sensor Resolution
• Robot only knows position with plus or minus one count (at best)
• Gear backlash increases error beyond one count
• Use finer resolution to reduce error (Minimize Distance per Count)
• Rotation sensor should be at same speed as motor (or up to 1-1/2 times higher)
![Page 6: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/6.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Program Execution Speed
• Rotation sensor not read continuously
• RCX may not ‘see’ a target
• RCX will not react instantly
![Page 7: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/7.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Wheel Spin at Startup
• Caused by sudden application of motor torque, not enough weight on drive wheels
• Wheels and rotation sensor turn before robot starts
• Skip or changes direction due to “jump” from start
![Page 8: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/8.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Skidding
• Caused by rapid application of motor braking and not enough weight on drive wheels
• Robot told to stop but continues to move– Rotation sensor doesn’t ‘see’ move– Sends robot off position, affecting next move
by robot
![Page 9: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/9.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Turns• Errors are magnified in turns
– Any slight direction error can cause larger side-to-side error
• Braking of inside wheel– Any movement of the inside
wheel lessens the overall turn; true angle is shorter than with a locked wheel
• Turns made with two counter-rotating wheels doubles rotation sensor resolution errors– Additional errors if wheels
don’t turn at same speeds
![Page 10: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/10.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Non-Programming Solutions
• Set a reasonable speed-Try gearing robot for 10 to 15 inches per second– Allows one wheel to be
‘locked’ in turn
• Gear rotation sensor for 1/8” of travel per count or less– Measures position as
precisely as practical
• Minimize backlash by avoiding multi-stage gearing
• Avoid loose gear meshes• Keep weight on driving
wheels– Gain traction– Minimize slipping and
skidding– Weight shifts with
accel/decel
• Match motors – use two motors with same output speeds– Use motor test jig
![Page 11: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/11.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Motor Test Jig
• Build a motor test jig using:– Load motor with worm
geartrain
• Test and record motor data– Run for turn, record
counts– Forward and reverse– Different power levels
Picture of Motor Test Jig
![Page 12: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/12.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Programming Solutions
• ‘Creeping’
• ‘Precise’ Forward/Reverse/Turns
• ‘Square Up’ to Lines
• Line Following using ‘shades of gray’
• Experimentation
![Page 13: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/13.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
‘Creeping’
• Moves Robot Slowly by providing a series of taps to the robot– Overcome static friction– Provides braking and speed control
• Offers these Advantages– Go slowly to minimize wheel slippage– Minimize distance error due to polling error– Better chance of sensing narrow lines– Bump up against landmark with much less force
![Page 14: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/14.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Why Not Use Low Power Levels?
• Often don’t provide enough power to overcome static friction
• Robot still rolls easily enough that speed is still too high
![Page 15: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/15.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
How to Creep
• Create a loop to wait for rotation (or time, light level or button press)– Start motors at medium power level– Wait for a very small time (1/100 sec)– Stop the motors– Wait for a very small time (1/100 sec)– End loop
![Page 16: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/16.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Creep Example
![Page 17: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/17.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Precise Turns/Forward/Reverse
• Power applied gradually
• Reduce power before target
• Creep forward/backward until reach target
![Page 18: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/18.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
‘Precise’ Startup
• Uses subroutine (to save memory)– Position target passed from main task via container
• Sets up intial target – Try using 10 to 20 counts short of actual target
• Loops until initial rotation target– Branches to different power levels based on timer to
provide smoother acceleration– Avoids wheel slip at startup
![Page 19: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/19.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
![Page 20: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/20.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
At Initial Target
• Coast or Creep– If coasting, coast until time– Could possibly coast past target
• Creeping applies pulsed braking– No skidding
• Self correcting using closed loop positioning – Moves forward or reverse to final target count– Too far – creeps in reverse– Too short – creeps forward
![Page 21: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/21.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
![Page 22: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/22.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Routine Details• One subroutine can
be used for left turns and forward
• Container 7 is set to 0 or 1 to choose left or forward
• Reverse or right turns are done similarly
• Stored as subroutines to save memory
• Target counts are passed using blue container
• Set container for forward/reverse or left/right
![Page 23: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/23.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Square Up
• Line up robot to edge of line– Uses two Light Sensors– Moves robot so each sensor seeks dark/light
edge
• Know exact spot when parked– Accuracy in direction – Accuracy in position (1 axis)
![Page 24: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/24.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Square Up ‘Setup’
• Square up to dark line– Each sensor is different– Needs to be set before running
• Separate sub-vi that calibrates light levels– Grabs light values– Calculates and stores threshold values
![Page 25: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/25.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
How it works
• For each sensor:• If sensor sees:
– Light: Creep one pulse forward, Reset Container to 0– Dark: Add 1 to container
• Do until container is set to 2 which means both sensors made it to the dark line
• Robot “waddles” to the line• Repeat process with motors set for reverse and
looking for light instead of dark• Repeat loop two times to assure exact
placement
![Page 26: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/26.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
![Page 27: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/27.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Line Following• Follow line edge using light sensor
– Reads average value of light within a circle– Seeking halfway between light and dark
• Based upon Light level sensed Motor ‘Behavior’ will set motors to creep to steer robot toward line edge – Can be separated into the 7 zones (‘shades of grey’)– Can go straight or turn depending on value– Go faster and straighter near middle zones– Go slower and turn sharper in zones away from
middle
![Page 28: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/28.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
![Page 29: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/29.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Program Example
• Create an outer loop – rotation sensor target
• Create a decision tree within the loop– Made with container forks for branching for
different response to each light level range– Use Creeping within each branch
• Each of the 7 conditions can be setup and tested individually
![Page 30: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/30.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Experimentation is Key
• Alter creep speed and turn radius
• Watch robot to see how it behaves
• Adjusting height of light sensor– Changes size of circle being read– Changes sensitivity
• Adjust location of light sensor
• Change weight distribution
![Page 31: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/31.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Memory Management
• Use Subroutines(‘Subs’) for routines called repeatedly– Pass parameters to ‘Subs’ using Containers – Use Containers as flags (for program forks) to
get multiple functions per Sub.
• Use utility programs to show memory usage and clear out slots.– Get to know memory usage of program
elements
![Page 32: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/32.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Show Memory vi example
![Page 33: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/33.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
Erase Slot vi example
![Page 34: Oak Creek, Wisconsin Martian Exchange StudentsFLL Team 16 Advanced Robot Control Programming for Robustness with RoboLab](https://reader036.vdocuments.site/reader036/viewer/2022070411/56649c995503460f949551f8/html5/thumbnails/34.jpg)
Martian Exchange Students FLL Team 16 Oak Creek, Wisconsin
“The lesson is in the struggle and not in the
victory”
One Final Thought: