pub struct ProjectConfig {
pub name: String,
pub version: String,
pub template_version: Option<String>,
pub robot: RobotConfig,
pub simulation: Option<ProjectSimulationConfig>,
pub nodes: NodesConfig,
pub targets: TargetsConfig,
pub behaviors: Option<BehaviorsConfig>,
pub docker: DockerServicesConfig,
pub environments: EnvironmentsConfig,
pub actuator: ActuatorConfig,
pub vision: VisionConfig,
}Fields§
§name: StringThe project’s name; lowercase letters, numbers, and hyphens only, 1-64 characters.
version: String§template_version: Option<String>Which published templates release this project’s scaffolded files were generated from.
robot: RobotConfig§simulation: Option<ProjectSimulationConfig>§nodes: NodesConfig§targets: TargetsConfig§behaviors: Option<BehaviorsConfig>§docker: DockerServicesConfig§environments: EnvironmentsConfig§actuator: ActuatorConfigActuator motion limits (linear/angular velocity and acceleration) applied to every node.
vision: VisionConfigCamera resolution shared by every node/service that captures, renders, or consumes camera frames (real camera, simulated camera, object-detector, image-classifier, etc.).
Implementations§
Source§impl ProjectConfig
impl ProjectConfig
Sourcepub fn schema_value() -> Value
pub fn schema_value() -> Value
The schemars-derived JSON Schema for this struct, as a serde_json::Value. Doesn’t
cover nodes’s legacy array shape or run_targets/scripts - mecha10 schema export
splices those back in separately.
Sourcepub fn node_process_env_vars(&self) -> Vec<(&'static str, String)>
pub fn node_process_env_vars(&self) -> Vec<(&'static str, String)>
Every env var a spawned node process needs to resolve mecha10_core::config’s
locomotion_limits()/joint_limits()/camera_dimensions() - actuator.locomotion as
MECHA10_LOCOMOTION_MAX_LINEAR_SPEED/MECHA10_LOCOMOTION_MAX_ANGULAR_SPEED/
MECHA10_LOCOMOTION_ACCELERATION, actuator.joints as MECHA10_ACTUATOR_JOINT_LIMITS,
and vision.camera_dimensions as MECHA10_CAMERA_WIDTH/MECHA10_CAMERA_HEIGHT. This is
the single source both the CLI’s own spawn path (mecha10 dev/run/sim) and
mecha10-node-runner’s supervisor (the production path) must call - a node spawned
without these env vars silently falls back to compiled defaults instead of this
project’s actual configured values.
Trait Implementations§
Source§impl Debug for ProjectConfig
impl Debug for ProjectConfig
Source§impl<'de> Deserialize<'de> for ProjectConfig
impl<'de> Deserialize<'de> for ProjectConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProjectConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ProjectConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ProjectConfig
impl JsonSchema for ProjectConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl Serialize for ProjectConfig
impl Serialize for ProjectConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Auto Trait Implementations§
impl Freeze for ProjectConfig
impl RefUnwindSafe for ProjectConfig
impl Send for ProjectConfig
impl Sync for ProjectConfig
impl Unpin for ProjectConfig
impl UnsafeUnpin for ProjectConfig
impl UnwindSafe for ProjectConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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