Go to Post We are different, but in our differences we help the world continue to grow, change, become inspired. Different is NOT bad. Be true to your self, be weird, be dorky, be crazy, be a geek. :) - chellyzee93 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
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 21-01-2015, 21:59
aaronbae aaronbae is offline
Registered User
FRC #4911
 
Join Date: Jan 2014
Location: Washington
Posts: 1
aaronbae is an unknown quantity at this point
Eclipse IMU Java Library Import

Our team have been looking to use the Nav6 IMU from Kauai Labs. For the past few weeks, we were able to download the nav6.jar file from this website:

https://code.google.com/p/nav6/

However, whenever we compile the project, an error stating that the package does not exist.

e.g) error: package com.kauailabs.nav6.frc does not exist
[javac] import com.kauailabs.nav6.frc.IMUAdvanced;

We followed the steps provided here:

https://code.google.com/p/nav6/wiki/Java

Has anyone been able to successfully deploy the code in Java?

Team 4911
Cyber Knights
Software Team
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2015, 23:25
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,572
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Eclipse IMU Java Library Import

It sounds like you are following the cRIO directions and code and not the roboRIO.
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2015, 22:26
JABianchi's Avatar
JABianchi JABianchi is offline
Registered User
FRC #1660 (Harlem Knights)
Team Role: Coach
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Harlem, NY
Posts: 19
JABianchi is on a distinguished road
Re: Eclipse IMU Java Library Import

Quote:
Originally Posted by aaronbae View Post
Our team have been looking to use the Nav6 IMU from Kauai Labs. For the past few weeks, we were able to download the nav6.jar file from this website:

https://code.google.com/p/nav6/

However, whenever we compile the project, an error stating that the package does not exist.

e.g) error: package com.kauailabs.nav6.frc does not exist
[javac] import com.kauailabs.nav6.frc.IMUAdvanced;

We followed the steps provided here:

https://code.google.com/p/nav6/wiki/Java

Has anyone been able to successfully deploy the code in Java?

Team 4911
Cyber Knights
Software Team
Quote:
Originally Posted by Joe Ross View Post
It sounds like you are following the cRIO directions and code and not the roboRIO.
We were having the same exact issue, which I think stems from an unfamiliarity with Eclipse (which we are using at FIRST's urging this year), and unfamiliarity with the nav6.

Certainly, we are a little underwhelmed with the navX documentation for anything 2015 (RoboRio, navX MXP, etc.)

There are no directions for RoboRio (only cRio), and even the "Readme.txt" file inside the zipped nav6 folder does not talk about the 2015 system. Hopefully these can be updated?

First Attempt:
We tried to get the nav6 library to show up in our project under "Referenced Libraries" alongside "wpilib" and "networktables". The nav6.jar file showed up and the IDE even seemed to be happy when we typed in classes from the nav6 library. However, the classes "did not exist" when we tried to build.

Second Attempt:
If you open up the sample project in Eclipse, you'll notice that the nav6 library does not show up in "Referenced Libraries", but shows 2 extra "packages" (the orange coordinate picture) alongside the main project in the "src" folder.

You can copy those 2 packages from the nav6SimpleRobotExample and place them in your team's project's src folder as well:
OPTION 1: In Eclipse, if you have the sample code project open, you can right-click copy each and paste them in the src folder for your team's project.

OPTION 2: In a Windows explorer, you can copy the "com" folder that you got from the downloaded folder (nav6\roborio\java\nav6SimpleRobotExample\src) and paste this folder inside your team's project workspace "src" folder. In Eclipse, click "File" --> "Refresh" in order to see the packages show up in your project.

Note: We haven't been able to fully test this solution yet, but hopefully we'll be able to see some beautiful gyro values tomorrow!
This setup doesn't seem to be the most intuitive to me, but I'd love to know if anyone with more programming experience knows why this would make a difference? (Is it simply easier to keep the libraries with the project if you are using a repository like github?)
Reply With Quote
  #4   Spotlight this post!  
Unread 01-12-2015, 19:28
lethc's Avatar
lethc lethc is offline
#gkccurse
AKA: Becker Lethcoe
FRC #1806 (S.W.A.T.)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2013
Location: Smithville, MO
Posts: 119
lethc will become famous soon enough
Re: Eclipse IMU Java Library Import

I'm currently reprogramming our 2015 robot in Java as an offseason project. I too was struggling with getting Eclipse to compile the code after adding the paths for the navX. I believe that I've found the problem. In their online instructions for setting up the navX, in your projects build.properties folder they tell you to set the thirdparty_library to ${user.home}/navx-mxp/java/lib/navx_frc.jar. This isn't where my jar was installed; it was copied directly to my C drive. Changing ${user.home} to C: fixed my problem.
__________________
2016: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Semifinalists, IRI Quarterfinalists
2015: Greater Kansas City Regional Finalists, Oklahoma Regional Winners, Tesla Quarterfinalists, IRI Winners
2014: Central Illinois Regional Quarterfinalists, Greater Kansas City Regional Finalists, Newton Semifinalists
2013: Greater Kansas City Regional Winners, Oklahoma Regional Winners, Galileo Quarterfinalists
Reply With Quote
  #5   Spotlight this post!  
Unread 02-12-2015, 18:56
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 350
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Eclipse IMU Java Library Import

Quote:
Originally Posted by JABianchi View Post
Certainly, we are a little underwhelmed with the navX documentation for anything 2015 (RoboRio, navX MXP, etc.)

There are no directions for RoboRio (only cRio), and even the "Readme.txt" file inside the zipped nav6 folder does not talk about the 2015 system. Hopefully these can be updated?
The nav6 is the older product designed for the CRio. The navX-MXP was specially-designed for the RoboRIO, and the navX-MXP documentation is very complete, but as you've found the nav6 situation is different. Because the nav6 documentation was hosted on Google Code (which is now shut down) and because our focus at KauaiLabs is navX-MXP, the nav6 documentation for RoboRIO is indeed minimal.

We're encouraging teams that can to use the navX-MXP, but understand if that's not realistic and will do our best to provide support for teams using the nav6 on the RoboRIO.

Quote:
Originally Posted by JABianchi View Post
You can copy those 2 packages from the nav6SimpleRobotExample and place them in your team's project's src folder as well:

This setup doesn't seem to be the most intuitive to me, but I'd love to know if anyone with more programming experience knows why this would make a difference? (Is it simply easier to keep the libraries with the project if you are using a repository like github?)
It's not trivial as one might hope to create a WPI Library-based Java Library and include it in a FRC Java Eclipse project. While a navX-MXP Java library is now available for the RoboRIO along w/installation instructions, a nav6 Java library is not available, so as you've found you need to add the nav6 sources directly to your project. If you have trouble doing that, please post the errors you are running into.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-12-2015, 18:59
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 350
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: Eclipse IMU Java Library Import

Quote:
Originally Posted by lethc View Post
I'm currently reprogramming our 2015 robot in Java as an offseason project. I too was struggling with getting Eclipse to compile the code after adding the paths for the navX. I believe that I've found the problem. In their online instructions for setting up the navX, in your projects build.properties folder they tell you to set the thirdparty_library to ${user.home}/navx-mxp/java/lib/navx_frc.jar. This isn't where my jar was installed; it was copied directly to my C drive. Changing ${user.home} to C: fixed my problem.
What you are describing is for the naX-MXP, whereas the original poster was referring to the nav6.

Haven't seen in our testing that the install for the navX-MXP puts the libraries in the root of the C: drive - but would like to figure out what's going on here. Can you please post which version of the navX-MXP software you are running? That information should be listed in the "add/remove programs list under navX-MXP....
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 11:52.

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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi