Trouble with ramsete trajectry varible

I’m trying to make a trajectory path using pathwever. the issue that keeps coming up that I can’t figure out how to fix is (The local variable trajectory may not have been initialized ). Does anyone know how to fix or a better way of doing this?

Set your trajectory variable to null when you declare it on line 84.
Trajectory trajectory = null;
Another option set trajectory to an empty trajectory.
Trajectory trajectory = new Trajectory(new ArrayList<Trajectory.State>());

Thank you, it fixed the problem

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.