Go to Post Fire and smoke are great if you're into Battlebots, but we like to avoid them in FIRST competitions. - [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #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.
 


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 00:06.

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