Giter Site home page Giter Site logo

astar's Introduction

astar's People

Contributors

wrongsyntax avatar

Watchers

 avatar  avatar

astar's Issues

IndexError when trying to add another waypoint to data.csv

Traceback (most recent call last):
  File "[...]/AStar/tree.py", line 136, in <module>
    waypoints, nofly_region = create_safe_waypoints(parsed_nodes)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[...]/AStar/tree.py", line 63, in create_safe_waypoints
    safe_waypoints[name] = (safe_region.vertices[i].x, safe_region.vertices[i].y)
                            ~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range

Occurred when attempting to add a new obstacle node 'F' at the end of data.csv.

Generate test data

Find a way to generate more test data, rather than just one csv file.

  • Randomly generated polygon vertices that form a valid polygon
  • START and TARGET node
  • Classify nodes as either 'start', 'target', or 'obstacle'
  • Save to csv files for use in testing

Given a list of nodes, find all valid connections between nodes

Given a list of nodes and their (x,y) coordinates, find connections between nodes that avoid the region that must be avoided.

Nodes are given as:

  • The current position is known. This is the START position.

  • A series of nodes is given as the region that must be avoided. A safety_margin is added to the nodes. All nodes will move a constant amount away from where they originally are given as. A route needs to be found around this region.

  • The TARGET node is given.

  • Check if a straight line drawn between two nodes passes through the no-fly zone.

  • Generate the tree as required for the A* algorithm.

  • Find distance of each node from START (G_COST)

  • Find distance of each node from TARGET (H_COST)

Diagram

Refactor tree.py to use OOP

Making a Waypoint and Tree class could make the code more clear.

Not a necessary change as functionality would not change but could be done.

Visualize all nodes, paths, regions, etc.

Implement a way to visualize everything to ensure nothing weird is happening (polygons being incorrect was discovered by visualizing them)

Using matplotlib, plot all relevant data.

  • Original waypoints
  • Safe waypoints
  • Restricted no-fly region
  • Valid paths between waypoints
  • Maybe invalid paths as well (?)
  • Label points

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.