View Single Post
  #12   Spotlight this post!  
Unread 04-02-2017, 15:52
antman antman is offline
Registered User
FRC #3238
Team Role: Mentor
 
Join Date: Mar 2016
Rookie Year: 2016
Location: WA
Posts: 13
antman is an unknown quantity at this point
Re: Path Planning and Trajectory Troubles

The attached contains trajectories generated using Pathfinder. You didn't specify your max velocity or max acceleration so I used the values in the Pathfinder readme (1.7 for max velocity, 2.0 for max acceleration, Pathfinder also wants max jerk as an input, kept this at 60.0 like in the readme).

Here's the Java code snippet for generating the trajectories:

Code:
Waypoint[] points = new Waypoint[] {
new Waypoint(0, 0, 0),
new Waypoint(2.82, 1.63, Pathfinder.d2r(56))};

Trajectory.Config config = new Trajectory.Config(Trajectory.FitMethod.HERMITE_CUBIC, Trajectory.Config.SAMPLES_HIGH, 0.04, 1.7, 2.0, 60.0);
Trajectory trajectory = Pathfinder.generate(points, config);
			
double wheelbase_width = 0.48;
TankModifier modifier = new TankModifier(trajectory);
modifier.modify(wheelbase_width);
Trajectory left  = modifier.getLeftTrajectory();
Trajectory right = modifier.getRightTrajectory();
Attached Files
File Type: csv OutputFromPathfinder.csv (3.3 KB, 9 views)
Reply With Quote