Skip to content

Seanmullan/motion-planner

Repository files navigation

Motion Planner

A lightweight hobby project exploring sampling based trajectory generation for autonomous vehicles and mobile robots. The planner samples both geometric paths and motion profiles, combines them into full trajectories, evaluates each candidate with a custom trajectory cost function, and selects the best feasible plan.

The goal is to create a simple, modular playground for experimenting with trajectory sampling, scoring, and selection strategies, similar to what would be used in a nonlinear optimisation setup, but with a fully sampling based approach.

Features

Spline-lattice geometric sampling

A structured set of geometric path candidates generated by varying lateral offsets and spline control points. This creates a dense lattice of smooth curves covering the local space, similar to a Frenet-frame lattice, but spline based and fully configurable.

Motion-space sampling

Independent sampling of velocity, acceleration, and jerk profiles. These motion primitives can be paired with any geometric spline to create motion trajectories.

Trajectory synthesis

Geometry and motion samples are combined into full spatiotemporal trajectories.

Cost function framework (TODO)

Modular scoring of each candidate trajectory with terms such as:

  • Curvature and curvature rate
  • Lateral/longitudinal deviation
  • Jerk and smoothness
  • Progress toward goal
  • Collision or near-collision metrics

Weighting is designed to mirror nonlinear optimisation-based planners, but evaluated over discrete samples.

Trajectory selection (TODO)

All synthesised trajectories are evaluated, filtered, and ranked; the minimum-cost feasible trajectory is chosen as the final plan.

Visualizations

Sampling in geometry space: Geometry Sampling

Sampling in motion space: Motion Profile Candidates

Combined trajectory candidates: Trajectory Candidates

Build

cmake -DCMAKE_BUILD_TYPE=Release -B build -S .
cmake --build build --config Release -j8

Unit Test

ctest

Benchmark

./MotionPlannerBenchmarks

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published