|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
simulator (now that the bot is shipped)
Is there any kind of simulator that one can use to try out some code now that the robots have shipped. (we still have the joysticks and operator controller)
Thanks |
|
#2
|
||||
|
||||
|
Re: simulator (now that the bot is shipped)
You can make your own simulator. With some finagling, it is possible to get the code from your robot to comile on a PC. You can then feed the program inputs and print out the outputs to see if they match what you want. If you want to get fancy, you can make your own GUI to simulate your whole OI and display outputs. This is what I have done so I can (theoretically) test all code before placing it on the robot and have confidence that it works.
Here is a pic: ![]() |
|
#3
|
|||||
|
|||||
|
Re: simulator (now that the bot is shipped)
that looks like a pretty cool program could you post it here for the not so much programmers
|
|
#4
|
||||
|
||||
|
Re: simulator (now that the bot is shipped)
Would you be so kind as to give us a hint on how to do that? Did you make that in visual basic? (i have that so i could do it!) If you posted that program entirely I would be forever in your debt. Thanks
-Dave -564.first@gmail.com |
|
#5
|
||||
|
||||
|
Re: simulator (now that the bot is shipped)
Quote:
First I modified the code until it would actually compile on my computer. To do this I put #ifdef COMPILE_FOR_ROBOT... #endif around much of the hardware specific code in the .c files such as ifi_startup.c. I then created a new file called PCCompile.c to contain my version of all the functions I removed using that method as well as functions in FRC_library.lib. I chose to create the GUI in a different program since I HATE writing GUIs in straight C using the windows API and I did not want the gui code mixed with the robot code. To communicate between the robot code and the GUI I used the window's clipboard. Now here's the clever part. I used my versions of GetData and PutData in PCCompile.c to facilitate the communication between the two programs. The robotcode currently sends txdata, and the relay values via the clipboard in PutData and receives rxdata and the digital inputs in GetData. I had to do several other things to make the code work and I'll probably write a whitepaper to explain this in more detail once I get enough time. Edit: Attached are the PCCompile.c and PCCompile.h files. This contains most of the code that makes the simulator work. Last edited by JJG13 : 08-03-2006 at 18:51. |
|
#6
|
|||
|
|||
|
Re: simulator (now that the bot is shipped)
this looks like a valuble resource for teams, could you please share your app?
|
|
#7
|
|||
|
|||
|
Re: simulator (now that the bot is shipped)
is that a real program JJG13? I think that just using last years board, for those who have it, is much simpler to run it through then emulating the whole control board system.
If that is a real simulator though, those are some interesting autonomous modes... |
|
#8
|
||||
|
||||
|
Re: simulator (now that the bot is shipped)
I think it is possible to use an older robot that you still have.
|
|
#9
|
||||
|
||||
|
Re: simulator (now that the bot is shipped)
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Bot repeated dying at Regionals. Can someone review the code? | kaszeta | Programming | 6 | 06-03-2006 15:55 |
| sphere bot | Veselin Kolev | Technical Discussion | 36 | 03-03-2005 00:03 |
| worst experience | mike pawlak | Chit-Chat | 15 | 06-12-2004 07:04 |
| Finally! Who has shipped? | Tom Bottiglieri | General Forum | 49 | 29-02-2004 20:32 |
| Multiple Regional Winners and a little jab | JamesJones | General Forum | 32 | 10-04-2002 23:38 |