pub enum CuJointLimits {
Revolute {
lower: Angle,
upper: Angle,
max_velocity: AngularVelocity,
},
Prismatic {
lower: Length,
upper: Length,
max_velocity: Velocity,
},
Continuous {
max_velocity: AngularVelocity,
},
Fixed,
}Expand description
Position and velocity bounds, with units determined by joint type.
Variants§
Revolute
Prismatic
Continuous
Unbounded rotation; finite bounds returned by lower/upper are a sampling interval.
Fields
§
max_velocity: AngularVelocityFixed
Implementations§
Source§impl CuJointLimits
impl CuJointLimits
Sourcepub const fn revolute(
lower: Angle,
upper: Angle,
max_velocity: AngularVelocity,
) -> Self
pub const fn revolute( lower: Angle, upper: Angle, max_velocity: AngularVelocity, ) -> Self
Creates bounded revolute limits.
Sourcepub const fn prismatic(
lower: Length,
upper: Length,
max_velocity: Velocity,
) -> Self
pub const fn prismatic( lower: Length, upper: Length, max_velocity: Velocity, ) -> Self
Creates bounded prismatic limits.
Sourcepub fn lower(self) -> CuJointPosition
pub fn lower(self) -> CuJointPosition
Lower position bound (-pi sampling bound for continuous joints).
Sourcepub fn upper(self) -> CuJointPosition
pub fn upper(self) -> CuJointPosition
Upper position bound (+pi sampling bound for continuous joints).
Sourcepub fn max_velocity(self) -> CuJointVelocity
pub fn max_velocity(self) -> CuJointVelocity
Maximum absolute joint velocity.
Sourcepub fn validate(self, q: CuJointPosition) -> CuResult<()>
pub fn validate(self, q: CuJointPosition) -> CuResult<()>
Checks that q has this joint’s unit kind and that the limits themselves are well formed.
Sourcepub fn contains(self, q: CuJointPosition) -> bool
pub fn contains(self, q: CuJointPosition) -> bool
Returns true if q is valid and inside the bounds (always inside for continuous joints).
Sourcepub fn clamp(self, q: CuJointPosition) -> CuResult<CuJointPosition>
pub fn clamp(self, q: CuJointPosition) -> CuResult<CuJointPosition>
Clamps q to the bounds (continuous joints are returned unchanged).
Trait Implementations§
Source§impl<'__de, __Context> BorrowDecode<'__de, __Context> for CuJointLimits
impl<'__de, __Context> BorrowDecode<'__de, __Context> for CuJointLimits
Source§fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de, Context = __Context>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl Clone for CuJointLimits
impl Clone for CuJointLimits
Source§fn clone(&self) -> CuJointLimits
fn clone(&self) -> CuJointLimits
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for CuJointLimits
Source§impl Debug for CuJointLimits
impl Debug for CuJointLimits
Source§impl<__Context> Decode<__Context> for CuJointLimits
impl<__Context> Decode<__Context> for CuJointLimits
Source§impl Default for CuJointLimits
impl Default for CuJointLimits
Source§fn default() -> CuJointLimits
fn default() -> CuJointLimits
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CuJointLimits
impl<'de> Deserialize<'de> for CuJointLimits
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for CuJointLimits
impl Encode for CuJointLimits
Source§impl PartialEq for CuJointLimits
impl PartialEq for CuJointLimits
Source§impl Serialize for CuJointLimits
impl Serialize for CuJointLimits
impl StructuralPartialEq for CuJointLimits
Source§impl TypePath for CuJointLimits
impl TypePath for CuJointLimits
fn type_path() -> &'static str
fn short_type_path() -> &'static str
fn type_ident() -> Option<&'static str>
fn crate_name() -> Option<&'static str>
fn module_path() -> Option<&'static str>
Auto Trait Implementations§
impl Freeze for CuJointLimits
impl RefUnwindSafe for CuJointLimits
impl Send for CuJointLimits
impl Sync for CuJointLimits
impl Unpin for CuJointLimits
impl UnsafeUnpin for CuJointLimits
impl UnwindSafe for CuJointLimits
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CuMsgPayload for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<T> ElementType for T
impl<T> ElementType for T
impl<T> GetTypeRegistration for T
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> ⓘ
Converts
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> ⓘ
Converts
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