
29-03-2016, 22:34
|
 |
Registered User
AKA: Jaci R Brunning
 FRC #5333 (Can't C# | OpenRIO)
Team Role: Mentor
|
|
Join Date: Jan 2015
Rookie Year: 2015
Location: Perth, Western Australia
Posts: 251
|
|
|
Re: Pathfinder - I broke it
Quote:
Originally Posted by Aero
I'm having trouble running the creation code on the RoboRIO.
<snip>
The code sufficient to trigger this crash is pretty much exactly as described in the docs.
Code:
Waypoint[] points = new Waypoint[] {
new Waypoint(-0.5, -0.5, Pathfinder.d2r(35)), // Waypoint @ x=-4, y=-1, exit angle=-45 degrees
new Waypoint(-4.826, 0, Pathfinder.d2r(-90)), // at start of outerworks, 190in
new Waypoint(-7.62, 0, Pathfinder.d2r(-90)), // 300 in
new Waypoint(-4.826, 0, Pathfinder.d2r(-90)), // back out
};
Trajectory.Config config = new Trajectory.Config(Trajectory.FitMethod.HERMITE_CUBIC, Trajectory.Config.SAMPLES_HIGH, 0.001, 1.7, 2.0, 60.0);
Trajectory trajectory = Pathfinder.generate(points, config);
TankModifier modifier = new TankModifier(trajectory).modify(WHEELBASE_WIDTH);
|
The spline you're attempting to generate can't be generated. The angle of -90 degrees can't be fit if you're only moving in the X plane, as the angle of 0 is pointing towards X+
|