Go to Post When you are at the regional no one cares if you are a rookie. You are a part of the family. - scitecteach [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 06-02-2010, 16:37
dflaws dflaws is offline
Registered User
FRC #2425 (Hydra)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Tampa, FL
Posts: 6
dflaws is on a distinguished road
cRIO Emulator?

I am a first year programmer using java. I live a significant distance from where my team meets, so I cannot join them and test my code regularly. Does anyone know if there is a (preferably free) cRIO and digital sidecar emulator for a home pc?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-02-2010, 14:21
robotic321's Avatar
robotic321 robotic321 is offline
Registered User
FRC #1793
 
Join Date: Jan 2010
Location: Norfolk, VA
Posts: 24
robotic321 is an unknown quantity at this point
Exclamation Re: cRIO Emulator?

This would be nice, but i would like it so i can test on the Classmate. PLEASE REPLY!
__________________
=-=-=-=-=-=-=-=-=-=-=-=-=-=


1793 FTW
=-=-=-=-=-=-=-=-=-=-=-=-=-=
Reply With Quote
  #3   Spotlight this post!  
Unread 25-02-2010, 11:14
ericarseneau ericarseneau is offline
Registered User
no team
 
Join Date: Jan 2010
Location: San Diego
Posts: 30
ericarseneau is an unknown quantity at this point
Re: cRIO Emulator?

We are unaware of one. However, we test a lot with just a cRIO by itself. I know that it requires more budget to have more than one cRIO, but it does help to have it anyway. We plug in our cRIO using a wall wart power supply.

It would be cool to have an emulator, its just hard to figure out how to emulate all of the sensors, actuators and environments you would want to test your code in, sorry.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-03-2010, 03:49
spartango spartango is offline
Registered User
FRC #0192 (GRT)
Team Role: Alumni
 
Join Date: Nov 2009
Rookie Year: 2008
Location: Palo Alto, CA
Posts: 43
spartango is an unknown quantity at this point
Re: cRIO Emulator?

I've been hacking around this issue by using the SunSPOT emulator(runs squawk)...
Basically what I have is a copy of the GRTFramework(http://code.google.com/p/grtframework/), which wraps around all the WPILib stuff. The change I make is that the copy of the framework I use has been "neutered"...instead of actually calling WPILibJ, I update/read the state of a 'Robot' object that has GPIO and analog and PWM and so on.. its an emulation, but keep in mind that it doesnt simulate the actual hardware(no real sensors). I can simulate inputs but its not exactly pretty.
Reply With Quote
  #5   Spotlight this post!  
Unread 06-11-2010, 08:29
rickross rickross is offline
Registered User
AKA: Rick Ross
FRC #2055 (RoboForce)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Cary, NC
Posts: 5
rickross is an unknown quantity at this point
Send a message via AIM to rickross Send a message via MSN to rickross
Re: cRIO Emulator?

Quote:
Originally Posted by spartango View Post
I've been hacking around this issue by using the SunSPOT emulator(runs squawk)...
Basically what I have is a copy of the GRTFramework(http://code.google.com/p/grtframework/), which wraps around all the WPILib stuff. The change I make is that the copy of the framework I use has been "neutered"...instead of actually calling WPILibJ, I update/read the state of a 'Robot' object that has GPIO and analog and PWM and so on.. its an emulation, but keep in mind that it doesnt simulate the actual hardware(no real sensors). I can simulate inputs but its not exactly pretty.
Very cool project, spartango. I hope you'll keep working on this some more to make it a generic cRIO emulator. It could have a cool dashboard to show the state of the 'Robot' object, and possibly even get visual. It would help a ton of people.
Reply With Quote
  #6   Spotlight this post!  
Unread 18-11-2010, 15:13
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: cRIO Emulator?

I am a mentor for Team 11 and we've run into this problem as well.

We have more than a dozen students to teach to program in Java, some far more experienced than others in Java itself, and while we have multiple cRIO they are scattered in other robots and systems that don't lend themselves to the inexperienced writing code (too much risk of damage).

In the interim one of the team leaders and an increasing number of the more experienced students worked up emulation for the joystick and victors. It's rough, it's also very early stages.

However, basically you can create X and Y joystick input and feed it to virtual victors that display their percentage of pulse width in some windows.

It's very light on documentation right now and it'll take some effort to install it (it was tested with NetBeans), but I'll submit the link to forum for anyone that it might help.

http://code.google.com/p/frcjcss/

Eventually we hope to add some interesting features to this, but I don't want to pressure the students writing this too much right now. So until we get things a little more under control I'll let the students control the flow of effort at their pace.

Eventually I will say it would be possible to tweak this to produce virtual encoder feedback and even graph the various outputs versus time so that complicated processes like PID loops are a little more apparent. Something I think would be invaluable as last year one of our students spent a ton of time working up an entirely new and complicated PID style software for our robot and it's very hard to explain what it does and when without graphics.

Last edited by techhelpbb : 18-11-2010 at 15:22.
Reply With Quote
  #7   Spotlight this post!  
Unread 18-11-2010, 20:37
davidthefat davidthefat is offline
Alumni
AKA: David Yoon
FRC #0589 (Falkons)
Team Role: Alumni
 
Join Date: Jan 2011
Rookie Year: 2010
Location: California
Posts: 792
davidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud ofdavidthefat has much to be proud of
Re: cRIO Emulator?

Now I think a more practical solution is a code repository. You can code for the robot at your house then upload it to the repo, then a fellow coder with access of the robot can test out your code and sent a a bug report or even fix the bug for you. Because no matter how good of an emulator you have, it is just emulating, it will never behave exactly like a real robot will.
__________________
Do not say what can or cannot be done, but, instead, say what must be done for the task at hand must be accomplished.
Reply With Quote
  #8   Spotlight this post!  
Unread 18-11-2010, 21:52
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: cRIO Emulator?

David,

I think that the goal here is to let new programmers work out the simpler code, without risking breaking the hardware. Of course, you can't tune a PID loop on it and expect it to work the exact same on a real robot, or tune the drivetrain to feel nice to drive, but if a new programmer accidentally sets the bot to spin in circles infinitely by accident, that won't cause any problems in the simulation. Once the programmer and mentors feel comfortable with the programmer's abilities, the simulator won't have as much value (without a lot of work being put into it to making it accurate).

When I try out new controls algorithms, I like to simulate them myself before putting them on a real bot. And I know what I'm doing. Simulation helps cheaply catch simple bugs and generally has a faster test cycle than testing on a real robot.
Reply With Quote
  #9   Spotlight this post!  
Unread 19-11-2010, 00:12
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: cRIO Emulator?

The other problem with testing with the real cRIO is access.

Even if you can send code to a remote repository via HTTP or FTP, someone really has to be nearby to monitor the robot.

Even if you can monitor the robot with video and capture the control terminal's display and controls, what happens when the battery dies? Even if you can build a float charger to keep the batteries alive, someone really needs to be there to put a stop to things if they get out of hand.

Even as a veteran team we can't really expect someone to be available at all hours of the day and night for this purpose. We have sent whole robots home with people but obviously even a control system board with a few motors is not exactly something you want to haul all over with you.

Having an emulator like this allows people to tinker when they feel like without dragging resources of all types into it.

For now the educational advantage is that the students with the least fundamentals can use this whenever they have time and without any sort of major outside pressure.

The more advanced students programming this emulator get to learn the details of the control systems. Things like how the analog joysticks have noise and why that noise is there. After all, to make a decent simulation you want to simulate even the undesirable characteristics of the system.

In effect the more advanced students are challenging the other students who are reaching their level and teaching themselves in the process. The people using the emulator can in turn learn from the emulator the sort of subtle things that they can expect when programming the real thing.

Or course in the real world there will be additional sources of problems. Things like stuck actuators, impacts with objects, overheating speed controls, motors changing RPM on various surfaces in various directions, delays introduced by the wireless network, users smashing the joystick around, and batteries dropping dead. Hard to simulate some of that. However, that just means that after this level they are prepared with a solid foundation to chase that sort of quirk.

Additionally this provides a sort of proof of concept that is good in cooperative environments like ours where we have enough students for multiple divisions of labor. If there's doubt that a chuck of code isn't basically functional we can toss it into simulation and settle doubts.

Last edited by techhelpbb : 19-11-2010 at 00:27.
Reply With Quote
  #10   Spotlight this post!  
Unread 19-11-2010, 00:21
Alexa Stott's Avatar
Alexa Stott Alexa Stott is offline
All I do is twin.
AKA: elixir
FRC #0025 (Raider Robotix)
Team Role: College Student
 
Join Date: Oct 2005
Rookie Year: 2006
Location: No. Bruns., NJ/College Park, MD
Posts: 781
Alexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond reputeAlexa Stott has a reputation beyond repute
Send a message via AIM to Alexa Stott
Re: cRIO Emulator?

Quote:
Originally Posted by AustinSchuh View Post
David,

I think that the goal here is to let new programmers work out the simpler code, without risking breaking the hardware.
One word: e-stop. Seriously, you should never run your bot without it. If you see something going wrong, simply stop it.
__________________
|Email:alexastott[at]gmail.com|Facebook|@zelixir|Google+|
[University of Maryland Computer Science, Psychology]
[Brunswick Eruption]
Reply With Quote
  #11   Spotlight this post!  
Unread 19-11-2010, 00:58
techhelpbb's Avatar
techhelpbb techhelpbb is offline
Registered User
FRC #0011 (MORT - Team 11)
Team Role: Mentor
 
Join Date: Nov 2010
Rookie Year: 1997
Location: New Jersey
Posts: 1,622
techhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond reputetechhelpbb has a reputation beyond repute
Re: cRIO Emulator?

Quote:
Originally Posted by Alexa Stott View Post
One word: e-stop. Seriously, you should never run your bot without it. If you see something going wrong, simply stop it.
Sound advice in all automation. However, electronics can be damaged before you can slam the button and even the average human reaction time can be sufficient. Worse you may not notice the increasing temperatures of the speed controls as you're keeping your hands clear.

http://www.humanbenchmark.com/tests/...time/stats.php

We have some assemblies in which we have multiple motors mechanically linked and the speed controls can pay dearly from trivial programming errors.

Last edited by techhelpbb : 19-11-2010 at 01:05.
Reply With Quote
  #12   Spotlight this post!  
Unread 19-11-2010, 02:30
AustinSchuh AustinSchuh is offline
Registered User
FRC #0971 (Spartan Robotics) #254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 1999
Location: Los Altos, CA
Posts: 803
AustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond reputeAustinSchuh has a reputation beyond repute
Re: cRIO Emulator?

Quote:
Originally Posted by Alexa Stott View Post
One word: e-stop. Seriously, you should never run your bot without it. If you see something going wrong, simply stop it.
In 2007, we had an arm that moved at 20 RPM, driven by a CIM. I flipped a value (long night...) and it went for it, trying to slam through the ground. I had less than 1/2 of a second to hit the disable button before it would have slammed into the ground under full power. Had my hand not been on the controls and my trigger happy kill reflex on full at that point in time, we would have had a lot of repair work left to do.

So, while a kill switch helps, it is no magic bullet. I'm not sure I would want someone learning how to program with that arm, since I would have to be continually on the kill switch, ready for their next mistake. Putting them on a simulator until they were further along would make the experience a lot more enjoyable for both of us.
Reply With Quote
  #13   Spotlight this post!  
Unread 23-12-2010, 15:47
DaveFrederick's Avatar
DaveFrederick DaveFrederick is offline
Registered User
FRC #1895
 
Join Date: Jan 2009
Location: Manassas,VA
Posts: 37
DaveFrederick is a jewel in the roughDaveFrederick is a jewel in the roughDaveFrederick is a jewel in the rough
Re: cRIO Emulator?

I am very interested in the JAVA CRIO emulator.
Could I get a little guidance on how to get it working?

I have reviewed all of the data on the two web links:
http://code.google.com/p/grtframework/
http://code.google.com/p/frcjcss/

I have installed the plugin:
org-grtframework-grtframeworktemplate.nbm

I have unpacked and loaded the project: CurrentBot.zip

But I'm stuck and am not sure how to proceed.

Thanks in Advance,
Dave Frederick, Mentor Team 1895 - Manassas, Va
Reply With Quote
  #14   Spotlight this post!  
Unread 24-12-2010, 14:00
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: cRIO Emulator?

Quote:
Originally Posted by techhelpbb View Post
We have some assemblies in which we have multiple motors mechanically linked and the speed controls can pay dearly from trivial programming errors.
If you use Jaguars, they will save themselves. They measure current and case temperature to decide if they can continue driving the attached load.
Reply With Quote
  #15   Spotlight this post!  
Unread 28-12-2010, 11:17
bakketti bakketti is offline
Registered User
FRC #0443 (Freelance Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2009
Location: Denver, Co
Posts: 18
bakketti is an unknown quantity at this point
Re: cRIO Emulator?

Quote:
Originally Posted by DaveFrederick View Post
I have unpacked and loaded the project: CurrentBot.zip

But I'm stuck and am not sure how to proceed.
Dave- I just got it working the other week. I created a new Netbeans Java Application (not a FRC Java program) and named the project "Robot". This is the same name as the main project in CurrentBot.zip (check me on that name, I don't have my computer in front of me right now). Once you have a new project import all of the files from CurrentBot.zip into your project. You may have to mess with the files a little bit to get it work. After you import the files, you should be ready to go! Add some robot simulation code to the main() routine inside an infinite while loop and everything should work.

Note that this may not be the optimal setup. I'm not affiliated with the project and just messed with the files until I got it running.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Emulator Trouble dpeterson3 Java 9 17-08-2009 13:05
2008 O/I emulator? youngWilliam14 Programming 3 11-10-2008 15:09
vex emulator? xanarchyx Programming 1 29-09-2008 17:48
Code Emulator Mike Programming 2 05-04-2005 03:15


All times are GMT -5. The time now is 12:12.

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