Struct PinSlotJoint

Source
pub struct PinSlotJoint<N: RealField + Copy> { /* private fields */ }
Expand description

A joint that allows one translational and one rotational degrees of freedom.

Both are not required to be along the same direction.

Implementations§

Source§

impl<N: RealField + Copy> PinSlotJoint<N>

Source

pub fn new( axis_v: Unit<Vector3<N>>, axis_w: Unit<Vector3<N>>, position: N, angle: N, ) -> Self

Create a new pin-slot joint with axii expressed in the local coordinate frame of the attached bodies, and with initial linear position and angle.

Source

pub fn offset(&self) -> N

The linear displacement.

Source

pub fn angle(&self) -> N

The angular displacement.

Source§

impl<N: RealField + Copy> PinSlotJoint<N>

Source

pub fn min_offset(&self) -> Option<N>

The lower limit of the relative translational displacement of the attached multibody links along the joint axis.

Source

pub fn max_offset(&self) -> Option<N>

The upper limit of the relative translational displacement of the attached multibody links along the joint axis.

Source

pub fn disable_min_offset(&mut self)

Disable the lower limit of the relative translational displacement of the attached multibody links along the joint axis.

Source

pub fn disable_max_offset(&mut self)

Disable the upper limit of the relative translational displacement of the attached multibody links along the joint axis.

Source

pub fn enable_min_offset(&mut self, limit: N)

Set the lower limit of the relative translational displacement of the attached multibody links along the joint axis.

Source

pub fn enable_max_offset(&mut self, limit: N)

Set the upper limit of the relative translational displacement of the attached multibody links along the joint axis.

Source

pub fn is_linear_motor_enabled(&self) -> bool

Returns true if the joint translational motor is enabled.

Source

pub fn enable_linear_motor(&mut self)

Enable the joint translational motor.

Source

pub fn disable_linear_motor(&mut self)

Disable the joint translational motor.

Source

pub fn desired_linear_motor_velocity(&self) -> N

The desired relative translational velocity to be enforced by the joint motor.

Source

pub fn set_desired_linear_motor_velocity(&mut self, vel: N)

Set the desired relative translational velocity to be enforced by the joint motor.

Source

pub fn max_linear_motor_force(&self) -> N

The maximum force that can be output by the joint translational motor.

Source

pub fn set_max_linear_motor_force(&mut self, force: N)

Set the maximum force that can be output by the joint translational motor.

Source§

impl<N: RealField + Copy> PinSlotJoint<N>

Source

pub fn min_angle(&self) -> Option<N>

The lower limit of the rotation angle.

Source

pub fn max_angle(&self) -> Option<N>

The upper limit of the rotation angle.

Source

pub fn disable_min_angle(&mut self)

Disable the lower limit of the rotation angle.

Source

pub fn disable_max_angle(&mut self)

Disable the upper limit of the rotation angle.

Source

pub fn enable_min_angle(&mut self, limit: N)

Enable and set the lower limit of the rotation angle.

Source

pub fn enable_max_angle(&mut self, limit: N)

Enable and set the upper limit of the rotation angle.

Source

pub fn is_angular_motor_enabled(&self) -> bool

Return true if the angular motor of this joint is enabled.

Source

pub fn enable_angular_motor(&mut self)

Enable the angular motor of this joint.

Source

pub fn disable_angular_motor(&mut self)

Disable the angular motor of this joint.

Source

pub fn desired_angular_motor_velocity(&self) -> N

The desired angular velocity of the joint motor.

Source

pub fn set_desired_angular_motor_velocity(&mut self, vel: N)

Set the desired angular velocity of the joint motor.

Source

pub fn max_angular_motor_torque(&self) -> N

The maximum torque that can be delivered by the joint motor.

Source

pub fn set_max_angular_motor_torque(&mut self, torque: N)

Set the maximum torque that can be delivered by the joint motor.

Trait Implementations§

Source§

impl<N: Clone + RealField + Copy> Clone for PinSlotJoint<N>

Source§

fn clone(&self) -> PinSlotJoint<N>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<N: Debug + RealField + Copy> Debug for PinSlotJoint<N>

Source§

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

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

impl<N: RealField + Copy> Joint<N> for PinSlotJoint<N>

Source§

fn ndofs(&self) -> usize

The number of degrees of freedom allowed by the joint.
Source§

fn body_to_parent( &self, parent_shift: &Vector3<N>, body_shift: &Vector3<N>, ) -> Isometry3<N>

The position of the multibody link containing this joint relative to its parent.
Source§

fn update_jacobians(&mut self, body_shift: &Vector3<N>, vels: &[N])

Update the jacobians of this joint.
Source§

fn jacobian(&self, transform: &Isometry3<N>, out: &mut JacobianSliceMut<'_, N>)

Sets in out the non-zero entries of the joint jacobian transformed by transform.
Source§

fn jacobian_dot( &self, transform: &Isometry3<N>, out: &mut JacobianSliceMut<'_, N>, )

Sets in out the non-zero entries of the time-derivative of the joint jacobian transformed by transform.
Source§

fn jacobian_dot_veldiff_mul_coordinates( &self, transform: &Isometry3<N>, vels: &[N], out: &mut JacobianSliceMut<'_, N>, )

Sets in out the non-zero entries of the velocity-derivative of the time-derivative of the joint jacobian transformed by transform.
Source§

fn jacobian_mul_coordinates(&self, vels: &[N]) -> Velocity<N>

Multiply the joint jacobian by generalized velocities to obtain the relative velocity of the multibody link containing this joint.
Source§

fn jacobian_dot_mul_coordinates(&self, vels: &[N]) -> Velocity<N>

Multiply the joint jacobian by generalized accelerations to obtain the relative acceleration of the multibody link containing this joint.
Source§

fn default_damping(&self, out: &mut DVectorSliceMut<'_, N>)

Fill out with the non-zero entries of a damping that can be applied by default to ensure a good stability of the joint.
Source§

fn integrate(&mut self, parameters: &IntegrationParameters<N>, vels: &[N])

Integrate the position of this joint.
Source§

fn apply_displacement(&mut self, disp: &[N])

Apply a displacement to the joint.
Source§

fn clone(&self) -> Box<dyn Joint<N>>

Source§

fn num_velocity_constraints(&self) -> usize

Maximum number of velocity constrains that can be generated by this joint.
Source§

fn velocity_constraints( &self, parameters: &IntegrationParameters<N>, multibody: &Multibody<N>, link: &MultibodyLink<N>, assembly_id: usize, dof_id: usize, ext_vels: &[N], ground_j_id: &mut usize, jacobians: &mut [N], constraints: &mut ConstraintSet<N, (), (), usize>, )

Initialize and generate velocity constraints to enforce, e.g., joint limits and motors.
Source§

fn num_position_constraints(&self) -> usize

The maximum number of non-linear position constraints that can be generated by this joint.
Source§

fn position_constraint( &self, i: usize, multibody: &Multibody<N>, link: &MultibodyLink<N>, handle: BodyPartHandle<()>, dof_id: usize, jacobians: &mut [N], ) -> Option<GenericNonlinearConstraint<N, ()>>

Initialize and generate the i-th position constraints to enforce, e.g., joint limits.
Source§

fn nimpulses(&self) -> usize

The maximum number of impulses needed by this joints for its constraints.
Source§

impl<N: Copy + RealField + Copy> Copy for PinSlotJoint<N>

Auto Trait Implementations§

§

impl<N> Freeze for PinSlotJoint<N>
where N: Freeze,

§

impl<N> RefUnwindSafe for PinSlotJoint<N>
where N: RefUnwindSafe,

§

impl<N> Send for PinSlotJoint<N>

§

impl<N> Sync for PinSlotJoint<N>

§

impl<N> Unpin for PinSlotJoint<N>
where N: Unpin,

§

impl<N> UnwindSafe for PinSlotJoint<N>
where N: UnwindSafe,

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> Downcast for T
where T: Any,

Source§

fn into_any(self: Box<T>) -> Box<dyn Any>

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.
Source§

fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s.
Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s.
Source§

impl<T> DowncastSync for T
where T: Any + Send + Sync,

Source§

fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send>

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait.
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> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. 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.
Source§

impl<T> UserData for T
where T: Clone + Any + Send + Sync,

Source§

fn clone_boxed(&self) -> Box<dyn UserData>

Clone this trait-object.
Source§

fn to_any(&self) -> Box<dyn Any + Sync + Send>

Clone as its super-trait trait objects.
Source§

fn as_any(&self) -> &(dyn Any + Sync + Send + 'static)

Downcast to Any.