pub struct ShapeTable {
pub robot_name: String,
pub capabilities: Vec<Capability>,
pub joints: Vec<JointLimitConfig>,
pub locomotion: Option<LocomotionLimitsConfig>,
pub cameras: Vec<CameraShape>,
pub action_space: Vec<ActionSpaceShape>,
}Expand description
A robot’s full declared shape: joints, actuators, cameras, and capability-keyed action-space
shape. Derived from a ProjectConfig via ShapeTable::from_project_config - never
hand-authored directly.
Fields§
§robot_name: StringThe robot’s project name (mecha10.json’s name).
capabilities: Vec<Capability>Every enabled node’s declared capability, unioned - mirrors
ProjectConfig::capabilities exactly. Determines which of locomotion/action_space
entries below are populated.
joints: Vec<JointLimitConfig>Named per-joint angle limits, radians. Empty when this robot declares no joints (locomotion-only, e.g. a rover).
locomotion: Option<LocomotionLimitsConfig>Drivetrain motion limits, present only when capabilities includes
Capability::Locomotion. None for a joints-only (e.g. arm) robot.
cameras: Vec<CameraShape>One entry per distinct camera this robot’s targets wiring actually names (via a
video-streamer placement’s camera_id), each carrying the project’s single shared
camera resolution (ProjectConfig::vision). Empty when no target names a specific
camera - not a gap: camera/video sizing is explicitly out of scope for this migration
(see LAB-5257’s planning doc, “Camera/video sizing” row) since L3 preprocessing already
resizes to the loaded model’s own metadata regardless of what’s declared here.
action_space: Vec<ActionSpaceShape>Capability-keyed action-space shape: one entry per capability that has an actionable
degree-of-freedom shape at all (today: Capability::Locomotion and
Capability::Joints - Flight/Video/Vision/Audio carry none and are omitted).
This is the field every RL algorithm/env adapter sizes its action vector from, instead of
a hardcoded Discrete(5)/PanTiltAction/RoverAction enum (LAB-5257 stage 6).
Implementations§
Source§impl ShapeTable
impl ShapeTable
Sourcepub fn from_project_config(config: &ProjectConfig) -> ShapeTable
pub fn from_project_config(config: &ProjectConfig) -> ShapeTable
Project config’s shape-bearing fields into a ShapeTable. This is the one place a
ShapeTable gets built - every field here is derived, never independently authored, so
it can’t drift from mecha10.json the way the pre-migration hand-copies did.
Sourcepub fn schema_value() -> Value
pub fn schema_value() -> Value
The schemars-derived JSON Schema for this struct, as a serde_json::Value - what
publish-shape-catalog CI publishes to mecha10-api’s shape catalog, and what
cargo run -p mecha10-cli --example export_schemas writes to schemas/.
Trait Implementations§
Source§impl Clone for ShapeTable
impl Clone for ShapeTable
Source§fn clone(&self) -> ShapeTable
fn clone(&self) -> ShapeTable
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ShapeTable
impl Debug for ShapeTable
Source§impl<'de> Deserialize<'de> for ShapeTable
impl<'de> Deserialize<'de> for ShapeTable
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShapeTable, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ShapeTable, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for ShapeTable
impl JsonSchema for ShapeTable
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 PartialEq for ShapeTable
impl PartialEq for ShapeTable
Source§impl Serialize for ShapeTable
impl Serialize for ShapeTable
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,
impl StructuralPartialEq for ShapeTable
Auto Trait Implementations§
impl Forget for ShapeTable
impl Freeze for ShapeTable
impl RefUnwindSafe for ShapeTable
impl Send for ShapeTable
impl Sync for ShapeTable
impl Unpin for ShapeTable
impl UnsafeUnpin for ShapeTable
impl UnwindSafe for ShapeTable
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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