Pathfinder icon indicating copy to clipboard operation
Pathfinder copied to clipboard

Problem With Importing Pre-Generated CSV

Open SimarKareer opened this issue 6 years ago • 10 comments

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.
 #  

SimarKareer avatar Jan 20 '18 14:01 SimarKareer

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

JaciBrunning avatar Jan 20 '18 15:01 JaciBrunning

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

JaciBrunning avatar Jan 20 '18 15:01 JaciBrunning

Sent both via email

SimarKareer avatar Jan 22 '18 18:01 SimarKareer

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

JaciBrunning avatar Jan 25 '18 14:01 JaciBrunning

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.

edwanvi avatar Feb 06 '18 21:02 edwanvi

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 [email protected] 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 hs_err_*.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.

SimarKareer avatar Feb 06 '18 23:02 SimarKareer

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 avatar Feb 07 '18 01:02 edwanvi

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.

edwanvi avatar Feb 07 '18 21:02 edwanvi

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

JaciBrunning avatar Feb 08 '18 07:02 JaciBrunning

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.

edwanvi avatar Feb 08 '18 16:02 edwanvi