1- # Behavior Simulator
1+ # Bevyhavior Simulator
22
33A simplified simulator which can be used for manual or automatic testing of behavior in a defined scenario.
44
55# Usage
66
7- The simulator has two modes ` run ` and ` serve ` .
8-
9- ## Run
10-
11- In this mode, when the simulation is finished, the simulator exits.
12- It returns an error if the robotics code encountered a problem or if the scenario file generated an error.
13-
147``` sh
15- ./pepsi run --target behavior_simulator -- run tests/behavior/ golden_goal.lua
8+ ./pepsi run --bin golden_goal
169```
1710
18- ## Serve
19-
20- In this mode, after the simulation is finished, the simulator opens a commmunication server for use with e.g. [ Twix] ( ./twix.md ) .
11+ After the simulation is finished, the simulator opens a commmunication server for use with e.g. [ Twix] ( ./twix.md ) .
12+ It returns an error if the robotics code encountered a problem or if the scenario file generated an error.
2113
22- ``` sh
23- ./pepsi run --target behavior_simulator -- serve tests/behavior/golden_goal.lua
24- ```
2514
2615Within twix, connect to ` localhost ` and open a ` Behavior Simulator ` panel.
2716This panel has a timeline slider for scrubbing through the scenario.
@@ -32,8 +21,4 @@ This panel has a timeline slider for scrubbing through the scenario.
3221
3322# Scenario Development
3423
35- Scenario files are written in [ Lua] ( https://www.lua.org/ ) and can be found at ` tests/behavior/ ` .
36- The file is interpreted once on startup and can define functions like ` on_cycle ` which are then called repeatedly by the simulator.
37-
38- Common actions within these callbacks include changing game states, moving the ball around, or penalizing robots.
39- See [ demonstration.lua] ( https://github.com/HULKs/hulk/blob/main/tests/behavior/demonstration.lua ) for examples.
24+ Scenario files be found at ` crates/bevyhavior_simulator/src/bin/ ` .
0 commit comments