Omnimaga
General Discussion => Technology and Development => Computer Projects and Ideas => Topic started by: epic7 on June 06, 2014, 09:48:54 pm
-
This year, my robotics team (FRC 2067) used a swerve drive, which uses 4 independently controlled modules to allow any combination of rotation and translation.
I recently made a simulator/game for this in Java.
Here are the controls:
(http://i.imgur.com/9rhMAIR.png)
*the harvester has to be down before you can shoot
Scoring in this game can be done by throwing the ball over the truss in the middle of the field, or shooting into the blue goal at the end of the field.
It's a bit buggy, like when interacting with other robots, but I figured I'll share what I have, since I haven't posted anything in such a long time
Here are the links:
Html5 version:
http://applepi.tk/swerve (http://applepi.tk/swerve)
Desktop, which supports USB controllers:
http://applepi.tk/swerve.jar (http://applepi.tk/swerve.jar)
Controller functionality tested on a Logitech Gamepad F310. Left stick for translation, right stick for rotation, LT and LB for harvester, RT for shoot, A for field centric, B for robot centric, D-pad for move rotation point, back for reset rotation point.
Tell me what you think :)
-
Okay, you're back. YAY!
now to start programming your 83+
As I said on chief delphi, I think you should Github the source. It would help a lot of people, as well as allow for contributions. Also: You should try your hand at a Java code simulator once the new control system comes out.
-
Yay Epic7 is back ! :D That robotics thingy sounds awesome. Do you have a video ?
-
Made collisions a bit less terrible, and added a menu that can be accessed with esc.
And here's one of our matches, with us the red robot labelled 2067, scoring for the alliance.
Despite being 2 on 3 with one of our robots dead, we won the match.
This is at the world championships in St Louis.
-
I feel like the HUD at the top of the arena should float around and follow the camera.
But maybe that's just my spoiled-ness talking :P
-
As I said on chief delphi, I think you should Github the source. It would help a lot of people, as well as allow for contributions. Also: You should try your hand at a Java code simulator once the new control system comes out.
Java, oh ouch. I wish java would go die in a hole somewhere. Python++!
-
You can't write FRC-legal code in Python :P
EDIT: 100 moar posts until I'm 1337!
-
FRC-legal ? ???
-
There are only 3 languages you are allowed to program FRC robots in: Java, C, and Labview.
-
Oh OK I guess they're too lazy to learn asm.
/me runs
-
Um, then use C, not Java.
-
Well, you can't program a cRIO-controlled robot in asm. There is no existing assembly language for the cRIO.
EDIT: :ninja: 'd
And flyingfisch, you don't have a choice. You program the robots in whatever your team says you program them in. For me, it's Java. For him, it's LabView. He also doesn't program C.
-
If there's a CPU, there's asm.
-
This is awesome epic7. Also I think juju participated in similar competitions before, but the robots seemed different in style.
-
If there's a CPU, there's asm.
As I said. There is no supported assembly language for the cRIO. There are no assemblers, and the processor is proprietary (National Instruments). You can't program it in asm, even if you wanted to.
-
Welp, reverse engineering compiler output. :P
Nah jk, it's not worth the trouble I guess.
-
You can't write FRC-legal code in Python :P
EDIT: 100 moar posts until I'm 1337!
You can. A project like robotpy is legal because the Python interpreter is C. You may or may not find a wizard at the match to help, but it's legal. A sister school of mine won a match on it and got into the last one of another. It runs perfectly fine. What's the difference between Java and a Java program that parses a text file written in a custom utility Turing-complete language and executes it live and a Python interpreter? Also, GCC for cRIO.
-
I never knew, so I'm sorry for saying that. I only know what FIRST says :P
-
It is confusingly worded if you don't look into it that much.