JaciBrunning / Pathfinder

Cross-Platform, Multi-Use Motion Profiling and Trajectory Generation
MIT License
256 stars 78 forks source link

Problem With Importing Pre-Generated CSV #24

Open SimarKareer opened 6 years ago

SimarKareer commented 6 years ago

When attempting to load csv from file on the roborio our code crashes:

Here's the error:

 ********** Robot program starting **********
 LeftScale.
 ProfileFollower.
 ProfileFollower: Set file.
 Can read "/home/lvuser/MotionProfiles/LeftScale/_left.csv": true
 "/home/lvuser/MotionProfiles/LeftScale/_left.csv" exists: true
 "/home/lvuser/MotionProfiles/LeftScale/_left.csv" is file: true
 "/home/lvuser/MotionProfiles/LeftScale/_left.csv" is directory: false
 "/home/lvuser/MotionProfiles/LeftScale/_left.csv" is hidden: false
 "/home/lvuser/MotionProfiles/LeftScale/_left.csv" is absolute: true
 ProfileFollower: Trajectory.Config config.
 ProfileFollower: Config.
 ProfileFollower: Attempting to read "/home/lvuser/MotionProfiles/LeftScale/_left.csv". ("/home/lvuser/MotionProfiles/LeftScale/_left.csv")
 Platform: /Linux/arm/
 NT: server: client CONNECTED: 10.27.29.57 port 12868
 #
 # A fatal error has been detected by the Java Runtime Environment:
 #
 #  SIGSEGV (0xb) at pc=0xb6dcb5b0, pid=19540, tid=0xb5308470
 #
 # JRE version: OpenJDK Runtime Environment (8.0_131-b57) (build 1.8.0_131-b57)
 # Java VM: OpenJDK Client VM (25.131-b57 mixed mode, Evaluation linux-aarch32 )
 # Problematic frame:
 # C  [libc.so.6+0x345b0]
 #
 # Core dump written. Default location: //core or core.19540 (max size 2048 kB). To ensure a full core dump, try "ulimit -c unlimited" before starting Java again
 #
 # An error report file with more information is saved as:
 # /tmp/hs_err_pid19540.log
 #
 # If you would like to submit a bug report, please visit:
 #   http://www.azulsystems.com/support/
 # The crash happened outside the Java Virtual Machine in native code.
 # See problematic frame for where to report the bug.
 #  
JaciBrunning commented 6 years ago

Can you send me the file you're trying to import?

JaciBrunning commented 6 years ago

also, run this again and send me the hserr*.log file you'll find mentioned in the crash log

SimarKareer commented 6 years ago

Sent both via email

JaciBrunning commented 6 years ago

Resolved over email. Note to those viewing: If you're using the Motion Profiling Generator (made by vannaka here), you need to use the _detailed.csv path with Pathfinder's follower, since the non _detailed.csv ones are designed for the Talon SRX motion profiling framework

edwanvi commented 6 years ago

We're having the same issue. I'm (pretty) sure that our .csv files are the _detailed versions, but the JRE crashes when trying to lead them into Trajectory objects (with Pathfinder.readFromCSV.)

here's our hs_err_*.log

The .csv files we're trying to load are in that gist as well. GitHub formats them into tables, but that's why the "Raw" button exists.

SimarKareer commented 6 years ago

Hey! So my team managed to get it to work with the detailed csvs. Did u make sure to put them on the roborio? If your code is on GitHub you can send me a link and I can take a look. My team is 2729 and our code is public so feel free to look off of that as well.

https://github.com/2729StormRobotics/StormRobotics2018/blob/master/src/main/java/AutoModes/Commands/ProfileFollower.java

Best of luck, Simar Kareer


From: Edwan Vi notifications@github.com Sent: Tuesday, February 6, 2018 4:49:23 PM To: JacisNonsense/Pathfinder Cc: SimarKareer; Author Subject: Re: [JacisNonsense/Pathfinder] Problem With Importing Pre-Generated CSV (#24)

We're having the same issue. I'm sure that our .csv files are the _detailed versions, but the JRE crashes when trying to lead them into Trajectory objects (with Pathfinder.readFromCSV.)

here's our hserr*.loghttps://gist.github.com/tkdberger/38935891781fc6342daf7ad8284bb55d

The .csv files we're trying to load are in that gist as well. GitHub formats them into tables, but that's why the "Raw" button exists.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/JacisNonsense/Pathfinder/issues/24#issuecomment-363576184, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AOab2mUynGZ-4O_d2f7yZad8il4XpxAQks5tSMjigaJpZM4RldHa.

edwanvi commented 6 years ago

We have both CSVs on the robot alongside the compiled .jar version of our code. Might try what you guys have done to see if it works (i.e. putting it in another folder under ~.)

edwanvi commented 6 years ago

Some time later, we're still segfaulting on loading the CSV files. We've tried both putting them in a different directory and setting the permissions on both files to 777 with chmod. I've double-checked and as far as I can tell, our code is functionally identical to what @SimarKareer is running. No idea why it won't run for us.

e1: Interestingly, Pathfinder loads other trajectories made with writeToCSV, which leads me to believe that vannaka/Motion_Profile_Generator is somehow laxer in what it considers a "possible" path. I will file an issue with that repo when I have more time.

JaciBrunning commented 6 years ago

It may be that the paths are trying to overwrite your buffers. Vannaka's generator uses Pathfinder internally, so there should not be a huge difference. Send me your .csv files here and I'll take a look

edwanvi commented 6 years ago

They're in this gist (as well as the JVM crash log at the bottom.)

GitHub pretty-prints them as tables, so here's the raw right side and the raw left side. If memory serves, one of the two paths intersects itself for a sharp turn. We made a revised version without this intersection and it loaded fine.