vokoscreenNG-2022-07-03_21-22-22.mp4
Made with Godot (mono version required with .Net SDK as well), all scripts are written in C# for similarity with Java.
https://godotengine.org/download/windows Godot Mono link.
-
To create a modular environment to teach and test FRC robotics code. at the same time, we are keeping it similar to how the actual robot code would look like.
-
Allow any team to modify robot to accommodate their design
-
Allow for new drivers to practice (drive train is universal)
Input can be any generic gamepad controller.
The names for each class and method are the same as the ones in the WPI_lib library (although they work differently on the inside).
Download the build for your corresponding os.
- Create a new folder
- Go inside the folder and paste these files
- Open up godot and look for import, traverse your way into the folder you created and click on the "project.godot" file
- Open up the project and click the play button on the top right(or tap f5)
The main script will be inside "Robot.cs".
WPI_lib library clones are located in the "lib" directory, you can expand it and implement your classes and methods if needed.
Note- in Godot each file counts as a class and is imported automatically.
The Talonsrx class is a generic motor class for adding a motor-controlled object, it calls a function on an object that must contain a function called "move_object" which can do whatever you require it to do,add them in the "custom scripts" directory.
Ex. in "robot" a new object of Talonsrx is created called feeder, at channel 2 (channel 2 is the 2nd object under the robot scene).
When called "feeder.set({speed})" then it calls the move_object function local to "feeder" which does its task, being deleting the ball, while the "shooters" task is spitting it out and the "climber's" task is moving up and down etc...
For extra help look in comments through the code or The editor Descriptions in Godot.
Knowledge of the Godot editor may be needed to modify the custom scripts and libraries.
Refer to->
https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html
https://docs.godotengine.org/en/stable/classes/class_kinematicbody.html#class-kinematicbody
https://haxegodot.github.io/godot/
https://haxegodot.github.io/godot/godot/JoystickList.html#Button0
and more :)