Virtual cRIO (cRIO Emulator)

I have created a Virtual cRIO so you can test your robot code without having to wait for the mechanical and electrical teams to finish their jobs.

This is the first release so do not expect it to work flawlessly!

Download: http://www.mediafire.com/?wpwkpreo6hwjc16

Instructions:

  • Download the jar file and place onto desktop
  • Open netbeans (or other IDE)
  • If using netbeans either create a new robot project or use an existing project
  • Once your robot project is created right click on the project you just made and click properties
  • Click on Libraries, and remove the classes.jar library and add the Virtual cRIO.jar
  • Once the library is added make sure there are no errors with the class imports
  • Now you have to create a new file in the src folder by right clicking the src folder and New -> Other -> Other -> Empty file, name it main.txt
  • Now in that file put <PackageName>.<MainClass> but replace PackageName with the actual package name and the MainClass with the main class that extends SimpleRobot and then save the file
  • Now all you have to do is click the build icon (the one that looks like a hammer)
  • Now open Virtual cRIO.jar and click the Choose Jar button
  • Find your built robot project which is usually in your documents folder under netbeansprojects/<Project Name>/dist
  • And now you should be able to enable the cRIO!

If you are having any trouble or having any problems please be sure to leave a comment below so I may assist you!

Screenshot:

Where is “libraries” under the Project properties? I only have

General
Java Sources
Java Sources Classpath
Output
Build & Run
Formatting

(none that i can find contain classes.jar anywhere)

Awesome project! However, I’m running on ubuntu, java can’t find the main class to execute the software. Secondly, same issue as above. Can’t wait to use it once these issues are addressed!

After build season, I’d like to help with one of these projects. It seems nobody accounts for the squawk libraries, which astonishes me. Although this library is impressive for what it is, there is a whole lot more that needs to be made. If you really need to test it on your computer, you are probably using more obscure libraries, which these kinds of things just don’t do very well. Like I said, I’d love to help if its open source.

Right click on your project and click on properties. Sorry for not clarifying that.

I think the error here is that i compiled it with JRE 1.7 and you probably have JRE 1.6. Is the error something like this: “java.lang.NoClassDefFoundError” If so that is most definitely the issue.

Yep, running jre 1.6

So im guessing now its working??

Haven’t installed jre 1.7 to try

There will be network support in a later release and i might make it so the driver station will be able to connect to the virtual cRio!

thats what i did?

And you cant find a section thats named Libraries?

no. theres only

and as far as i can tell, none of them contain a “libraries”

Ok I have found the issue, you are using an older version of netbeans which looks like this:

http://i46.tinypic.com/d9piu.png

And the version of netbeans we are using looks like this:

http://i48.tinypic.com/2446sd3.jpg

Now all you have to do differently is go to Java Sources Classpath and do what I say in my original post!

Nope, im running JDK 1.7 and my “Java Sources Classpath” is much different than the one you have shown, it only contains 2 files for the wpilibj and networktables libraries.

Its not the version of the JDK that makes that difference its the version of netbeans and you should be able to remove those two jars and add the Virtual_cRIO.jar

Ok, ive done that, but when i hit the “Choose jar” file and go to my jar (which is in build/ not dist/) nothing happens.