OCCRA
Go to Post I think we have officially reached the stage of having too much time on our hands. - Koko Ed [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-19-2018, 01:28 PM
cameron009 cameron009 is offline
Registered User
FRC #2594 (NASKCOrpions)
Team Role: Leadership
 
Join Date: Jun 2018
Rookie Year: 2017
Location: Nampa ID
Posts: 5
cameron009 is an unknown quantity at this point
Running Grip Pipeline On Jetson TX1

We have a Jetson TX1 and we need to run a java file on it that we generated from grip. We have tried to use Gradle as well, and when we try to run ./gradlew build, it says command not found. We are wanting to know how to run this Grip file to do off board vision processing. Are we doing it right? Do we just install the WPI Libraries into the java installed on the Jetson? Any help would be appreciated.
Reply With Quote
  #2   Spotlight this post!  
Unread 10-19-2018, 02:59 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 705
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Running Grip Pipeline On Jetson TX1

Quote:
Originally Posted by cameron009 View Post
We have a Jetson TX1 and we need to run a java file on it that we generated from grip. We have tried to use Gradle as well, and when we try to run ./gradlew build, it says command not found. We are wanting to know how to run this Grip file to do off board vision processing. Are we doing it right? Do we just install the WPI Libraries into the java installed on the Jetson? Any help would be appreciated.
I think you'll definitely have to post code - show us what your gradle build configurations look like, what your project layout looks like, what the filesystem on the TK1 looks like for where the pipeline is supposed to be deployed to, and the exact text of the error message you're seeing.

Unfortunately, this is not a permutation I've attempted, So I probably won't be of much help regardless. Others will know more though.
Reply With Quote
  #3   Spotlight this post!  
Unread 10-19-2018, 04:49 PM
codedr codedr is offline
Registered User
FRC #0537
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Wisconsin
Posts: 97
codedr will become famous soon enoughcodedr will become famous soon enough
Re: Running Grip Pipeline On Jetson TX1

Here's what I had to compile for support libraries on an older version of GRIP to get it to compile on TK1.

https://www.chiefdelphi.com/forums/s...67#post1537667
Reply With Quote
  #4   Spotlight this post!  
Unread 10-19-2018, 04:54 PM
codedr codedr is offline
Registered User
FRC #0537
Team Role: Mentor
 
Join Date: Mar 2010
Rookie Year: 2009
Location: Wisconsin
Posts: 97
codedr will become famous soon enoughcodedr will become famous soon enough
Re: Running Grip Pipeline On Jetson TX1

That's for an old version, there is probably other dependencies that have been added since then.
Reply With Quote
  #5   Spotlight this post!  
Unread 10-20-2018, 10:39 AM
cameron009 cameron009 is offline
Registered User
FRC #2594 (NASKCOrpions)
Team Role: Leadership
 
Join Date: Jun 2018
Rookie Year: 2017
Location: Nampa ID
Posts: 5
cameron009 is an unknown quantity at this point
Re: Running Grip Pipeline On Jetson TX1

I don't necessarily want to run GRIP on the jetson itself, but run the code I generated from it on a windows laptop on the Jetson. Do I have to build the code with Gradle on the windows laptop. If so, I have ran into errors with it.

First, I tried to build on windows with the sample project from WPI just to try to get it to work:

Code:
C:\Users\Administrator\Downloads\VisionBuildSamples-1.0.0\VisionBuildSamples-1.0.0\Java>gradlew build
Downloading https://services.gradle.org/distributions/gradle-3.3-bin.zip
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
................................................................................................................................................................
..................................................................................................................................................
Unzipping C:\Users\Administrator\.gradle\wrapper\dists\gradle-3.3-bin\64bhckfm0iuu9gap9hg3r7ev2\gradle-3.3-bin.zip to C:\Users\Administrator\.gradle\wrapper\dis
ts\gradle-3.3-bin\64bhckfm0iuu9gap9hg3r7ev2
Starting a Gradle Daemon (subsequent builds will be faster)
Download https://plugins.gradle.org/m2/com/github/jengelman/gradle/plugins/shadow/1.2.4/shadow-1.2.4.pom
Download https://plugins.gradle.org/m2/org/jdom/jdom2/2.0.5/jdom2-2.0.5.pom
Download https://plugins.gradle.org/m2/org/ow2/asm/asm/5.0.3/asm-5.0.3.pom
Download https://plugins.gradle.org/m2/org/ow2/asm/asm-parent/5.0.3/asm-parent-5.0.3.pom
Download https://plugins.gradle.org/m2/org/ow2/ow2/1.3/ow2-1.3.pom
Download https://plugins.gradle.org/m2/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.pom
Download https://plugins.gradle.org/m2/commons-io/commons-io/2.4/commons-io-2.4.pom
Download https://plugins.gradle.org/m2/org/apache/commons/commons-parent/25/commons-parent-25.pom
Download https://plugins.gradle.org/m2/org/apache/apache/9/apache-9.pom
Download https://plugins.gradle.org/m2/org/apache/ant/ant/1.9.4/ant-1.9.4.pom
Download https://plugins.gradle.org/m2/org/apache/ant/ant-parent/1.9.4/ant-parent-1.9.4.pom
Download https://plugins.gradle.org/m2/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.pom
Download https://plugins.gradle.org/m2/org/codehaus/plexus/plexus/2.0.7/plexus-2.0.7.pom
Download https://plugins.gradle.org/m2/org/codehaus/groovy/groovy-backports-compat23/2.4.4/groovy-backports-compat23-2.4.4.pom
Download https://plugins.gradle.org/m2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.pom
Download https://plugins.gradle.org/m2/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.pom
Download https://plugins.gradle.org/m2/com/github/jengelman/gradle/plugins/shadow/1.2.4/shadow-1.2.4.jar
Download https://plugins.gradle.org/m2/org/jdom/jdom2/2.0.5/jdom2-2.0.5.jar
Download https://plugins.gradle.org/m2/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar
Download https://plugins.gradle.org/m2/org/ow2/asm/asm-commons/5.0.3/asm-commons-5.0.3.jar
Download https://plugins.gradle.org/m2/commons-io/commons-io/2.4/commons-io-2.4.jar
Download https://plugins.gradle.org/m2/org/apache/ant/ant/1.9.4/ant-1.9.4.jar
Download https://plugins.gradle.org/m2/org/codehaus/plexus/plexus-utils/2.0.6/plexus-utils-2.0.6.jar
Download https://plugins.gradle.org/m2/org/codehaus/groovy/groovy-backports-compat23/2.4.4/groovy-backports-compat23-2.4.4.jar
Download https://plugins.gradle.org/m2/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar
Download https://plugins.gradle.org/m2/org/apache/ant/ant-launcher/1.9.4/ant-launcher-1.9.4.jar
:compileJava
Download http://first.wpi.edu/FRC/roborio/maven/release/edu/wpi/first/wpilib/networktables/java/NetworkTables/3.1.7/NetworkTables-3.1.7.pom
Download http://first.wpi.edu/FRC/roborio/maven/release/edu/wpi/cscore/java/cscore/1.0.2/cscore-1.0.2.pom
Download http://first.wpi.edu/FRC/roborio/maven/release/org/opencv/opencv-java/3.2.0/opencv-java-3.2.0.pom
Download http://first.wpi.edu/FRC/roborio/maven/release/edu/wpi/first/wpilib/networktables/java/NetworkTables/3.1.7/NetworkTables-3.1.7-armhf.jar
Download http://first.wpi.edu/FRC/roborio/maven/release/edu/wpi/cscore/java/cscore/1.0.2/cscore-1.0.2-armhf.jar
Download http://first.wpi.edu/FRC/roborio/maven/release/org/opencv/opencv-java/3.2.0/opencv-java-3.2.0.jar
:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Could not find tools.jar. Please check that C:\Program Files\Java\jdk1.8.0_161b contains a valid JDK installation.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 19.359 secs
Then, since i saw that the "tools.jar" was missing, i copied it from my jdk1.8.0_161 folder to the jdk1.8.0_161b folder and tries again, and i got this:

Code:
C:\Users\Administrator\Downloads\VisionBuildSamples-1.0.0\VisionBuildSamples-1.0.0\Java>gradlew build
:compileJava
:processResources UP-TO-DATE
:classes
:jar
:startScripts
:downloadOpenCv
Download http://first.wpi.edu/FRC/roborio/maven/release/org/opencv/opencv-jni/3.2.0/opencv-jni-3.2.0.pom
:downloadOpenCv FAILED

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Users\Administrator\Downloads\VisionBuildSamples-1.0.0\VisionBuildSamples-1.0.0\Java\dependencies.gradle' line: 58

* What went wrong:
Execution failed for task ':downloadOpenCv'.
> Could not resolve all files for configuration ':detachedConfiguration1'.
   > Could not find opencv-jni-linux-armhf.jar (org.opencv:opencv-jni:3.2.0).
     Searched in the following locations:
         http://first.wpi.edu/FRC/roborio/maven/release/org/opencv/opencv-jni/3.2.0/opencv-jni-3.2.0-linux-armhf.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 8.014 secs

C:\Users\Administrator\Downloads\VisionBuildSamples-1.0.0\VisionBuildSamples-1.0.0\Java>
It looks like it cant find the opencv. That is the same problem i have been having on the jetson as well so this is not a windows thing. My second question is where in that gradle folder should i put the GRIP generated code?
Reply With Quote
  #6   Spotlight this post!  
Unread 10-22-2018, 07:02 AM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 705
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Running Grip Pipeline On Jetson TX1

Hmmmm.

I'm always a bit cautious about copying installed binaries between folders - in general a program assumes it has a full set of files it was installed with. If one thing is missing, usually it means multiple things are too, and subsequent failures may not be as obvious as the one you saw. However, presuming that JDK install is functional...

The final failure points to "downloadOpenCv FAILED" and includes a URL. Were you able to access that URL from your browser? (I could). No firewall blocking the download? What is the nature of that step that's failing - based on the name I tend to guess its "Download the file from the internet to the local PC before building with it", but that's just a guess...
Reply With Quote
  #7   Spotlight this post!  
Unread 10-23-2018, 04:24 PM
cameron009 cameron009 is offline
Registered User
FRC #2594 (NASKCOrpions)
Team Role: Leadership
 
Join Date: Jun 2018
Rookie Year: 2017
Location: Nampa ID
Posts: 5
cameron009 is an unknown quantity at this point
Re: Running Grip Pipeline On Jetson TX1

The final failure points to "downloadOpenCv FAILED" and includes a URL. Were you able to access that URL from your browser? (I could)..[/quote]

I could not. To me it was a broken link. I was at my school so that could have been a problem, but i doubt they would block something like that. I will have to do some more playing with it. I re-flashed the Jetson and we will try again.
Reply With Quote
  #8   Spotlight this post!  
Unread 10-24-2018, 02:35 AM
Thad House Thad House is offline
Volunteer, WPILib Contributor
no team (Waiting for 2021)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2010
Location: Thousand Oaks, California
Posts: 1,251
Thad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond reputeThad House has a reputation beyond repute
Re: Running Grip Pipeline On Jetson TX1

That vision sample you are trying never was compiled for the TX1, so fixing the download issue still wouldn't work.

If you want to run vision on the TX1 with network tables you will need to compile everything on the device. The allwpilib repo has a cmake build and some cmake documentation on how to do this. That will get you the libraries for the TX1.
__________________
All statements made are my own and not the feelings of any of my affiliated teams.
Teams 1510 and 2898 - Student 2010-2012
Team 4488 - Mentor 2013-2016
Co-developer of RobotDotNet, a .NET port of the WPILib.
Reply With Quote
  #9   Spotlight this post!  
Unread 11-02-2018, 09:58 AM
itsmechuckb itsmechuckb is offline
Registered User
FRC #0997
 
Join Date: Oct 2018
Location: Corvallis, OR
Posts: 7
itsmechuckb is a glorious beacon of lightitsmechuckb is a glorious beacon of lightitsmechuckb is a glorious beacon of lightitsmechuckb is a glorious beacon of lightitsmechuckb is a glorious beacon of lightitsmechuckb is a glorious beacon of light
Re: Running Grip Pipeline On Jetson TX1

I do not believe WPI has compiled opencv V3.2.0 for arm and has it available on their Maven site.

If you look in WPI Opencv 3.2.0 Maven I do not see an arm version.Switch your opencv version to 3.1.0 and it should work. Don't forget to change your
Code:
System.loadLibrary
statement if it is hardcoded.

Also, running the GRIP pipeline on the Jetson will not take advantage of the GPUs by default. IMHO, you are better off using the Raspberry Pi at this point until someone takes on the GPU task (not easy).

I have code and a bunch of videos if you are interested. See Spartan Robotics Youtube Channel
Reply With Quote
  #10   Spotlight this post!  
Unread 11-02-2018, 10:45 AM
marshall's Avatar
marshall marshall is offline
Online Stripe & Drape Sales
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 3,012
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Running Grip Pipeline On Jetson TX1

Quote:
Originally Posted by itsmechuckb View Post
Also, running the GRIP pipeline on the Jetson will not take advantage of the GPUs by default. IMHO, you are better off using the Raspberry Pi at this point until someone takes on the GPU task (not easy).
Not necessarily, the CPUs on the TX1 run circles around the rPi so if you need the speed then it can help regardless. That being said, the GPU offload can offer a substantial performance increase if you're willing to put in the time to translate the code and move bits around - it's not a straightforward task though.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:07 AM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi