Closed icecube45 closed 7 years ago
I also experience this with the Java version. On Sun, Feb 26, 2017 at 02:24 Cole Brinsfield notifications@github.com wrote:
Hello again, everything is working flawlessly in the c++ version, except loading of trajectories. I've tried loading both a csv and binary file, and each time, once pathfinder_deserialize (or pathfinder_deserialize_csv) is called, a segmentation fault occurs. This happens with the example code provided as well.
Any help would be appreciated for solving this issue
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/JacisNonsense/Pathfinder/issues/13, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqKHPQvyvXMoR2mm5cU1KLO854lz2Swks5rgSi2gaJpZM4MMR_G .
Can you send me the generated .csv file? A gist will do.
@icecube45, What waypoints are you generating the trajectory with?
@JacisNonsense This was generated with the points of
{15,0,0}, {69.32,49.26,0}, {127,14.07,util::d2r(-60)}
And a swerve modifier with a 20in square for the wheelbase
@JacisNonsense I've found my issue - I was under allocating the trajectory for loading into.
@icecube45 ahh, that'd do it. I'm glad you found your issue, I was just about to say I couldn't reproduce it.
@JacisNonsense this might be worthwhile to put in the documentation - I'm going to have to play with it a bit more as on the roboRio itself the issue persists, whereas underallocation solved it in my testing environment. Perhaps I'm allocating too large now, I might need to reduce my samples.
The number of points you need to allocate depends on a lot of different factors. Typically, instead of calling malloc()
, I will instead use a static array to hold the generated points, e.g. static Segment mySegs[1024]
. As for overallocation, this depends on your platform, and what memory space is available on the system.
Hello again, everything is working flawlessly in the c++ version, except loading of trajectories. I've tried loading both a csv and binary file, and each time, once pathfinder_deserialize (or pathfinder_deserialize_csv) is called, a segmentation fault occurs. This happens with the example code provided as well.
Any help would be appreciated for solving this issue