-
Notifications
You must be signed in to change notification settings - Fork 0
π Getting Started
To test robot soccer strategies without real hardware, you'll use two components:
-
GrSim (the simulator) β creates a virtual SSL field with simulated robots and ball physics.
-
Sysmic Robotics Engine β acts as the AI/control system for your robots, making decisions and sending commands to the simulator.
These two programs work together: the engine decides what the robots should do, and GrSim shows the result on a virtual field.
- Go to the following link and download the GrSim simulator:
π Download GrSim (Google Drive)
-
Once the download is complete, locate the
.zip
file in your Downloads folder. -
Right-click the file and choose Extract All...
-
Choose a destination folder (e.g.,
C:\GrSim
) and complete the extraction.
-
Open the extracted folder.
-
Navigate to the
release
subfolder. -
Double-click
grsim.exe
to start the simulator.
π‘ Tip: Right-click
grsim.exe
and select Send to β Desktop (create shortcut) for quicker access next time!
- Go to the GitHub Releases page.
- Scroll down to the Assets section of the latest release.
- Click on
build.zip
to download the precompiled Windows build. - After the download finishes, right-click
build.zip
and choose Extract All. - Select a destination folder and finish the extraction.
- Open the extracted
build
folder. - Double-click
engine.exe
to launch the Sysmic Robotics Engine.
Once the engine is running, you can write and test your own robot behavior scripts using .lua
files.
-
Create a new file with a
.lua
extension (e.g.,example_play.lua
). -
Write your strategy or robot behavior logic in this file using the engine's Lua API.
Example file path:
C:\SysmicEngine\scripts\example_play.lua
-
Start
engine.exe
. -
In the engine console, type the
run
command followed by the full path to your.lua
file.Example:
run C:\SysmicEngine\scripts\example_play.lua
-
The engine will load and execute your Lua file, sending commands to GrSim.
-
If you make changes to the Lua file and want to re-run it without typing the full path again, just type:
reload
-
This re-executes the last loaded script, making testing and development much faster.
π‘ Tip: Organize your Lua scripts in a dedicated
scripts
folder for easy access and versioning.
Hereβs your updated Lua API Quick Reference, now including process()
and print()
:
Function | Description | Parameters | Returns |
---|---|---|---|
move_to(robotId, team, point) | Moves a robot to a point. | robotId: numberteam: 0 = blue, 1 = yellowpoint: {x, y} | β |
get_robot_state(robotId, team) | Returns robot state. | robotId, team | {id, team, x, y, vel_x, vel_y, orientation, active} |
face_to(robotId, team, point, kp?, ki?, kd?) | Rotates robot to face a point. | point: {x, y}Optional PID: kp, ki, kd | β |
get_ball_state() | Returns ball position. | β | {x, y} |
kickx(robotId, team) | Triggers flat kick. | robotId, team | β |
kickz(robotId, team) | Triggers lob kick. | robotId, team | β |
dribbler(robotId, team, speed) | Sets dribbler speed (0β7). | robotId, team, speed: number | β |
print(...) | Outputs text to the engine console (for debugging). | Any number of values | β |
process() | Called every frame (~60 times/sec). Place your logic here. | β | β |
βΉοΈ Note: Define a global
function process()
in your Lua file. It will be called in a loop by the engine. Useprint()
for debugging output.
Looking for ready-to-use Lua scripts?
You can find working examples and templates in the official strategy repository:
These scripts demonstrate how to:
-
Move robots to specific positions
-
Track and react to the ball
-
Use
process()
for continuous logic -
Apply actions like kicking, dribbling, and rotating
π‘ Use these examples as a starting point to build your own strategies and behaviors!