Robocup Play Development HOWTO

From GT RoboJackets

Jump to: navigation, search

In order to add a custom play to the system, you must make a new play class, and then register the play and add it to the appropriate build lists. The steps are as follows:

Create a play class
Copy the ExamplePlay class (both hpp and cpp files) with your new play class name. Change all occurrences of ExamplePlay.
You may assign the play to a category in the play list. Use REGISTER_PLAY_CATEGORY instead of REGISTER_PLAY.
Add files
Play classes go in soccer/gameplay/plays, and demo-only plays should go in soccer/gameplay/plays/demo_plays
Add to soccer/SConscript
Add a new source line to the srcs variable. Put it near related plays.

The play should now be available in the play selection tab of the user interface, and can be enabled or disabled like the other plays.

Only one play class can be present in a source file. This is a limitation of REGISTER_PLAY, and if it really bothers you, it is possible to work around it (see the macro definition).

Personal tools