https://github.com/cmpute/traji
A C++/Python library designed for trajectory calculation in Cartesian / Frenet coordinate system
https://github.com/cmpute/traji
cmake cpp cpp14 frenet-serret-frame path-planning pybind11 python trajectory
Last synced: 22 days ago
JSON representation
A C++/Python library designed for trajectory calculation in Cartesian / Frenet coordinate system
- Host: GitHub
- URL: https://github.com/cmpute/traji
- Owner: cmpute
- License: mit
- Created: 2021-11-23T01:08:31.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-16T01:04:41.000Z (about 3 years ago)
- Last Synced: 2024-05-02T05:17:18.499Z (almost 2 years ago)
- Topics: cmake, cpp, cpp14, frenet-serret-frame, path-planning, pybind11, python, trajectory
- Language: C++
- Homepage:
- Size: 440 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# TrajI
A C++/Python library designed for trajectory calculation in Cartesian / Frenet coordinate system
## Basic Usage
This library include several basic concepts implemented as classes:
- `traji.Point`: A 2D point in Cartesian or Frenet coordinate
- `traji.Path`: A line string consists of a list of consecutive points.
- `traji.Trajectory`: A line string path with associated timestamps for each point.
- `traji.HeteroPath`: A path consists of heterogenerous segments, including line segments, arc segments and other curve types.
- `traji.PathPosition`: This class define a position along a path. It can be converted to a distance value or a timestamp.
- `traji.QuinticPolyTrajectory`: An optimal trajectory defined as a quintic polynomial with regard to time.
- `traji.CTRATrajectory`: A trajectory generated from constant turn-rate and acceleration movement.
The library contains the following functionalities for these concepts with efficient implementations:
- Transformation between the concepts (e.g. `Path` from/to `HeteroPath`, `Path` from/to `Trajectory`)
- Transformation between Cartesian coordinate and Frenet coordinate
- Indexing on the linear concepts (`Point` from/to `PathPosition`)
- Binary operations between the concepts (e.g. intersection, distance)
For C++ API, please refer to the single header file [traji.hpp](include/traji.hpp) for the library.
For Python API, please refer to the type annotation file [_bindings.pyi](python/traji/_bindings.pyi) for an overview of the definitions.
## Reference
- Frenet coordinates: https://github.com/fjp/frenet
- MATLAB traj library: https://www.mathworks.com/help/nav/ref/trajectoryoptimalfrenet.cart2frenet.html
- Bezier library: https://github.com/oysteinmyrmo/bezier