View Single Post
  #3   Spotlight this post!  
Unread 03-29-2016, 10:34 PM
Jaci's Avatar
Jaci Jaci is offline
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
Jaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond reputeJaci has a reputation beyond repute
Re: Pathfinder - I broke it

Quote:
Originally Posted by Aero View Post
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+
__________________
Jacinta R

Curtin FRC (5333+5663) : Mentor
5333 : Former [Captain | Programmer | Driver], Now Mentor
OpenRIO : Owner

Website | Twitter | Github
jaci.brunning@gmail.com
Reply With Quote