Skip to main content

ModelError

Enum ModelError 

Source
pub enum ModelError {
Show 26 variants NotNormalized { kind: IdentifierKind, value: String, }, ReservedSeparator { kind: IdentifierKind, value: String, }, MalformedCapabilityReference { value: String, }, MalformedAssetId { value: String, }, UnknownCapability { reference: CapabilityRef, }, CapabilityKindMismatch { reference: CapabilityRef, expected: CapabilityKind, actual: CapabilityKind, }, CapabilityTargetKind { reference: CapabilityRef, expected: StructuralKind, }, UnknownBoundTarget { reference: CapabilityRef, kind: StructuralKind, id: String, }, UnknownDeclaredTarget { component_type: ComponentTypeId, capability_id: CapabilityId, kind: StructuralKind, id: String, }, UnknownComponentType { instance: ComponentInstanceId, component_type: ComponentTypeId, }, UnknownMountLink { instance: ComponentInstanceId, link: LinkId, }, DirectionSign { instance: ComponentInstanceId, capability_id: CapabilityId, value: i8, }, UnknownDirectionSignCapability { instance: ComponentInstanceId, capability_id: CapabilityId, }, UnknownRoleCapability { instance: ComponentInstanceId, capability_id: CapabilityId, }, EmptyCapabilityRoles { capability_id: CapabilityId, }, DuplicateCapabilityRole { capability_id: CapabilityId, role: CapabilityRole, }, SimulationWithoutCapability { component_type: ComponentTypeId, capability_id: CapabilityId, }, SimulationCapabilityKindMismatch { component_type: ComponentTypeId, capability_id: CapabilityId, simulated: CapabilityKind, declared: CapabilityKind, }, UnsupportedJointKind { owner: JointOwner, joint: JointId, kind: JointKind, }, MotionLimit { field: MotionLimitField, }, KinematicScalar { kinematics: KinematicKind, field: KinematicScalarField, }, FootprintMovableJoint { joint: JointId, }, FootprintMesh { link: LinkId, }, FootprintNonFinite, FootprintRadius, Structure(StructureError),
}
Expand description

A canonical robot model that violates the runtime model’s invariants.

Variants§

§

NotNormalized

An identifier is not a normalized token.

Fields

§value: String
§

ReservedSeparator

An identifier contains the separator reserved for flattening a component’s structure into the robot’s.

Fields

§value: String
§

MalformedCapabilityReference

A capability reference is not written as component.capability.

Fields

§value: String
§

MalformedAssetId

A logical asset id is not a normalized relative forward-slash path.

Fields

§value: String
§

UnknownCapability

A reference names a capability the robot does not declare.

Fields

§reference: CapabilityRef
§

CapabilityKindMismatch

A capability is not of the kind the caller requires.

Fields

§reference: CapabilityRef
§

CapabilityTargetKind

A capability does not target the kind of structural item the caller requires.

Fields

§reference: CapabilityRef
§

UnknownBoundTarget

A bound capability targets a structural item its component type does not define.

Fields

§reference: CapabilityRef
§

UnknownDeclaredTarget

A component type’s capability targets a structural item that type does not define.

Fields

§component_type: ComponentTypeId
§capability_id: CapabilityId
§

UnknownComponentType

A component instance names a component type the model did not load.

Fields

§component_type: ComponentTypeId

A component instance mounts on a link the robot structure lacks.

Fields

§link: LinkId
§

DirectionSign

A direction sign is neither -1 nor 1.

Fields

§capability_id: CapabilityId
§value: i8
§

UnknownDirectionSignCapability

A direction sign names a capability its component type does not declare.

Fields

§capability_id: CapabilityId
§

UnknownRoleCapability

A capability role assignment names a capability its component type does not declare.

Fields

§capability_id: CapabilityId
§

EmptyCapabilityRoles

A persisted role key must name at least one role.

The component instance is not named: this is raised while the instance is being decoded, before the map key that identifies it is in scope. serde prefixes the field path it was decoding, which names the instance.

Fields

§capability_id: CapabilityId
§

DuplicateCapabilityRole

A persisted role list may not repeat a role and rely on set coercion.

Fields

§capability_id: CapabilityId
§

SimulationWithoutCapability

A simulated capability has no counterpart on the component type.

Fields

§component_type: ComponentTypeId
§capability_id: CapabilityId
§

SimulationCapabilityKindMismatch

A simulated capability models a different kind than the component declares, so the simulator would drive the wrong device.

Fields

§component_type: ComponentTypeId
§capability_id: CapabilityId
§simulated: CapabilityKind
§

UnsupportedJointKind

A joint uses a kind the runtime cannot drive.

Fields

§joint: JointId
§

MotionLimit

A motion limit is not finite, positive, and representable as f32.

The f32 bound is not cosmetic: motion commands cross the bus as f32, so a limit that does not survive the narrowing is not a limit.

Fields

§

KinematicScalar

A kinematic scalar is not finite and positive.

Fields

§kinematics: KinematicKind
§

FootprintMovableJoint

Stock safety cannot conservatively account for a collision shape that is attached below a movable joint.

Fields

§joint: JointId
§

FootprintMesh

Mesh dimensions depend on asset contents and therefore cannot be compiled into the source-free stock safety envelope.

Fields

§link: LinkId
§

FootprintNonFinite

A footprint scalar must remain finite after all fixed-joint transforms.

§

FootprintRadius

A compiled footprint radius is invalid, which must never enter a bundle manifest or authorize motion.

§

Structure(StructureError)

The canonical structure itself is invalid.

Trait Implementations§

Source§

impl Debug for ModelError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ModelError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for ModelError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<StructureError> for ModelError

Source§

fn from(source: StructureError) -> Self

Converts to this type from the input type.
Source§

impl From<TopologyIdError> for ModelError

Source§

fn from(error: TopologyIdError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.