![]() |
jRIO
I was wondering... are there any teams using Java that are currently afflicted with the trouble of having to wait for the manufacturing or electrical team to finish with putting on appropriate motors, relays, camera, mounts, etc? Well I have your solution! Hopefully (a common phrase in release stage) I will post up a library to use that allow one to simulate the cRIO and all common hardware including live camera and still image support for public use. I decided that since I am in this waiting stage I might as well show coopertition and gracious professionalism and help out my fellow teammates... I'll put up screenshots soon of jRIO running a version of our current robot code.. what you will see, camera support isn't finished but joysticks, relays, all speedcontrollers, and robot framework is finished. Autonomous, teleop, and disabled modes supported and the cRIO updates at the documented rate of 50hz... anyway... Look for it tonight! (like 2 EST tomorrow lol)
|
Re: jRIO
Here's a poorly captured screenshot... thanks linux...
![]() |
Re: jRIO
If this ends up being less buggy than other solutions (not to mention better supported), this will make me very happy.
|
Re: jRIO
I'd love this too, if you get it up and it works! Looking forward to the release
|
Re: jRIO
We're plagued by this every year. I look forward to trying the simulator.
|
Re: jRIO
I shall be making documentation on how to implement the library for testing code. Remember that this is just to test the expected hardware output, physical resistance due to slope, design, gearboxes, etc. are not taken into account.
|
Re: jRIO
I would also like to note that most of the API of each of the currently included classes are included... It is quite an endeavor and I have been working on it in my spare time for about a week now attempting to preserve the original code design of the FRC java API. If a team needs a certain method to be included or class or something like that, please shoot a message here and I will be more than happy to include it into the project for release. I do plan on keeping this alive for future years :)
|
Re: jRIO
Well.... I'm tired xD so tomorrow, at our meeting I'll work on it and hopefully have the simulator minus camera support by the end of the day. Sorry! (Deadlines... am I right?)
|
Re: jRIO
Quote:
|
Re: jRIO
Okay! I have the solenoid class left to make and then some minor documentation for people's use then I will put the library up for use!... this does not include camera support and unfortunately I did NOT include command based robots in here... yet.. only iterative and simple robot types are supported at the moment.
|
Re: jRIO
Alrightie! I have finished with the library! (excluding camera and command based robot support).. Now all i have to do is right some preliminary documentation..
|
Re: jRIO
Within the next 2 hours I will finally post the Library jar file and documentation on how to use the library, right here! I had work so I didn't have a lot of time to write this documentation but it should suffice.. If you have any questions I will be up working on the next update for the library, Realistic pressure sensing and CAMERA SUPPORT W00T
|
Re: jRIO
Here.... we.... go!
https://docs.google.com/file/d/0B3mO...owSU5LNU0/edit just download this zip file and inside is the jRIO.jar file and the documentation in .html and .odt file formats... (i run linux so i included the odt just in case anyone else would appreciate it) |
Re: jRIO
I wish that teams that try this out please give some feedback as to some suggestions or changes they would like to see...
What changes are already on their way?
Please inform me of some other things you want! |
Re: jRIO
Is there any reason this is necessary?
Quote:
|
Re: jRIO
Good point.. I will make that change tomorrow and update the library
|
Re: jRIO
Package names update:
jRIO |
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?
|
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. |
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! |
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. :)
|
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.
|
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? |
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 |
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/Object;)V 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 |
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! |
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) >.<
|
Re: jRIO
Quote:
|
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.
|
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. |
Re: jRIO
Hmmm are motor controller rendering side by side?
I've found that if the motors are somehow instantiated in robotInit then lots of issues are easily fixed... after build season i will fix a lot of issues but we are currently pressed for time... I didn't realize how important the smart dashboard and nettables were to other teams as we don't normally use them. I will add that as soon as camera support is finalized. |
Re: jRIO
Has the link broken to this development? I cannot seem to find the code over at google docs.
I am very interested in trying this simulator out to aid in our development. Thanks |
Re: jRIO
Quote:
|
Re: jRIO
Love the idea, but still a lot of work needs to be done.
Smartdashboard imports causes errors (such as the Robot Preferences imports in your robots code) Also, Test mode should be an option in the Enabled drop down as well. GUI has a bit of work to be done, but over all I'm very excited to see someone taking the initiative! |
Re: jRIO
I'm liking this idea, I did a quick test run and had a few glitches when trying to get the joystick to properly adjust the motor controller outputs.
Exception in thread "main" java.lang.NullPointerException at org.jRIO.DashboardDisplay.DashboardDisplay.joystic kButtonGeneration(DashboardDisplay.java:929) at edu.wpi.first.wpilibj.Joystick.<init>(Joystick.jav a:59) at jriotest.RobotTemplate.<init>(RobotTemplate.java:3 2) at jriotest.JRIOtest.main(JRIOtest.java:28) Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.jRIO.DashboardDisplay.DashboardDisplay.jComboB ox1ActionPerformed(DashboardDisplay.java:823) at org.jRIO.DashboardDisplay.DashboardDisplay.access$ 300(DashboardDisplay.java:16) at org.jRIO.DashboardDisplay.DashboardDisplay$5.actio nPerformed(DashboardDisplay.java:173) at javax.swing.JComboBox.fireActionEvent(JComboBox.ja va:1240) at javax.swing.JComboBox.setSelectedItem(JComboBox.ja va:567) at javax.swing.JComboBox.setSelectedIndex(JComboBox.j ava:603) at javax.swing.plaf.basic.BasicComboPopup$Handler.mou seReleased(BasicComboPopup.java:831) at java.awt.AWTEventMulticaster.mouseReleased(AWTEven tMulticaster.java:273) at java.awt.Component.processMouseEvent(Component.jav a:6382) at javax.swing.JComponent.processMouseEvent(JComponen t.java:3275) at com.apple.laf.AquaComboBoxPopup$1.processMouseEven t(AquaComboBoxPopup.java:132) at java.awt.Component.processEvent(Component.java:614 7) at java.awt.Container.processEvent(Container.java:208 3) at java.awt.Component.dispatchEventImpl(Component.jav a:4744) at java.awt.Container.dispatchEventImpl(Container.jav a:2141) at java.awt.Component.dispatchEvent(Component.java:45 72) at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4619) at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4280) at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4210) at java.awt.Container.dispatchEventImpl(Container.jav a:2127) at java.awt.Window.dispatchEventImpl(Window.java:2489 ) at java.awt.Component.dispatchEvent(Component.java:45 72) at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:704) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:663) at java.awt.EventQueue$2.run(EventQueue.java:661) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$3.run(EventQueue.java:677) at java.awt.EventQueue$3.run(EventQueue.java:675) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java: 674) at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122) Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at org.jRIO.DashboardDisplay.DashboardDisplay.jToggle Button1MouseReleased(DashboardDisplay.java:780) at org.jRIO.DashboardDisplay.DashboardDisplay.access$ 400(DashboardDisplay.java:16) at org.jRIO.DashboardDisplay.DashboardDisplay$6.mouse Released(DashboardDisplay.java:180) at java.awt.AWTEventMulticaster.mouseReleased(AWTEven tMulticaster.java:273) at java.awt.Component.processMouseEvent(Component.jav a:6382) at javax.swing.JComponent.processMouseEvent(JComponen t.java:3275) at java.awt.Component.processEvent(Component.java:614 7) at java.awt.Container.processEvent(Container.java:208 3) at java.awt.Component.dispatchEventImpl(Component.jav a:4744) at java.awt.Container.dispatchEventImpl(Container.jav a:2141) at java.awt.Component.dispatchEvent(Component.java:45 72) at java.awt.LightweightDispatcher.retargetMouseEvent( Container.java:4619) at java.awt.LightweightDispatcher.processMouseEvent(C ontainer.java:4280) at java.awt.LightweightDispatcher.dispatchEvent(Conta iner.java:4210) at java.awt.Container.dispatchEventImpl(Container.jav a:2127) at java.awt.Window.dispatchEventImpl(Window.java:2489 ) at java.awt.Component.dispatchEvent(Component.java:45 72) at java.awt.EventQueue.dispatchEventImpl(EventQueue.j ava:704) at java.awt.EventQueue.access$400(EventQueue.java:82) at java.awt.EventQueue$2.run(EventQueue.java:663) at java.awt.EventQueue$2.run(EventQueue.java:661) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$3.run(EventQueue.java:677) at java.awt.EventQueue$3.run(EventQueue.java:675) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectio nPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java: 674) at java.awt.EventDispatchThread.pumpOneEventForFilter s(EventDispatchThread.java:296) at java.awt.EventDispatchThread.pumpEventsForFilter(E ventDispatchThread.java:211) at java.awt.EventDispatchThread.pumpEventsForHierarch y(EventDispatchThread.java:201) at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:196) at java.awt.EventDispatchThread.pumpEvents(EventDispa tchThread.java:188) at java.awt.EventDispatchThread.run(EventDispatchThre ad.java:122) I saw earlier in the thread someone posted about putting this in a Github, which is a great idea, it would be interesting to be able to look over your code, and it would be easier to keep track of updates and bugs. |
Re: jRIO
I tried to compile/run this using the main code from one of the standard projects. I followed the directions in the PDF, and removed the calls to the unsupported systems (specifically some Timer() calls).
When I run the program I get the following exception: Code:
Exception in thread "main" java.lang.NullPointerExceptionAny clues as to what is happening? Thanks |
Re: jRIO
Code:
run: |
Re: jRIO
I would also love to have this project be open.
I started doing something similar myself before the season started and just didn't get it done. Open this up to the community and we could have a real valuable tool! |
Re: jRIO
+1 to please open source the project, I've also been thinking of doing something similar and would be happy to help make 1 great solution.
In particular, we use the Command/Scheduler functionality in WPILib very heavily and that isn't currently available here. |
Re: jRIO
Where is JRIO?
I would really like to learn about this simulator but don't see it on Google. Regards, Dave Frederick |
Re: jRIO
Hello all....
I have been very busy since I was last a student on our FRC team. As some of you may know, being a college student is a lot of work especially when you have to work 40+ hours a week. At any rate, that time of the year is coming up when teams are scrambling about to prepare for the 6 weeks of stress, robots, and bonding ahead of them and I happened to check on chiefdelphi. I am happy to note that my current side project is being haulted as of today and the jRIO project is starting back up. This time, jRIO 2013-2014 edition will hopefully not be so buggy and will, with community support this time, include command based programming. The project is on github right now however this edition is to be started completely from scratch. I will post when i have the first iteration up. Today, I will be designing the new architecture for this emulator and hopefully prevent the plentiful issues that many of you noted of the last edition. Happy programming! jRIO on GitHub jRIO news updates |
Re: jRIO
Quote:
Thanks. Jeff |
Re: jRIO
Hello Jeff,
That version is no longer maintained and I have removed it from the download location. Currently, jRIO 2014 edition is in the works and a preliminary version for simple and iterative based robotic projects has an intended release time of early November. If you are interested in helping please visit the project on GitHub. I could use someone to help program the command based section. At this time, however, i haven't even started on the GUI but i have a few preliminary designs in mind. Most of what i have is actually just framework stuff. Stay tuned to any major updates to the project at: IisMathwizard.com |
Re: jRIO
Is there any news on this project? I've downloaded the most reason version from GitHub but I can't seem to get it to work and the site is stuck on some sort of happy birthday thing? I'm not entirely sure what's going on with it.
|
| All times are GMT -5. The time now is 10:33. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi