Go to Post You know how grandmothers get shirts that say "Ask me about my grandchildren"? I want one that says "Ask me about my robotics team." - MissInformation [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 14-01-2017, 12:51
PM_ME_UR_ROBOT PM_ME_UR_ROBOT is offline
Registered User
FRC #4206
 
Join Date: Sep 2016
Location: Texas
Posts: 7
PM_ME_UR_ROBOT is an unknown quantity at this point
CTRE CANTalon library installation not working

Hey everyone.

Due to the fact that WPI no longer supports the TalonSRX officially in their library, I went ahead and downloaded the CTR sponsored version and, because I'm on a Mac, I placed it into the folder I was instructed to place it in.

I went ahead and started Eclipse, and even though I had no errors importing the new class (com.ctre.CANTalon), the compile still failed when I tried to push the code onto the robot. I'll paste the error below, any help is appreciated.

compile:
[mkdir] Created dir: /Users/fitz/Documents/workspace/Tank Drive/build
[echo] [athena-compile] Compiling src with classpath=/Users/fitz/wpilib/java/current/lib/WPILib.jar:/Users/fitz/wpilib/java/current/lib/NetworkTables.jar:/Users/fitz/wpilib/java/current/lib/opencv.jar:/Users/fitz/wpilib/java/current/lib/cscore.jar to build
[javac] Compiling 1 source file to /Users/fitz/Documents/workspace/Tank Drive/build
[javac] /Users/fitz/Documents/workspace/Tank Drive/src/org/usfirst/frc/team4206/robot/Robot.java:3: error: package com.ctre does not exist
[javac] import com.ctre.CANTalon;
[javac] ^
[javac] /Users/fitz/Documents/workspace/Tank Drive/src/org/usfirst/frc/team4206/robot/Robot.java:27: error: cannot find symbol
[javac] CANTalon left, right, strafe;
[javac] ^
[javac] symbol: class CANTalon
[javac] location: class Robot
[javac] /Users/fitz/Documents/workspace/Tank Drive/src/org/usfirst/frc/team4206/robot/Robot.java:33: error: cannot find symbol
[javac] left = new CANTalon(1);
[javac] ^
[javac] symbol: class CANTalon
[javac] location: class Robot
[javac] /Users/fitz/Documents/workspace/Tank Drive/src/org/usfirst/frc/team4206/robot/Robot.java:34: error: cannot find symbol
[javac] right = new CANTalon(2);
[javac] ^
[javac] symbol: class CANTalon
[javac] location: class Robot
[javac] /Users/fitz/Documents/workspace/Tank Drive/src/org/usfirst/frc/team4206/robot/Robot.java:35: error: cannot find symbol
[javac] strafe = new CANTalon(3);
[javac] ^
[javac] symbol: class CANTalon
[javac] location: class Robot
[javac] 5 errors

BUILD FAILED
/Users/fitz/wpilib/java/current/ant/build.xml:92: Compile failed; see the compiler error output for details.

Total time: 1 second
Reply With Quote
  #2   Spotlight this post!  
Unread 14-01-2017, 13:33
PM_ME_UR_ROBOT PM_ME_UR_ROBOT is offline
Registered User
FRC #4206
 
Join Date: Sep 2016
Location: Texas
Posts: 7
PM_ME_UR_ROBOT is an unknown quantity at this point
Re: CTRE CANTalon library installation not working

Nevermind! The issue was resolved by installing instead to users/<USER>/wpilib/user/java/lib

We may have messed up and used the wrong installation path, but we're pretty sure CTR's tutorial for installing told us to do the wrong thing.

Either way, thanks to the guys in Discord for the help.
Reply With Quote
  #3   Spotlight this post!  
Unread 14-01-2017, 15:57
ashrutsood ashrutsood is offline
Registered User
AKA: Ashrut Sood
FRC #4930 (Electric Mayhem)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Buffalo, NY
Posts: 2
ashrutsood is an unknown quantity at this point
Re: CTRE CANTalon library installation not working

We found that the CTRE tutorial was outdated and it was best to use the example projects on Github as models (https://github.com/CrossTheRoadElec/FRC-Examples).

Following these instructions seemed to solve our build problem:
1: Download CTRE Toolsuite (No Installer) package 4.4.1.9 (.zip) from http://www.ctr-electronics.com/hro.h...ical_resources
2: Extract the downloaded Zip file.
3: Take the Java folder and Copy and Paste the entire folder into wpilib/user/
4: If you have any questions refer to the README in the root directory of the zipped folder.
Reply With Quote
  #4   Spotlight this post!  
Unread 14-01-2017, 16:02
ashrutsood ashrutsood is offline
Registered User
AKA: Ashrut Sood
FRC #4930 (Electric Mayhem)
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2014
Location: Buffalo, NY
Posts: 2
ashrutsood is an unknown quantity at this point
Re: CTRE CANTalon library installation not working

I added the post above just in case someone in the future stumbles upon this thread and has the same issue.
Reply With Quote
  #5   Spotlight this post!  
Unread 14-01-2017, 17:11
addis687 addis687 is offline
Registered User
no team (Team)
Team Role: Webmaster
 
Join Date: Jan 2016
Rookie Year: 1998
Location: Bellflower
Posts: 11
addis687 is an unknown quantity at this point
Re: CTRE CANTalon library installation not working

Hmm...interesting.... I seem to have the files in the correct place (checked with a teammate whose import worked without error). However, "com.ctre" cannot be resolved according to Eclipse. I wish the Talon software was still bundled with WPILIB
Reply With Quote
  #6   Spotlight this post!  
Unread 14-01-2017, 18:18
bdaroz's Avatar
bdaroz bdaroz is offline
Programming Mentor
AKA: Brian Rozmierski
FRC #5881 (TVHS Dragons)
Team Role: Mentor
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Albany, NY
Posts: 408
bdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud ofbdaroz has much to be proud of
Re: CTRE CANTalon library installation not working

If it's just eclipse's internal build throwing the error - and the ANT build step is not, check your classpath/libraries in Eclipse - the CTRE .jar files may not be included.
Reply With Quote
  #7   Spotlight this post!  
Unread 14-01-2017, 20:54
wjd13 wjd13 is offline
Registered User
FRC #4905 (Andromeda One)
Team Role: Programmer
 
Join Date: Mar 2015
Rookie Year: 2015
Location: Ayer, MA
Posts: 55
wjd13 is an unknown quantity at this point
Re: CTRE CANTalon library installation not working

Has anyone found any documentation/source code for the TalonSRX's?
Reply With Quote
  #8   Spotlight this post!  
Unread 14-01-2017, 21:58
Jacob C. Jacob C. is offline
Engineer at CTR Electronics
FRC #4130 (The Blue Devils)
Team Role: Mentor
 
Join Date: Nov 2009
Rookie Year: 2009
Location: Richmond, MI
Posts: 21
Jacob C. is a glorious beacon of lightJacob C. is a glorious beacon of lightJacob C. is a glorious beacon of lightJacob C. is a glorious beacon of lightJacob C. is a glorious beacon of light
Re: CTRE CANTalon library installation not working

Quote:
Originally Posted by wjd13 View Post
Has anyone found any documentation/source code for the TalonSRX's?
How to use the Talon SRX API is outlined in the Software Reference Manual. The API docs for the entire CTRLib (javadocs and doxygen for C++) are included in the latest install and can also be found on our website for Java and C++.


Quote:
Originally Posted by ashrutsood View Post
We found that the CTRE tutorial was outdated *snip*
Quote:
Originally Posted by PM_ME_UR_ROBOT View Post
*snip* but we're pretty sure CTR's tutorial for installing told us to do the wrong thing. *snip*
Can I ask what "tutorial" you guys were using? For the non-installer zip, we consider the README it contains to be the official instructions, and it says:

Quote:
Take the folder for your desired language (java or cpp) and place it into the wpilib user folder.
It then proceeds to give an example of the Linux path and more detailed information about the files contained. Is there another set of instructions you were following? I just want to make sure we don't have conflicting instructions somewhere.


Quote:
Originally Posted by addis687 View Post
Hmm...interesting.... I seem to have the files in the correct place (checked with a teammate whose import worked without error). However, "com.ctre" cannot be resolved according to Eclipse. I wish the Talon software was still bundled with WPILIB
This might seem trivial, but have you restarted Eclipse? It puts external libraries into the path when you first open it.
__________________
FiM Volunteer
Since 2015: Controls Mentor for FRC 4130, The Blue Devils (Richmond, MI)
2009-2014: FRC Team 1718, The Fighting Pi

Full Disclosure: I am an Engineer for CTR Electronics
Reply With Quote
  #9   Spotlight this post!  
Unread 22-01-2017, 15:49
gbonehead gbonehead is offline
Registered User
FRC #0571
 
Join Date: Jan 2012
Location: Windsor, CT
Posts: 2
gbonehead is an unknown quantity at this point
Re: CTRE CANTalon library installation not working

Quote:
Originally Posted by Jacob C. View Post
How to use the Talon SRX API is outlined in the Software Reference Manual. The API docs for the entire CTRLib (javadocs and doxygen for C++) are included in the latest install and can also be found on our website for Java and C++.
Any chance the Java code is available somewhere? We've been trying to reverse engineer how the code actually works based on the examples, but code is even better than reverse engineering :)

I'm guessing based on the distribution that the majority of the code is probably C++ code with a JNI wrapper, but every little bit helps.

Thanks!
Burt Smith
FRC 571 Team Paragon
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 13:15.

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