You'll need Unreal Engine 4.25 and Visual Studio 2019 to develop. Most work can be done in the Unreal Engine editor on the blueprints, but some things (especially the ROSIntegration stuff) need to be done in VS. If something seems overcomplicated or suboptimal, chances are I had to do it that way to get things working.
Ideally for things like takeoff and landing we would use ROS actions to robustly and flexibly handle things like takeoff. Unfortunately the ROSIntegration plugin for UE4 does not support actions. Alternatively we could use services and have the drone respond whenever it is done with the task. Unfortunately the ROSIntegration plugin does not support services running for longer than five seconds. What we have to do is run a service to let the drone know to take off, and the response is simply an ack. Then the drone will use a different service to let us know it finished. I initially did this with messages but sometimes they get dropped and I didn't want to deal with the extra complexity of all the acks going back and forth.
I recommend playing in standalone, offline mode. Running in editor causes weird problems when connecting to ROS. Offline is required because the user decides if a game will be a server or the client, so UE4's native attempt to automatically start a server will interfere.
For my evaluation environment I run at least two game instances, as well as an Ubuntu virtual machine to handle the Gazebo simulation and ROS stuff.
The most important parameter to change is the ROS bridge IP, which is set in the Content/ROS/Blueprints/BP_ROS_GAME. If your game starts with a black screen and appears unresponsive, it is most likely that it is blocking on attempting to connect to the server. Don't forget to also modify the game host IP (Content/Quadditch/UI/BP_MainMenu) - this should be the computer playing the game, not the VM IP.
For UI bugs, often refreshing the view (hit 'v' twice) helps.
Most important stuff happens in the quadcopter blueprint
This forum post is very helpful for understanding how to use the various network-related components of an Unreal Engine game. The page also includes a link to the network compendium, which goes into even more detail.
To toggle minimap between follow player and fixed orientation, go to quadcopter blueprint and change the spring arm holding the overhead screen capture object. The property to change is "inherit yaw"
- Delete sln/intermediate/saved/binaries\
- Use bat file to rebuild ROSIntegration plugin
- generate visual studio files (to make new sln)
- build again
Quadcopters package. Add the following file structure On first startup you will be notified about a missing material for MI_QuadcopterA_04_BLUE.uasset. This is the same as the red quadcopter material, but blue. Make a copy and change the color.
Content/Quadcopters/
/Cue
/SC_QuadcoptersAudio.uasset
/Materials
/Inner_Collision.uasset
/M_QuadcopterA_Master_01.uasset
/M_QuadcopterA_Master_02.uasset
/MI_QuadcopterA_01.uasset
/MI_QuadcopterA_02.uasset
/MI_QuadcopterA_03.uasset
/Outer_Collision.uasset
/Mesh
/SM_QuadcopterA_Cam.uasset
/SM_QuadcopterA_Main.uasset
/SM_QuadcopterA_Rotor.uasset
/Textures
/T_QuadcopterA_BC_01.uasset
/T_QuadcopterA_BC_02.uasset
/T_QuadcopterA_M_01.uasset
/T_QuadcopterA_M_02.uasset
/T_QuadcopterA_M_03.uasset
/T_QuadcopterA_M_04.uasset
/T_QuadcopterA_N.uasset
/Wav
/S_QuadcoptersAudio.uasset
The files in Content/Quidditch_Assets were taken from this package of quidditch assets, licensed under CC Attribution
- Debug MR alignment - get posts locked-in
- Sometimes the home orientation is slightly off
- Add proportional force to barrier repulsion (currently just integral)
- Drones hit intermediate waypoint early on landing
- Set TKL points in-game - send in local coordinates, UAV will convert to GPS
- Auto-assign team based on location relative to drone-cage
- Quaffle spawn mechanics
- Only connect to ROS if server
- Server IP parameter in-game - somehow adjust ROSIntegration to not autoconnect at start
- package into binary
- situational awareness
- arrow indicators
- minimap
- collision notification
- code architecture diagrams
- segregate field halves so drone can only be on their own team's half
- use USB IDs or something to match up video receivers with the correct player assignments
- Fix Quaffle mesh so origin is in center of ball
- Change bludger to separate mesh / texture
- Cooldown loading indicator for quaffle and bludger
- Software architecture diagram
- explanation of game state, mode, etc.