Go to Post There's a stark difference between bragging and taking pride in your work. While "Ha ha! We're better than you! We won seventeen regionals and you didn't!" would clearly fall in the former, listing your achievements would definitely fall in the latter. - 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 25-11-2008, 01:13
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
Open GL Robot Simulator

I finally found and fixed the last major bug in my physics simulator, so here it is. I modeled static and kinetic friction, motor acceleration using the resistance and BEMF, and collisions between 6 wheel bots. It's a lot of fun to drift on the turns. For now, I just modeled collisions as just stopping the robot from moving when you hit something. In order to make it a bit more fun, I added in toroids, and the goal is to drive around and run over toroids to pick them up. I implemented a simple AI that you can race if you want. I also have Xbox joystick support working.

I've got it hosted in a SVN repository. To check it out from the command line, type
Code:
svn co https://svn.losaltosrobotics.org/physicsgame/trunk/
The simulator currently only works on Linux. The Linux specific parts are potentially just the OpenGL calls, and the signal handling code. I've probably made some assumptions somewhere in my code that make it run better on my machine than other machines (frame rates), so if I have, let me know and I can work on fixing that.

The code currently isn't all that clean. I would like to go back some time when I have free time (like that will ever happen) and make it so that it is easier to plug in different types of robots. Like set it up so that the structure that defines robots contains pointers to a physics function, a collision, and a joystick/keyboard function, and from there, you can define any type of robot. It would also be fun to implement WPILib like functions and classes for the bots, so that we can develop code for FRC.

If someone knows how to do a GTK and OpenGL application under Windows and would be willing to help me port that part of the application over to Windows, that would be awesome. I don't know how to develop under Windows. The GTK part probably mostly works out of the box, and probably very little of the OpenGL will need to be changed, but I don't even know where to start.

EDIT:
To drive the blue bot, use hjkl and ; for shifting. If the AI isn't running on the Red bot, you can drive it by using the arrow keys and space for shifting.

If you have any questions or suggestions, feel free to ask.

Last edited by AustinSchuh : 25-11-2008 at 02:11. Reason: Key sequences for driving.
  #2   Spotlight this post!  
Unread 25-11-2008, 01:39
willson.thomas willson.thomas is offline
Registered User
FRC #1595
 
Join Date: Feb 2008
Location: Spokane, WA
Posts: 50
willson.thomas is just really nicewillson.thomas is just really nicewillson.thomas is just really nicewillson.thomas is just really nicewillson.thomas is just really nice
Re: Linux Open GL Robot Simulator

I am checking it out now...

I am on OS X so it may or may not work. I will try!
__________________
Team Leader
Team 1595
  #3   Spotlight this post!  
Unread 25-11-2008, 01:57
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: Linux Open GL Robot Simulator

In case anyone runs into this issue while trying to get things working, I use the gtkglext package to get an OpenGL capable widget for GTK.
  #4   Spotlight this post!  
Unread 26-11-2008, 11:05
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: Open GL Robot Simulator

I just got a version to compile and run on Windows! I'll try to work out some timing related issues from my conversion from Unix Signals to less accurate GTK waits, figure out which DLLs it needs, and then push it to the server tonight.
  #5   Spotlight this post!  
Unread 29-11-2008, 03:03
Boydean's Avatar
Boydean Boydean is offline
The Blue Alliance
no team
Team Role: Alumni
 
Join Date: Apr 2007
Rookie Year: 2003
Location: SC
Posts: 319
Boydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant futureBoydean has a brilliant future
Send a message via AIM to Boydean
Re: Linux Open GL Robot Simulator

I would love to download it, but after checking on a bunch of different computers. It seems that the site is down. just fyi.
__________________
  #6   Spotlight this post!  
Unread 29-11-2008, 21:19
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: Linux Open GL Robot Simulator

Quote:
Originally Posted by Boydean View Post
I would love to download it, but after checking on a bunch of different computers. It seems that the site is down. just fyi.
Thanks for the heads up. Sorry about that. The guy who has the server in his garage lost power a couple of days ago and won't be back until Sunday to reboot it. Oh well. Such is life.

On the plus side, I ported it to run under Windows now. I'll update this thread when it gets back up and I can get my changes pushed back to the server. Since the compile process was a bit annoying and setting stuff up to get it compiled isn't trivial, I'll just check in the binaries that I created and the DLLs that are needed to support it (gtk and gtkglext)

If there are any moderators reading this, can you guys change the thread title to read "Linux and Windows Open GL Robot Simulator" since it is no longer Linux specific?
  #7   Spotlight this post!  
Unread 30-11-2008, 21:15
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: Linux Open GL Robot Simulator

The server is back up, and I now have a version that runs under Windows. Or at least it runs under my machine and 1 other machine, so it should run on any windows box. I don't know how to write code to get joysticks working under Windows, so it's a keyboard only simulator there. Patches are always welcome

The windows executable and supporting dll's are checked into the repository in a folder called windows. Check it out according to the instructions above, and then you should be able to just run it. A good svn client for windows is available at tortoisesvn.tigris.org .
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
Robot Simulator in LabView Jon236 FRC Control System 3 17-11-2008 22:56
pic: 234 - Cyber Blue Robot at our Open House Chris Fultz Extra Discussion 15 09-03-2007 21:54
pic: Team 1178 Robot - Ramp and Deck open Jake M Robot Showcase 0 01-03-2007 19:39
Robot Simulator Box K0r34nB0y Electrical 4 19-04-2004 20:16
Robot Controller Simulator MetalWorker Programming 3 04-02-2004 22:18


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

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