You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to make code that saves the trajectory to a file and then reads from that file as a cache. I discovered that the Pathfinder.writeToFile and Pathfinder.writeToCSV methods both cause a segfault during the call to the C++ library. This is running on the roboRio. Here is the crash log.
The path generated just fine, but after, when we try to save it, it crashes.
Waypoint[] points = new Waypoint[] {
new Waypoint(-4, -1, Pathfinder.d2r(-45)),
new Waypoint(-2, -2, 0),
new Waypoint(0, 0, 0)
};
Trajectory.Config config =
new Trajectory.Config(
Trajectory.FitMethod.HERMITE_CUBIC,
Trajectory.Config.SAMPLES_HIGH,
0.05,
RobotMap.MAX_VELOCITY,
2.0,
60.0);
File saveFile = new File(RobotMap.TRAJECTORY_CACHE);
if(saveFile.exists() && !saveFile.isDirectory()) {
log.add("trajectory file already found, usng cached paths", LOG_LEVEL);
trajectory = Pathfinder.readFromFile(saveFile);
} else {
log.add("trajectory file not found, generating new path", LOG_LEVEL);
trajectory = Pathfinder.generate(points, config);
log.add("saving path to cache", LOG_LEVEL);
Pathfinder.writeToFile(saveFile,trajectory);
}
The text was updated successfully, but these errors were encountered:
vampjaz
added a commit
to MRT3216/MRT3216-2018-PowerUp
that referenced
this issue
Feb 17, 2018
The path we specified was just a filename, so I assume that it would be placed in the same folder as the executing program. Would you recommend an absolute path instead of a relative one?
Trying to make code that saves the trajectory to a file and then reads from that file as a cache. I discovered that the
Pathfinder.writeToFile
andPathfinder.writeToCSV
methods both cause a segfault during the call to the C++ library. This is running on the roboRio. Here is the crash log.The path generated just fine, but after, when we try to save it, it crashes.
The text was updated successfully, but these errors were encountered: