Go to Post You never know when the GDC will slide in a rule about any robot with a laser must do a laser light show on the floor of the field or face a 50-point penalty :p. - EricH [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 21-11-2004, 14:25
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
RoboEmu2(code simulator)--now with C!

Well, its only been a year since I said I was going to do this, but hey, better late than never, right?

Anyways, it's finally here (in at least pre-beta form): RoboEmu2 -- now with C! I've tested it with the default code and everything seems to work fine, but given that I haven't been involved with a team for 2 years now, that's about the only code I've tested it with.

Thus, as always, I'm asking for everybody's help: please download RoboEmu2 and try it with your code. If it doesn't work, please email me your code and any warnings/errors you get.

In any event: enjoy, comment, criticize, etc:
www.robbayer.com/re2.shtml

Edit: for those of you who don't know, RoboEmu is an emulator for the control system. Back in the days of PBASIC it was used as a way to quickly test new code and algorithms without needing an actual robot to play with. This new version marks the transition from PBASIC to C, thus supporting the new controllers.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php

Last edited by rbayer : 21-11-2004 at 14:38.
  #2   Spotlight this post!  
Unread 21-11-2004, 15:18
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,186
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: RoboEmu2(code simulator)--now with C!

Ert, i get the error "Failed to start because QTMTNC321.DLL was not found"

I googled the dll and couldnt find it anywhere.
  #3   Spotlight this post!  
Unread 21-11-2004, 15:20
Joshua May's Avatar
Joshua May Joshua May is offline
Go Bears!
FRC #1110 (Binary Bulldogs)
Team Role: College Student
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Berkeley, CA
Posts: 1,306
Joshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond repute
Send a message via AIM to Joshua May
Re: RoboEmu2(code simulator)--now with C!

Quote:
Originally Posted by Tom Bottiglieri
Ert, i get the error "Failed to start because QTMTNC321.DLL was not found"

I googled the dll and couldnt find it anywhere.
I got that same error as well.
__________________
The FIRST Wiki - openFIRST - Ultimate Robot Challenge - URC Wiki
I currently have 50 GMail invites, PM or email me for one.
UC Berkeley Class of 2009

2005 Las Vegas Regional Autodesk Visualization Award
2005 Las Vegas Regional #8 Seeded Alliance with 988 and 1505
2006 Southern California Regional #15 seed
  #4   Spotlight this post!  
Unread 21-11-2004, 15:25
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: RoboEmu2(code simulator)--now with C!

Quote:
Originally Posted by Tom Bottiglieri
Ert, i get the error "Failed to start because QTMTNC321.DLL was not found"

I googled the dll and couldnt find it anywhere.
ditto, but I did find something on google: http://www.google.com/search?q=qtmtnc321.dll&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-USfficial

Appears to be some library that is part of "Qt" which sounds like a tool that you might have used to compile this program.
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award

Last edited by Max Lobovsky : 21-11-2004 at 15:29.
  #5   Spotlight this post!  
Unread 21-11-2004, 15:42
nathanielreindl's Avatar
nathanielreindl nathanielreindl is offline
Triumphant Return from the Depths
AKA: Fiction
FRC #1451
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2003
Location: O'Fallon, IL
Posts: 14
nathanielreindl is an unknown quantity at this point
Send a message via ICQ to nathanielreindl Send a message via AIM to nathanielreindl Send a message via Yahoo to nathanielreindl
Re: RoboEmu2(code simulator)--now with C!

I compiled it from source on Fedora Core 3 against whatever version of kdelibs-devel (read: qt-devel) I happen to have, and it works just fine with the default code provided in the tarball.

When I get a moment or two, I'll make the necessary changes to our existing code and see what happens then.

Last edited by nathanielreindl : 21-11-2004 at 15:51.
  #6   Spotlight this post!  
Unread 21-11-2004, 16:36
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: RoboEmu2(code simulator)--now with C!

My bad... new version now uploaded. Grab it from the website.

-Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #7   Spotlight this post!  
Unread 21-11-2004, 17:25
Max Lobovsky's Avatar
Max Lobovsky Max Lobovsky is offline
Fold em oval!
FRC #1257 (Parallel Universe)
Team Role: College Student
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Scotch Plains, NJ
Posts: 1,026
Max Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant futureMax Lobovsky has a brilliant future
Send a message via AIM to Max Lobovsky
Re: RoboEmu2(code simulator)--now with C!

MiniGW doesn't understand the "short long" type that C18 accepts (24 bit signed integer). I will use long's temporarily, but I wonder if you could add something to the batch file that will convert types because incorrect variable sizes can definitley screw up code.
__________________
Learn, edit, inspire: The FIRSTwiki.
Team 1257


2005 NYC Regional - 2nd seed, Xerox Creativity Award, Autodesk Visualization Award
2005 Chesapeake Regional - Engineering Inspiration Award
2004 Chesapeake Regional - Rookie Inspiration award
2004 NJ Regional - Team Spirit Award

Last edited by Max Lobovsky : 21-11-2004 at 17:28.
  #8   Spotlight this post!  
Unread 21-11-2004, 17:29
Joel J's Avatar
Joel J Joel J is offline
do you..
no team
 
Join Date: May 2001
Rookie Year: 2000
Location: San Jose, CA
Posts: 1,445
Joel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond reputeJoel J has a reputation beyond repute
Re: RoboEmu2(code simulator)--now with C!

Quote:
Originally Posted by rbayer
Well, its only been a year since I said I was going to do this, but hey, better late than never, right?

Anyways, it's finally here (in at least pre-beta form): RoboEmu2 -- now with C! I've tested it with the default code and everything seems to work fine, but given that I haven't been involved with a team for 2 years now, that's about the only code I've tested it with.

Thus, as always, I'm asking for everybody's help: please download RoboEmu2 and try it with your code. If it doesn't work, please email me your code and any warnings/errors you get.

In any event: enjoy, comment, criticize, etc:
www.robbayer.com/re2.shtml

Edit: for those of you who don't know, RoboEmu is an emulator for the control system. Back in the days of PBASIC it was used as a way to quickly test new code and algorithms without needing an actual robot to play with. This new version marks the transition from PBASIC to C, thus supporting the new controllers.
Wonderful!
__________________
Joel Johnson

Division By Zero (229) Alumni, 2003-2007
RAGE (173) Alumni, 1999-2003
  #9   Spotlight this post!  
Unread 21-11-2004, 18:51
Stephen Kowski's Avatar
Stephen Kowski Stephen Kowski is offline
BSEE, MSEE, JD
AKA: employed
no team
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2000
Location: Saint Petersburg, FL
Posts: 1,144
Stephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond reputeStephen Kowski has a reputation beyond repute
Send a message via AIM to Stephen Kowski
Re: RoboEmu2(code simulator)--now with C!

cool stuff....
  #10   Spotlight this post!  
Unread 01-12-2004, 20:15
Venkatesh Venkatesh is offline
Registered User
FRC #0030
 
Join Date: Jan 2003
Rookie Year: 2002
Location: USA
Posts: 260
Venkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to beholdVenkatesh is a splendid one to behold
Re: RoboEmu2(code simulator)--now with C!

What kind of magic is behind this, namely how does it work?
__________________
-- vs, me@acm.jhu.edu
Mentor, Team 1719, 2007
Team 30, 2002-2005
  #11   Spotlight this post!  
Unread 01-12-2004, 20:34
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
Re: RoboEmu2(code simulator)--now with C!

Quote:
Originally Posted by Venkatesh
What kind of magic is behind this, namely how does it work?
Yes exactly how in depth is the emulation? What are known things that will not work? Is it strictly a C VM or are you doing any emulation at the processor level? I suppose you would have to to run the .lib files.
__________________
1139 Alumni

Last edited by Rickertsen2 : 01-12-2004 at 20:36.
  #12   Spotlight this post!  
Unread 05-12-2004, 18:42
Mike's Avatar
Mike Mike is offline
has common ground with Matt Krass
AKA: Mike Sorrenti
FRC #0237 (Sie-H2O-Bots (See-Hoe-Bots) [T.R.I.B.E.])
Team Role: Programmer
 
Join Date: Dec 2004
Rookie Year: 2004
Location: Watertown, CT
Posts: 1,003
Mike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond reputeMike has a reputation beyond repute
Re: RoboEmu2(code simulator)--now with C!

I get the errors
Code:
C:\mcc18\EduCode>C:\mingw\bin\mingw32-make.exe re2_win
gcc -o recore.dll -D_ROBOEMU -shared user_routines.c user_routines_fast.c re_hac
k.c re_core.c
In file included from user_routines.c:18:
printf_lib.h:15: warning: conflicting types for built-in function `printf'
user_routines.c: In function `User_Initialization':
user_routines.c:84: `TRISAbits' undeclared (first use in this function)
user_routines.c:84: (Each undeclared identifier is reported only once
user_routines.c:84: for each function it appears in.)
user_routines.c:96: `ADC_2ANA' undeclared (first use in this function)
user_routines.c:102: `TRISFbits' undeclared (first use in this function)
user_routines.c:111: `LATAbits' undeclared (first use in this function)
user_routines.c:112: `LATFbits' undeclared (first use in this function)
user_routines.c:113: `LATHbits' undeclared (first use in this function)
re_core.c: In function `update_outputs':
re_core.c:35: `pwm09' undeclared (first use in this function)
re_core.c:35: (Each undeclared identifier is reported only once
re_core.c:35: for each function it appears in.)
re_core.c:36: `pwm10' undeclared (first use in this function)
re_core.c:37: `pwm11' undeclared (first use in this function)
re_core.c:38: `pwm12' undeclared (first use in this function)
re_core.c:39: `pwm13' undeclared (first use in this function)
re_core.c:40: `pwm14' undeclared (first use in this function)
re_core.c:41: `pwm15' undeclared (first use in this function)
re_core.c:42: `pwm16' undeclared (first use in this function)
re_core.c:44: `relay1_fwd' undeclared (first use in this function)
re_core.c:45: `relay1_rev' undeclared (first use in this function)
re_core.c:46: `relay2_fwd' undeclared (first use in this function)
re_core.c:47: `relay2_rev' undeclared (first use in this function)
re_core.c:48: `relay3_fwd' undeclared (first use in this function)
re_core.c:49: `relay3_rev' undeclared (first use in this function)
re_core.c:50: `relay4_fwd' undeclared (first use in this function)
re_core.c:51: `relay4_rev' undeclared (first use in this function)
re_core.c:52: `relay5_fwd' undeclared (first use in this function)
re_core.c:53: `relay5_rev' undeclared (first use in this function)
re_core.c:54: `relay6_fwd' undeclared (first use in this function)
re_core.c:55: `relay6_rev' undeclared (first use in this function)
re_core.c:56: `relay7_fwd' undeclared (first use in this function)
re_core.c:57: `relay7_rev' undeclared (first use in this function)
re_core.c:58: `relay8_fwd' undeclared (first use in this function)
re_core.c:59: `relay8_rev' undeclared (first use in this function)
re_core.c: In function `update_inputs':
re_core.c:77: `p1_x' undeclared (first use in this function)
re_core.c:78: `p1_y' undeclared (first use in this function)
re_core.c:79: `p1_wheel' undeclared (first use in this function)
re_core.c:80: `p1_aux' undeclared (first use in this function)
re_core.c:81: `p1_sw_trig' undeclared (first use in this function)
re_core.c:82: `p1_sw_top' undeclared (first use in this function)
re_core.c:83: `p1_sw_aux1' undeclared (first use in this function)
re_core.c:84: `p1_sw_aux2' undeclared (first use in this function)
re_core.c:85: `p2_x' undeclared (first use in this function)
re_core.c:86: `p2_y' undeclared (first use in this function)
re_core.c:87: `p2_wheel' undeclared (first use in this function)
re_core.c:88: `p2_aux' undeclared (first use in this function)
re_core.c:89: `p2_sw_trig' undeclared (first use in this function)
re_core.c:90: `p2_sw_top' undeclared (first use in this function)
re_core.c:91: `p2_sw_aux1' undeclared (first use in this function)
re_core.c:92: `p2_sw_aux2' undeclared (first use in this function)
re_core.c:93: `p3_x' undeclared (first use in this function)
re_core.c:94: `p3_y' undeclared (first use in this function)
re_core.c:95: `p3_wheel' undeclared (first use in this function)
re_core.c:96: `p3_aux' undeclared (first use in this function)
re_core.c:97: `p3_sw_trig' undeclared (first use in this function)
re_core.c:98: `p3_sw_top' undeclared (first use in this function)
re_core.c:99: `p3_sw_aux1' undeclared (first use in this function)
re_core.c:100: `p3_sw_aux2' undeclared (first use in this function)
re_core.c:101: `p4_x' undeclared (first use in this function)
re_core.c:102: `p4_y' undeclared (first use in this function)
re_core.c:103: `p4_wheel' undeclared (first use in this function)
re_core.c:104: `p4_aux' undeclared (first use in this function)
re_core.c:105: `p4_sw_trig' undeclared (first use in this function)
re_core.c:106: `p4_sw_top' undeclared (first use in this function)
re_core.c:107: `p4_sw_aux1' undeclared (first use in this function)
re_core.c:108: `p4_sw_aux2' undeclared (first use in this function)
re_core.c:110: `PORTAbits' undeclared (first use in this function)
re_core.c:115: `PORTFbits' undeclared (first use in this function)
re_core.c:126: `rc_dig_in17' undeclared (first use in this function)
re_core.c:127: `rc_dig_in18' undeclared (first use in this function)
re_core.c:133: `competition_mode' undeclared (first use in this function)
C:\mingw\bin\mingw32-make.exe: *** [re2_win] Error 1

C:\mcc18\EduCode>pause
Press any key to continue . . .
Anybody else get this? =/
__________________
http://www.mikesorrenti.com/

Last edited by Mike : 05-12-2004 at 19:08.
  #13   Spotlight this post!  
Unread 05-12-2004, 22:31
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: RoboEmu2(code simulator)--now with C!

Quote:
Originally Posted by MikeWasHere05
I get the errors...
Are you getting this with the default code, or with code you're compiling yourself. If it's stuff you've made, make sure you #include "re_hack.h".

If that doesn't work, send me an email with your user_routines.c and I'll try to see what's wrong.

-Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #14   Spotlight this post!  
Unread 05-12-2004, 22:36
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: RoboEmu2(code simulator)--now with C!

Quote:
Originally Posted by Rickertsen2
Yes exactly how in depth is the emulation? What are known things that will not work? Is it strictly a C VM or are you doing any emulation at the processor level? I suppose you would have to to run the .lib files.
As of right now, timers and interrupts don't work and variables of type "short long" won't work. The timers and interrupts thing will be fixed at some point, but I'm really not sure about how to do 3-byte variables on x86.

As for how this thing works, it's actually quite simple. You compile your code into native Windows/Linux/etc as a dynamically loadable module (DLL's in Windows speak). This library file contains a few RE2-specific functions (from recore.c) that the main program uses to interface with your code. The driver program simply calls these functions once ever 26ms (for the slow-loop function) or whenever your computer has free cycles (for the fast-loop function). The majority of the work here is being done by gcc, so anything that's ANSI-C should compile. Whether or not it works as expected depends on whether you're using a PIC-specific feature (timers, interrupts, etc).

-Rob
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
  #15   Spotlight this post!  
Unread 15-12-2004, 20:35
doyler doyler is offline
Rookie / Programmer
#0900 (Infinity)
Team Role: Programmer
 
Join Date: Oct 2004
Rookie Year: 2005
Location: Durham
Posts: 87
doyler is an unknown quantity at this point
Re: RoboEmu2(code simulator)--now with C!

wow, that was awesome, thanks a lot
__________________
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


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

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