Go to Post No, no, no, it's a fire game. The pool is there in case of accidents. - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 05-10-2007, 21:41
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
FIRST 2008 Robot Emulator

Rob Bayer's robot emulator has quirked my interest... Therefore, I am currently planning to make a robot emulator for post-2005 code! It will be written in Java, so when all is done, hopefully it will run in both Windows and Linux (as long as the code is compiled to .dll or .so on the appropriate OS). Just like Rob Bayer's emulator, I hope to minimize the amount of code to change within the original robot code so it can be compiled with and without the "code hack" files with no modifications necessary.

I have no clue if this emulator will work with EasyC or not since my team uses MPLab. I am absolutely certain that it will not be able to parse .ecp files. So it will not work with EasyC unless somebody figures out how to make EasyC export files to .c and .h so it can be compiled elsewhere and make it work in the end.

I don't expect this program to be finished in a few months, however. I hope to be done before the robot build or at least within a few weeks of the kickoff. I am planning to make the GUI first and then implement the actual emulating background. I should be able to release a GUI only version within the next month.

Hopefully, most of the "hack code" Rob Bayer made will work with the post-2005 controller code. I know it doesn't work at the moment without modifications due to the new serial port for the camera. It would be nice to know what kind of implementation I need to fake the serial port feedback and what else changed with the post-2005 controller.

A few special features that might be in the final program (if I figure out how to do them all): extensive documentation for adaptability (such as an extra method put in the main that is not in the default code), special variable watch window, and camera emulator. But the main emulation will be finished before these features are added.

I will consider other special features if suggested, but I doubt I will have the time for anything too extensive. Besides, this program will be obsoleted next year anyway when the controller system is changed, so my main focus will be to make it work with this year's code the way Rob's did with 2004 code.
__________________
Old stuff:

FRC 2007 Strategy Solver. Version: 2.55. Progress: done.

Last edited by ham90mack : 06-10-2007 at 16:28. Reason: add EasyC statement
  #2   Spotlight this post!  
Unread 05-10-2007, 21:44
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
FIRST 2008 Robot Emulator Progress

CURRENT PROGRESS
as of 10/5/07
  • Joystick implementation in GUI nearly finished.
  • More GUI components to come.
Version: Unreleased.

DOWNLOAD (link will be posted when it is avaliable)

Last edited by ham90mack : 05-10-2007 at 21:45. Reason: update
  #3   Spotlight this post!  
Unread 06-10-2007, 22:25
Branden Ghena's Avatar
Branden Ghena Branden Ghena is offline
Previously: tawnos23
FRC #0240 (TEMPEST)
Team Role: College Student
 
Join Date: Nov 2005
Rookie Year: 2004
Location: Houghton, Michigan (MTU)
Posts: 303
Branden Ghena has a spectacular aura aboutBranden Ghena has a spectacular aura aboutBranden Ghena has a spectacular aura about
Re: FIRST 2008 Robot Emulator

Would your emulator have to take the .c and .h files?

If it instead ran on the compiled .asm files it would probably work with both EasyC and MPLab. Although I am far from certain, the compiled files from EasyC must be similar if not the same as MPLab's because both work in the robot.

By the way, great project. I hope it works out.
__________________
Branden Ghena - Michigan Tech Student and Team 240 Alumnus
Working Towards: Electrical Engineering and Computer Engineering Double Major

"All we have to decide is what to do with the time that is given to us." - Gandalf
  #4   Spotlight this post!  
Unread 07-10-2007, 13:24
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
Re: FIRST 2008 Robot Emulator

Well, if the .asm files could be combined with the .c and .h files required for the hack and compiled into a .dll, then it might work. My emulator will work similar to Rob Bayer's design, except it will work with post-2005 code. Check out his emulator and see if you can figure out how to combine it with EasyC code. If nobody can figure out how to do this, I can't help.

In a PM with me, SamSofa330 said:
Quote:
YOu can get the .c and .h files from EasyC and compile it differently using mcc18
But the real question is, can it be compiled with MinGW or something similar? The only way to find out is to compare the MPLab code with the extracted EasyC code.

I wonder how many teams use MPLab verses EasyC verses WPILib...
__________________
Old stuff:

FRC 2007 Strategy Solver. Version: 2.55. Progress: done.
  #5   Spotlight this post!  
Unread 07-10-2007, 20:06
Tom Bottiglieri Tom Bottiglieri is offline
Registered User
FRC #0254 (The Cheesy Poofs)
Team Role: Engineer
 
Join Date: Jan 2004
Rookie Year: 2003
Location: San Francisco, CA
Posts: 3,187
Tom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond reputeTom Bottiglieri has a reputation beyond repute
Re: FIRST 2008 Robot Emulator

Quote:
Originally Posted by ham90mack View Post
But the real question is, can it be compiled with MinGW or something similar? The only way to find out is to compare the MPLab code with the extracted EasyC code.

I wonder how many teams use MPLab verses EasyC verses WPILib...
It's all the same stuff.. EasyC is just an abstraction layer for WPILib, and WPILib is just an abstraction layer for the low level stuff. Either way, it all boils down to the communication between the uP and mP, and what all of your low level outputs and inputs are.
  #6   Spotlight this post!  
Unread 07-10-2007, 21:06
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
Re: FIRST 2008 Robot Emulator

Quote:
Originally Posted by Tom Bottiglieri View Post
It's all the same stuff.. EasyC is just an abstraction layer for WPILib, and WPILib is just an abstraction layer for the low level stuff. Either way, it all boils down to the communication between the uP and mP, and what all of your low level outputs and inputs are.
Well, that means I probably cannot emulate WPILib or EasyC unless I get source for the libraries since creating the emulator requires overriding the low level outputs and inputs. It appears that the way Rob Bayer's emulator works is to modify the headers of two .c files that use low level I/O stuff so it uses the "hacked" I/O overrides instead when compiled with that code. Then running the main becomes a breeze since the variables are just stored in the PC memory. The hacked I/O files may even redirect back to the emulator. Of course, I have yet to understand how the hacks are actually carried out, but I will learn in due time. Besides, I need to make one for the serial port eventually...
__________________
Old stuff:

FRC 2007 Strategy Solver. Version: 2.55. Progress: done.
  #7   Spotlight this post!  
Unread 09-10-2007, 17:10
ham90mack's Avatar
ham90mack ham90mack is offline
President of RIT FIRST
FRC #0073 (The Illumination)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Rochester, NY
Posts: 120
ham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really niceham90mack is just really nice
Re: FIRST 2008 Robot Emulator

Well, it seems that I am not allowed to edit my status post above... I didn't know that...

I have added the menu bar to the GUI now. Once I get the switches, analog inputs, and the PWM outputs added to the GUI, I should probably be able to release it for everyone to see. Hopefully this will be done some time next week, assuming nothing huge gets in the way.

I have been thinking of another feature: input recording and playback. This way, the input could be recorded step by step and tested on the robot code many times. It might be a bit easier to test with something like this since the inputs will always be the same, but the outputs would change with the changes in the code.
__________________
Old stuff:

FRC 2007 Strategy Solver. Version: 2.55. Progress: done.
Closed Thread


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
FIRST 2008 Scholarships? Pavan Dave General Forum 3 06-11-2007 16:54
**FIRST EMAIL**/Get Ready for 2008 FRC Event Registration! Mark McLeod FIRST E-Mail Blast Archive 0 12-09-2007 14:35
FIRST Team 1444 Site Design for 2008 Compnerd Website Design/Showcase 13 25-03-2007 23:55
Code Emulator Mike Programming 2 05-04-2005 03:15
robot control emulator for default or other program CharlieWilken Programming 26 24-02-2002 02:36


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

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