User Tools

Site Tools


projects:robots:autonomy

projects:robots

autonomy

Route Planning

  1. start with 5 points placed at random
  1. draw circle around each point
  1. pick position on circle A at random
  1. choose circle B at random
  1. choose side of B: right or left
  1. draw line tangential from A to B

Skateboarding

Navigation Trigonometry

Piloting

OpenCV vs matplotlib

keep helm within turning radius

  1. how to convert turning_radius to min/max relative_bearing
  2. can you do a unit test, circling a skate around a cone
    1. too tight, it collapses into the cone
    2. too loose, it spirals off the page
  3. slow down for tight turns
  4. gradually speed up with each iteration

notes:

  1. random options cannot be used for unittests
  2. plot route as you go, ala billiards
  3. how many cones? if event = barrel racing, find valid barrels and ignore the extraneous.
  4. why are we doing spiral? why not unittest freestyle first?
  5. arena size and gate are passed by args only in sim mode
  6. turning radius can be adjusted by machine learning and should be saved with the skate id
  7. Course racing can have no more that 180 turns, no cloverleafs. Cloverleafs are not possible with more than one skate on the track.

in normal live mode

  1. operator passes event name to computer
  2. all other info derived from camera
  3. if we do an afternoon of multiple events,
    1. do we restart the computer for each event?
      1. reset cones
      2. restart computer with new event name
    2. or
      1. let computer sit in a wait loop
      2. operator can restart with new event name

lap counter

  1. add lap counter
  2. frames, laps, elapsed, top speed
  3. start time, log with timer
  4. display all specs
  5. numlaps = 1
    1. freestyle
      1. lap concept is inadequate
      2. lap, do not return to finish gate until
    2. slalom laps, return to starting gate and begin again
    3. barrel laps
    4. slalom and barrel racing
      1. one lap, stop, begin again
  6. why are we doing laps?
    1. only course racing uses laps
    2. are we setting up for course racing?
  7. a freestyle lap (is this a lap?)
    1. choose pattern, stay 3 laps ahead
    2. choose cones and sides, depending on pattern

unittest one lap of freestyle

  1. pass specs from unittest to main loop, using saved game
  2. lap counter
  3. write loop with funky (optional)
  4. run one lap with trail, save final image, stop
  5. after each lap and event, skate returns to start orientation at gate

operator controls

  1. event name
  2. start
  3. stop - skate moves to gate, in start orientation
  4. kill - emergency stop everything

gates

  1. allow human skaters
  2. two gates, start and finish, may be the same with opposite orientation
  3. two points for each gate, right and left

style points

  1. aesthetics
  2. in route planning
  3. in piloting

patterns

  1. starting gate, speed between two cones to first cone
  2. finish gate, speed between two cones from last cone
  3. return to home (rth), land on a point.
  4. slalom, along a selected set of cones
  5. perimeter, around a selected set of cones
  6. spiral in, from and to selected cones
  7. spiral out, from and to selected cones
  8. three-leaf clover
  9. barrel race, three-leaf clover plus two gates
  10. figure 8, a set of two cones, or two groups of cones
  11. s-curve, half of a figure 8
  12. full course random, today's planRoute()
  13. course racing, static course with laps, and two gates
  14. freestyle, a chain of patterns, planned in advance, or chosen on the fly
  15. add imaginary points

Event vs Pattern

Pattern Recognition

It should be possible to recognize patterns of cones, such as a gate, straight-line, or mandala, and determine from that event is intended.

Task: unit test each pattern

events

  1. spiral
  2. freestyle
  3. slalom: straight-line or course
  4. barrel race
  5. porch mandala
  6. perimeter
  7. slalom around the perimeter
  8. unit test named patterns, ie spiral
    1. run main and sim loop
    2. x leave a trail
    3. save image and compare image to reference
  9. repeat and timing each run
    1. barrel racing: run once and out
    2. freestyle: route, run, repeat, until what
    3. spiral: plot route, same cone again and again

legs

  1. line
  2. arc

freestyle patterns

  1. spiral
  2. perimeter
  3. spiral in, out, starting at multiple cones or perimeter
  4. figure 8
  5. mandalas
  6. compulsories

spiral pattern

  1. only one cone in dead center, run a spiral around it, within the arena boundaries
  2. no route, just forever circle one cone; gate, cone, gate
  3. add reverse
  4. find the centermost cone and spiral around it
  5. how to plot a route? cannot. has to be done at execution time
    1. cone center
    2. largest circle within arena given center
    3. smallest radius
    4. largest radius
    5. number of circles
    6. gradually increasing radius
  6. make spiral a leg shape
    1. given: center, start radius, end radius, radial pct increase radius each frame
      1. direction, in or out, cw or ccw
    2. any arc could be treated as a spiral
      1. with additional parameters
        1. number of passes
        2. radial change per frame
      2. set by plotRoute
      3. can a spiral intersect another cone?
        1. the spiral leg could be used like a line, as a route to the next cone

Place cones per event.

refactor ala sk8 sensoryMotorCircuit

  1. split into brain parts
  2. 2 simultaneous tasks
    1. fly the drone
    2. drive the skate
  3. both require navigation and piloting
  4. navigator and pilot
  5. to navigate - plot a route, strategy
  6. to pilot - steer the vehicle along the route, tactics
  7. 1st time
    1. if spec.live:
      1. use OpenCV to read frame from drone camera
      2. use TensorFlow to do object detection and segmentation of cones and skate
    2. elif spec.sim:
      1. generate arena, cones, skate
    3. use matplotlib to build map and plot route
  8. subsequent times:
    1. orient new map to master map
  9. while running:
    1. if spec.live:
      1. use OpenCV to read frame from drone camera
      2. use TensorFlow to do object detection and segmentation of cones and skate
    2. elif spec.sim:
      1. plot new position via dead reckoning
  10. huh
    1. set gate = skate starting position
    2. use matplotlib to plan route: calculate heading, bearings, route
    3. use matplotlib to navigate: calculate heading, bearings
    4. use matplotlib to pilot: calculate helm, speed
    5. use matplotlib to draw map
    6. use OpenCV.addWeighted to overlay map on top of camera image
    7. use OpenCV to show the finished photo
    8. use OpenCV.waitKey(0) to allow user override
projects/robots/autonomy.txt · Last modified: 2023/01/12 11:31 by jhagstrand

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki