#rocket-league #rlbot #physics #simulation #dubin

dubins_paths

Rust code for calculating Dubin’s Paths

18 releases (11 stable)

Uses new Rust 2021

1.3.0 Jun 20, 2022
1.2.3 Feb 8, 2022
1.2.2 Jan 29, 2022
1.0.4 Dec 15, 2021
0.1.0 Oct 2, 2021

#12 in Simulation

Download history 7/week @ 2022-03-07 73/week @ 2022-03-14 70/week @ 2022-03-21 1/week @ 2022-03-28 20/week @ 2022-04-04 2/week @ 2022-04-11 2/week @ 2022-04-18 71/week @ 2022-04-25 122/week @ 2022-05-02 20/week @ 2022-05-09 291/week @ 2022-05-16 71/week @ 2022-05-23 172/week @ 2022-05-30 53/week @ 2022-06-06 2/week @ 2022-06-13 29/week @ 2022-06-20

273 downloads per month

GPL-3.0-only

23KB
251 lines

Dubin's Paths

Rust code for calculating Dubin's Paths

Credit to Andrew Walker for the original C code

I've ported the code to Rust and documented everything that I could understand. Documentation in the original repository was minimal.

Quick example

use std::f32::consts::PI;
use dubins_paths::{self, DubinsPath, PathType, PosRot};

// PosRot has the format [f32; 3]
// It represents the car's [x, y, theta]
// Where x and y are the coordinates on a 2d plane
// and theta is the orientation of the car's front in radians

// The starting position
let q0: PosRot = [0., 0., PI / 4.];

// The target end position
let q1: PosRot = [100., -100., PI * (3. / 4.)];

// The car's turning radius (must be > 0)
// This can be calculated by taking a cars angular velocity and dividing it by the car's forward velocity
let rho: f32 = 11.6;

// Calculate the shortest possible path between these two points with the given turning radius
let shortest_path_possible: dubins_paths::Result<DubinsPath> = DubinsPath::shortest_from(q0, q1, rho);

// Assert that the path was found!
assert!(shortest_path_possible.is_ok());

DubinsPath has many methods you should look into, such as length, extract_subpath, sample, and sample_many.

Documentation

Looking for some documentation? Head on over to the docs.rs page!

No runtime deps