Creating a Custom Simulation Config¶
When setting up a simulation, a custom configuration allows you to tailor the simulation parameters to your needs. The below model shows the required fields for your basic configuration.
- class robo_sim.config.config_models.Config¶
- Fields:
- field grid_size: tuple[int, int] = (10, 10)¶
Size of the 2D grid as (width, height).
- field obstacles: int | list[Position] = []¶
List of obstacle positions or number of obstacles to generate randomly.
- Validated by:
check_obstacles_type
- field start_pos: Position = (1, 1)¶
Starting position of the robot.
- Validated by:
validate
- field steps: int = 20¶
Number of steps for the robot to take.
- field target_pos: Position = (8, 8)¶
Position of the target.
- Validated by:
validate
- field trace_path: bool = False¶
Whether to visually trace the robot’s path.
If you include sensor options, such as sensor_range, your simulation will use a SensorRobotConfig subclass.