navigate
Navigation modules in Rust
Navigation modules and algorithims in rust! Navigate is a crate seeking to make navigation easier in rust. It is focused on robotics but can be used for any navigation problem.
Current state is a work in progress. The following algorithms are implemented but more to come!
Using this crate
In your Cargo.toml
, put:
[dependencies]
navigate = "0.1.1"
Example Dijkstra (graph) Algorithm usage: The algorithm takes a start node, a neighbor function, and a goal function. The neighbor function should return a vector of (node, cost) tuples. The goal function should return true when the goal is reached.
use dijkstra;
// Helper function to create a neighbor function from a graph
// Assumes data stored as: HashMap<String, Vec<(String, u32)>>
+ '_
Example RRT* (sampling) Algorithm usage:
RRT* requires a map to be defined that it will then sample points from. The map is defined by a set of polygons that represent the obstacles in the environment. In this example we'll add a goal function that allows a 10 radius range to the goal point. Our walk step function will be 5 and we'll calculate 1,000 iterations.
use rrt_star;
Example RRT* visualization:
Algorithms
- Dijkstra's Algorithm
- A* Algorithm
- RRT* Algorithm
Feature Requests
Have any feature requests? Open an issue!
License
MIT