https://github.com/matanabc/path-generator
A easy motion profile path generator
https://github.com/matanabc/path-generator
first frc ftc motion-profile pathgenerator
Last synced: 10 months ago
JSON representation
A easy motion profile path generator
- Host: GitHub
- URL: https://github.com/matanabc/path-generator
- Owner: matanabc
- Created: 2020-11-20T12:10:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-16T10:01:36.000Z (about 3 years ago)
- Last Synced: 2025-03-18T11:12:57.547Z (11 months ago)
- Topics: first, frc, ftc, motion-profile, pathgenerator
- Language: TypeScript
- Homepage:
- Size: 291 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PathGenerator Package
**PathGenerator** is a motion profile generator, which you can easily generat path for your robot to follow.
To see an example of using this package you can take a look at [PathGenerator App](https://github.com/matanabc/path-generator-app).
This package is based of [Jaci's PathFinder](https://github.com/JacisNonsense/Pathfinder) with some improvements.
## Usage
### Basic
```javascript
const { Waypoint, PathConfig, Path } = require('path-generator');
const waypoints = [new Waypoint(0, 0, 0, 0, 2), new Waypoint(1.5, 1.5, 90, 2, 2), new Waypoint(3, 3, 0, 0, 0)];
const pathConfig = new PathConfig(0.8, 3.5, 3);
const path = new Path(waypoints, pathConfig);
```
### Tank
```javascript
const { Tank } = require('path-generator');
const { Path, PathConfig, Waypoint } = Tank;
const waypoints = [new Waypoint(0, 0, 0, 0, 2), new Waypoint(1.5, 1.5, 90, 2, 2), new Waypoint(3, 3, 0, 0, 0)];
const pathConfig = new PathConfig(0.8, 3.5, 3);
const path = new Path(waypoints, pathConfig);
```
### Holonomic
```javascript
const { Holonomic } = require('path-generator');
const { Path, PathConfig, Waypoint } = Holonomic;
const waypoints = [
new Waypoint(0, 0, 0, 0, 0, 2),
new Waypoint(1.5, 1.5, 90, 0, 2, 2),
new Waypoint(3, 3, 0, 180, 0, 0),
];
const pathConfig = new PathConfig(0.8, 3.5, 3);
const path = new Path(waypoints, pathConfig);
```
- **Note**:
- Not tested on a robot yet!