Simulation Files and World Container
In this version of the simulator, we explicitly isolate world as just a container. It holds what should exist in a single simulation instance and can be exported to/from a file.
World Model Container
Will be implemented soon
Base Simulation
Armour Simulation
- class armour.ArmourSimulation(simulate_timestep: float = 0.5)[source]
Bases:
BaseSimulation
- add_object(object, isentity: bool = False, collision: CollisionObject | DynamicCollisionObject = None, visual: PyvistaVisualObject = None)[source]
Add the specified object to the world. If it is an entity, it is treated as dynamic.
- Parameters:
object (Any) – the object to add
isentity (bool) – whether it is a dynamic entity
collision (CollisionObject | DynamicCollisionObject) – collision handler of the object
visual (PyvistaVisualObject) – visual handler of the object
- run(max_steps: int = 100000000.0, pre_step_callback: Callable = None, step_callback: Callable = None, post_step_callback: Callable = None, stop_on_goal: bool = True)[source]
Runs the lifecycle of the simulation
- Parameters:
max_steps (int) – maximum number of steps to run for
pre_step_callback (Callable) – function to run before the pre_step
step_callback (Callable) – function to run before the step
post_step_callback (Callable) – function to run before the post_step
stop_on_goal (bool) – whether to stop the simulation once it reaches the goal
- setup(agent: ArmourAgent)[source]
Populate the world with the ArmourAgent
- Parameters:
agent (ArmourAgent) – agent to add