Midterm Progress Report (Dynamic Sparse A-Star)
description
Transcript of Midterm Progress Report (Dynamic Sparse A-Star)
PROGRESS REPORT
ANDREW KAIZER, THOMAS CRESCENZI, AND TYLER YOUNG
HOW FAR ARE WE?
Divide and Conquer
• Andrew: (Sparse) A*
• Thomas: Plane prediction, ROS integration
• Tyler: Best cost/danger grids, X-Plane visualization
Refresher: Plane Prediction
l Works by evaluating the chances that a plane will be in a specific grid
l Takes into account time which allows for the plane to be seen as moving through time
l Branches in the chance that a plane could equally be in two places at one time
New Additions
l Now planes are predicted to their avoidance way point and from there to their goal
l In addition planes are predicted a second past their goal
New Additions
Best Cost Estimates
If you find yourself in this square, the best path you can find is of cost ____.
A* Search
• Divided into three parts: – Sparse A* Setup – Dynamic-Sparse A* Search – Dynamic Collision Analysis
Sparse A* Setup: Steps 1-7
1. Get Start Point, Waypoint Point 2. Construct optimal grid forward path 3. Construct optimal grid back path 4. Fill in rest of optimal spaces 5. Calculate Optimal Continuous Space
Path 6. Determine if Optimal Path is Clear 7. Clear ? Return goal : continue to step 8;
Dynamic-Sparse A* Search: Steps 8-13
8. Look at current minimal (smallest) node 9. Calculate bearing of current node 10. Calculate legal expansion 11. Create successors 12. Goal ? Go to Step 13 : Go to Step 8 13. Push every single point, in order of time,
onto the A_STAR queue
A* Collision Analysis: Step 14-17
14. Pop OPT and A_STAR points 15. Compare o.x, o.y and a.x, a.y 16. DIFFER ? go to step 17 : go to step 14 17. Return Collision Avoidance Point 18. If queues empty: OPT ≈ A_STAR
Step One: Start/End
Step Two: Optimal Forward
Step Three: Optimal Backwards
Step Four: Full Optimal
Step Five: Optimal Path
Step 6/7: Determine Path Clarity
For time t = {0…n} a) Calculate expected values b) Retrieve real values from Danger/Best Cost c) if REAL > EXPECTED
a) PATH is not clear; go to step 8
d) t++ e) Go back to step a
Step 8-13: (2,2,0)
Step 8-13: (3,3,1)
Step 8-13: (3,2,1)
Step 8-13: (4,1,2)
Or if you like Crudely Drawn GIFs
Steps 14-17 OPTIMAL PATH 1: (2,2,0) -- START 2: (3,2,1) 3: (4,2,2) 4: (5,2,3) -- GOAL 5: …
A STAR PATH 1: (2,2,0) 2: (3,2,1) 3: (4,1,2) – Collision Point 4: (5,2,3) -- GOAL 5: …
RETURN: Point (4, 1, 2)
Sparse-Dynamic A*
• Sparse: Looks at a minimal area, instead of wasting time on dead ends
• Sparse: Does not call A* if the path is clear
• Dynamic: Makes educated guesses based on time steps into the future
• Dynamic: Versatile, can respond to change quickly
ROS Integration
l Two services are used l requestwaypointinfo is used to get
the final goal of each plane for use with predicting paths
l gotowaypoint is used to send the planes to the right waypoint
l Telemetry updates are received through a message
Classes to Help with Integration
l Plane class l Represents a plane and contains all
of the information from telemetry, and a bit more
l Position class l Represents a position in both latitude
and longitude and x and y l Used by the Plane class to aid in
storing information
Steps Done by ROS
l Get telemetry data l Update the plane object l Get and set the plane’s goal with the
requestwaypointinfo service l Build the best cost grid l Run A* l Tell plane to go to the point A* says with
the gotowaypoint service
Integrating with ROS
A* works brilliantly in our simulated world of dots, starts, and goals.
What happens, though, when we work with UAVs?
“Chicken”
Integrating with ROS
Playing nice with ROS—and doing so reliably—is proving more difficult.
Visualization in X-Plane
WHAT OBSTACLES HAVE WE OVERCOME?
A* Works Really Well
Andrew has graphs to show tomorrow!
BC Grids—Where Do We Stop?
BC Grids—Where Do We Stop?
BC Grids—Where Do We Start?
Giving Planes Breathing Room
Difficulties Predicting Planes
l Very few due to excessive planning on paper
l Swaths created when time was predicted incorrectly
l Only predicting to final goal and ignoring intermediate way points
Difficulties with ROS
Troubleshooting l No debugger l No call stack listing l No outputting (if you’re doing
it wrong!)
Difficulties with ROS
Troubleshooting l No debugger l No call stack listing l No outputting (if you’re doing
it wrong!)
Solutions
l assert(false) deeper and deeper into the stack
l Turn outputting on and add tons of colors to the terminal
l Add a good number of compiler directives to direct output
Learning to Troubleshoot… Again
Without a debugger, we end up asserting everything we can.
Insidious Planar Assumptions
• Accidentally modeled a flat earth • Background in planar
(Euclidean) geometry makes our intuitions unreliable
Insidious Planar Assumptions
Distance between two points:
Compare to planar distance:
Insidious Planar Assumptions
Bearing between two points
Insidious Planar Assumptions
Ending point given distance and bearing:
Insidious Planar Assumptions
Ending point given distance and bearing:
Computation Time and Parallelism
• Time complexity is linear with respect to the number of aircraft
• Each aircraft’s path is plotted independently of others—can have one plane per CPU with no penalty
WHAT OBSTACLES DO WE STILL FACE?
Testing in the Air
• Autopilots are untested • No guarantee that behavior
observed in the simulator will carry over to the real world
Improving Our Methods
• Plane prediction • Heuristic (best cost grid)
generation • Parallelism
Troubleshooting the Little Things
We're done with the things we aimed to do—just need to bring them together.
• E.g., plane 0 doesn't take more than 1 goal...
HOW WILL WE OVERCOME THESE?
We’ll see.
• Troubleshooting has to take place as we encounter problems. – Same methods as ever: trace the problem to its roots.
We’ll see.
• Research – Use known methods of optimizing
code, predicting planes – Use built-in methods for parallelizing in ROS