Go to Post 'We're back to square one! and while we're at it, let's redesign square one.' - Bethie42 [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 Rating: Thread Rating: 5 votes, 5.00 average. Display Modes
  #16   Spotlight this post!  
Unread 27-01-2013, 22:44
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

Good point.. I will make that change tomorrow and update the library
__________________

jRIO 2013 Project
Reply With Quote
  #17   Spotlight this post!  
Unread 28-01-2013, 07:05
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

Package names update:
jRIO
__________________

jRIO 2013 Project
Reply With Quote
  #18   Spotlight this post!  
Unread 31-01-2013, 18:37
Self.This() Self.This() is offline
Programmer From Beyond the 4th Wall
AKA: Trent Gamber
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Louisville
Posts: 4
Self.This() is an unknown quantity at this point
Re: jRIO

We are having trouble configuring the program. When we try to use the setRobotBase function using RobotTemplate like in the example, it throws an error saying it requires a RobotBase, but is finding a RobotTemplate. We believe that this is due to us copying the source files incorrectly, so we were wondering what the location we should copy the files to is?
__________________
Cro-grammer: Someone whose code is so unreadable, it might as well be a bunch of grunts.
Reply With Quote
  #19   Spotlight this post!  
Unread 01-02-2013, 08:23
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

Well for one, can you post what error you are getting?
Also, make sure your project doesn't use commandbased because that isn't supported yet.
I'll try to help best I can.

P.S. Make sure that you have the latest version of the library... i made a suggested change to make the imports match that of the existing wpi library to minimize work needed for prepping the jRIO simulator.
__________________

jRIO 2013 Project

Last edited by IisMathwizard : 01-02-2013 at 09:05.
Reply With Quote
  #20   Spotlight this post!  
Unread 01-02-2013, 09:28
java4first java4first is offline
(Java) Programming Mentor
AKA: Stu
FRC #0501 (Power Knights)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 2011
Location: Goffstown, NH
Posts: 62
java4first is an unknown quantity at this point
Re: jRIO

I think this is a great idea ... and have wanted to find the time to do something like this since I started mentoring (those darn hardware and controls guys are always late ;-) It's really hard to do this during the mad rush of build season. But I think this would be an ideal "off season" project that you could hopefully get lots of support from the teams during the summer and fall months ... it seems like there are enough potential users to easily accomplish this in great detail. It would help with keeping your programming skills active, and give more insight into robot programming.

Thank you for your starting / working this!
Reply With Quote
  #21   Spotlight this post!  
Unread 01-02-2013, 13:23
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

Well thank you very much for such kind words. I agree, this is probably best for off season but when there's a need there's a way and we needed to test code . It is a massive undertaking and I will definitely appreciate support from other teams for testing different configurations, suggestions, or even code help. Because of FIRST, I decided to major in computer science and have already become a professional developer for a company nearby so I feel that I should try to give back to the FIRST community as much as I can so that others may follow in my footsteps.
__________________

jRIO 2013 Project
Reply With Quote
  #22   Spotlight this post!  
Unread 01-02-2013, 13:32
Brian Selle's Avatar
Brian Selle Brian Selle is offline
Mentor
FRC #3310 (Black Hawk Robotics)
Team Role: Engineer
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Texas
Posts: 170
Brian Selle has a spectacular aura aboutBrian Selle has a spectacular aura aboutBrian Selle has a spectacular aura about
Re: jRIO

I'd REALLY like to see this come together. Teaching students to program on the actual hardware is not effective. We got a LabView simulator this year, but I hope FIRST/WPI will pick this up and get us a Java/C++ simulator for 2014.
Reply With Quote
  #23   Spotlight this post!  
Unread 02-02-2013, 11:54
Self.This() Self.This() is offline
Programmer From Beyond the 4th Wall
AKA: Trent Gamber
FRC #1245 (Shazbots)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2009
Location: Louisville
Posts: 4
Self.This() is an unknown quantity at this point
Re: jRIO

Here is the error that we get when we try to build it:
C:\Users\Shazbots Programming\Documents\NetBeansProjects\jRIO Code Emulation\src\jrio\code\emulation\JRIOCodeEmulatio n.java:29: setRobotBase(org.jRIO.RobotBase) in org.jRIO.mainframe.Main cannot be applied to (jrio.code.emulation.RobotTemplate)
Main.setRobotBase(new RobotTemplate());

We are using the latest library where you changed the imports and our RobotTemplate extends IterativeRobot, so we aren't using command based. Any ideas?
__________________
Cro-grammer: Someone whose code is so unreadable, it might as well be a bunch of grunts.
Reply With Quote
  #24   Spotlight this post!  
Unread 02-02-2013, 12:45
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

Okay! actually this error was cause by a mistake on my part and one of my programmers found this when he was trying to use it as well.. i apparently didn't update the jRIO jar file in the latest update.. please refer to this version of jRIO now... the issue was that it wasn't properly extending IterativeRobot/SimpleRobot etc because it wasn't looking for it in the right sourcepackage...
...Sorry about that :c
(NOTE... I just found another error with RobotDrive where the arcade drive method was accidently capitalized... I am fixing this now)

jRIO
__________________

jRIO 2013 Project

Last edited by IisMathwizard : 02-02-2013 at 12:51.
Reply With Quote
  #25   Spotlight this post!  
Unread 02-02-2013, 16:43
mlepard mlepard is offline
Registered User
FRC #4825
 
Join Date: Jan 2013
Location: Ottawa, Ontario
Posts: 5
mlepard is an unknown quantity at this point
Re: jRIO

Great Idea,

I'm trying to use it, but I'm pretty new to Java (usually use C++). I've setup a project in NetBeans and it is able to compile.

In the project libraries, I added the sunspotfrc/lib jar files to the compile & run libraries.

However, when I try and run I get an unsatisfied link error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: com.sun.squawk.VM.executeCIO(IIIIIIIIILjava/lang/Object;Ljava/lang/ObjectV
at com.sun.squawk.VM.executeCIO(Native Method)
at com.sun.squawk.VM.execSyncIO(VM.java:3441)
at com.sun.cldc.jna.Platform.getNativePlatformName(Pl atform.java:92)
at com.sun.cldc.jna.Platform.makePlatform(Platform.ja va:139)
at com.sun.cldc.jna.Platform.<clinit>(Platform.java:3 9)
at com.sun.squawk.platform.Platform.getPlatformName(P latform.java:59)
at com.sun.squawk.platform.Platform.getPlatformInstan ce(Platform.java:72)
at com.sun.squawk.platform.Platform.getGCFSockets(Pla tform.java:89)
at com.sun.squawk.io.j2me.socket.Protocol.<clinit>(Pr otocol.java:67)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at javax.microedition.io.Connector.openPrim(Connector .java:293)
at javax.microedition.io.Connector.open(Connector.jav a:238)
at javax.microedition.io.Connector.open(Connector.jav a:193)
at javax.microedition.io.Connector.open(Connector.jav a:177)
at edu.wpi.first.wpilibj.networktables2.stream.Socket ConnectionServerStreamProvider.<init>(SocketConnec tionServerStreamProvider.java:24)
at edu.wpi.first.wpilibj.networktables2.stream.Socket Streams.newStreamProvider(SocketStreams.java:30)
at edu.wpi.first.wpilibj.networktables.NetworkTableMo de$1.createNode(NetworkTableMode.java:26)
at edu.wpi.first.wpilibj.networktables.NetworkTable.i nitialize(NetworkTable.java:52)
at edu.wpi.first.wpilibj.networktables.NetworkTable.g etTable(NetworkTable.java:106)
at edu.wpi.first.wpilibj.livewindow.LiveWindow.<clini t>(LiveWindow.java:56)
at org.usfirst.frc4825.AshburySubsystemRobot.RobotMap .init(RobotMap.java:32)
at org.usfirst.frc4825.AshburySubsystemRobot.Robot.ro botInit(Robot.java:38)
at edu.wpi.first.wpilibj.IterativeRobot.startCompetit ion(IterativeRobot.java:54)
at org.jRIO.mainframe.Main.start(Main.java:45)
at robottestprogram.RobotTestProgram.main(RobotTestPr ogram.java:29)

Any thoughts?

Thanks,
Mike
Reply With Quote
  #26   Spotlight this post!  
Unread 03-02-2013, 20:55
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

did you actually added the sunspotfrc libraries?? you aren't supposed to actually do that.. create a new REGULAR java application (Java Desktop Application) and the only library that should be added is jRIO... after that copy your robot code from the FRC project to the new project with the jRIO library. Then apply the proper commands for cRIO configuration etc... etc... also... if you are using network tables, you might want to comment that part out.. i don't have network tables supported yet :/

I might release a video on how to do all of this for visual reference if any of you think that might be helpful. Tell me how it goes!
__________________

jRIO 2013 Project
Reply With Quote
  #27   Spotlight this post!  
Unread 03-02-2013, 21:02
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

Has anyone yet got jRIO to work for them?? I'm kinda becoming distraught when all the messages are about problems (not to say i don't want to see them because I want to help, trust me) >.<
__________________

jRIO 2013 Project
Reply With Quote
  #28   Spotlight this post!  
Unread 03-02-2013, 23:19
joelg236 joelg236 is offline
4334 Retired Mentor & Alumni
AKA: Joel Gallant
no team
Team Role: Mentor
 
Join Date: Dec 2011
Rookie Year: 2012
Location: Calgary
Posts: 733
joelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond reputejoelg236 has a reputation beyond repute
Re: jRIO

Quote:
Originally Posted by IisMathwizard View Post
Has anyone yet got jRIO to work for them?? I'm kinda becoming distraught when all the messages are about problems (not to say i don't want to see them because I want to help, trust me) >.<
Sorry, no. I've tried a few times; once with the first release another 2 times with the package name change. But there is way too many method names that were changed and methods that just aren't there in your library. It would take hours of my time to port it, and I just don't have that time right now. Maybe you can PM me after build season and we'll see if I can help you out. (I have a background in swing and API design)
__________________
All opinions are my own.
Reply With Quote
  #29   Spotlight this post!  
Unread 04-02-2013, 07:17
IisMathwizard's Avatar
IisMathwizard IisMathwizard is offline
Programming Mentor
AKA: Mathwizard
FRC #1248 (Titanium Allies)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2009
Location: Berea-Midpark High school
Posts: 60
IisMathwizard is an unknown quantity at this point
Re: jRIO

I don't believe that there were any method name changes however I am missing a lot of API because it is such a massive library and task to undertake by one's self... thank you! i will try to make this open source for after build season. I should've started this earlier :/ If you could, what API are you needing? I could immediately start to add that if you wish.
__________________

jRIO 2013 Project
Reply With Quote
  #30   Spotlight this post!  
Unread 04-02-2013, 07:39
mlepard mlepard is offline
Registered User
FRC #4825
 
Join Date: Jan 2013
Location: Ottawa, Ontario
Posts: 5
mlepard is an unknown quantity at this point
Re: jRIO

Sorry, I should have followed your instructions exactly ...but it was the end of a long day.

I'll try doing a direct copy of the files...we're a rookie team so we haven't strayed far from the basic command/subsystem robot paradigm (motor controllers, commands and SmartDashboard IO is all we've needed so far)..I'll try later today and seem if following instructions makes it work.

As I said, I'm relatively new to Java and Netbeans..but is there any way to reference our existing robot project, so that copying and pasting of the files doesn't have to be done?

I believe I sorted this out by adding another build option that packages everything into a JAR file...then referenced this JAR file in the Robot Test application. Thus any changes to the actual Robot Code can be seen in the Robot Test by activating the new build option...

This approach seemed to have fixed the reference issues in the Robot Test code...but I may have screwed something else up

While I tested this out, I did get the GUI to display...but very strange behaviour. The widgets were flashing...multiple motor controller outputs on one line. I'll see what I can get sorted out later today.

Thanks a lot for the effort of this, it's a brilliant idea. I'd really like to see the NetTables implemented so that the SmartDashboard can be used.
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:01.

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