pub struct SimulationConfig {
pub model: String,
pub model_config: Option<String>,
pub environment: String,
pub environment_config: Option<String>,
pub godot: GodotConfig,
pub camera: CameraConfig,
pub networking: NetworkingConfig,
}Expand description
Runtime simulation configuration
Loaded from configs/{profile}/simulation/config.json or {scenario}.json. This is distinct from ProjectSimulationConfig which is stored in mecha10.json.
Fields§
§model: StringRobot model identifier (e.g., “@mecha10/simulation-models/rover”)
model_config: Option<String>Path to model configuration file
environment: StringEnvironment identifier (e.g., “@mecha10/simulation-environments/basic_arena”)
environment_config: Option<String>Path to environment configuration file
godot: GodotConfigGodot engine configuration
camera: CameraConfigCamera configuration
networking: NetworkingConfigNetworking configuration
Implementations§
Source§impl SimulationConfig
impl SimulationConfig
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load simulation config with environment and scenario support
Priority (first found wins):
- configs/{profile}/simulation/{scenario}.json (if scenario specified)
- configs/{profile}/simulation/config.json
- configs/common/simulation/config.json
- Error
Sourcepub fn load_with_profile_and_scenario(
profile: Option<&str>,
scenario: Option<&str>,
) -> Result<Self>
pub fn load_with_profile_and_scenario( profile: Option<&str>, scenario: Option<&str>, ) -> Result<Self>
Load simulation config with specific profile and/or scenario
§Arguments
profile- Config profile (dev, production, etc.). If None, uses MECHA10_ENVIRONMENT or “dev”scenario- Scenario name (navigation, obstacle_avoidance, etc.). If None, uses MECHA10_SIMULATION_SCENARIO or loads config.json
Sourcepub fn with_overrides(self, overrides: SimulationOverrides) -> Self
pub fn with_overrides(self, overrides: SimulationOverrides) -> Self
Apply CLI overrides to config
Allows command-line arguments to override config file values.
Sourcepub fn resolve_model_path(&self, framework_path: &Path) -> PathBuf
pub fn resolve_model_path(&self, framework_path: &Path) -> PathBuf
Get the model path for Godot
Resolves @mecha10 references to actual filesystem paths.
Sourcepub fn resolve_environment_path(&self, framework_path: &Path) -> PathBuf
pub fn resolve_environment_path(&self, framework_path: &Path) -> PathBuf
Get the environment path for Godot
Resolves @mecha10 references to actual filesystem paths.
Trait Implementations§
Source§impl Clone for SimulationConfig
impl Clone for SimulationConfig
Source§fn clone(&self) -> SimulationConfig
fn clone(&self) -> SimulationConfig
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SimulationConfig
impl Debug for SimulationConfig
Source§impl<'de> Deserialize<'de> for SimulationConfig
impl<'de> Deserialize<'de> for SimulationConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SimulationConfig
impl RefUnwindSafe for SimulationConfig
impl Send for SimulationConfig
impl Sync for SimulationConfig
impl Unpin for SimulationConfig
impl UnwindSafe for SimulationConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more