RevoluteJoint

Struct RevoluteJoint 

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

A unit joint that allows only one relative rotational degree of freedom between two multibody links.

Implementations§

Source§

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

Source

pub fn new(angle: N) -> Self

Create a new revolute joint with an initial angle.

Source

pub fn axis(&self) -> Unit<AngularVector<N>>

The axis of the rotational degree of freedom.

Source

pub fn angle(&self) -> N

The angle of rotation.

Source

pub fn rotation(&self) -> &Rotation<N>

The rotation from an attached multibody link to its dependent.

Source

pub fn local_jacobian(&self) -> &Velocity<N>

The jacobian of this joint expressed in the local coordinate frame of the joint.

Source

pub fn local_jacobian_dot(&self) -> &Velocity<N>

The time-derivative of the jacobian of this joint expressed in the local coordinate frame of the joint.

Source

pub fn local_jacobian_dot_veldiff(&self) -> &Velocity<N>

The velocity-derivative of the time-derivative of the jacobian of this joint expressed in the local coordinate frame of the joint.

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_velocity(&self) -> N

The max angular velocity that the joint motor will attempt.

Source

pub fn set_max_angular_motor_velocity(&mut self, max_vel: N)

Set the maximum angular velocity that the joint motor will attempt.

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 RevoluteJoint<N>

Source§

fn clone(&self) -> RevoluteJoint<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 RevoluteJoint<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 RevoluteJoint<N>

Source§

fn ndofs(&self) -> usize

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

fn body_to_parent( &self, parent_shift: &Vector<N>, body_shift: &Vector<N>, ) -> Isometry<N>

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

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

Update the jacobians of this joint.
Source§

fn jacobian(&self, transform: &Isometry<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: &Isometry<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: &Isometry<N>, acc: &[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 integrate(&mut self, parameters: &IntegrationParameters<N>, vels: &[N])

Integrate the position of 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 apply_displacement(&mut self, disp: &[N])

Apply a displacement to the joint.
Source§

fn jacobian_mul_coordinates(&self, acc: &[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, acc: &[N]) -> Velocity<N>

Multiply the joint jacobian by generalized accelerations to obtain the relative acceleration of the multibody link containing this 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, _: 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: RealField + Copy> UnitJoint<N> for RevoluteJoint<N>

Source§

fn position(&self) -> N

The generalized coordinate of the unit joint.
Source§

fn motor(&self) -> &JointMotor<N, N>

The motor applied to the degree of freedom of the unit joitn.
Source§

fn min_position(&self) -> Option<N>

The lower limit, if any, set to the generalized coordinate of this unit joint.
Source§

fn max_position(&self) -> Option<N>

The upper limit, if any, set to the generalized coordinate of this unit joint.
Source§

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

Auto Trait Implementations§

§

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

§

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

§

impl<N> Send for RevoluteJoint<N>

§

impl<N> Sync for RevoluteJoint<N>

§

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

§

impl<N> UnwindSafe for RevoluteJoint<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.