diff options
| author | Sébastien Crozet <sebcrozet@dimforge.com> | 2024-06-09 10:57:37 +0200 |
|---|---|---|
| committer | Sébastien Crozet <sebastien@crozet.re> | 2024-06-09 12:09:58 +0200 |
| commit | edaa36ac7e702f419faab4ff1b9af858fc84177f (patch) | |
| tree | 059a92ef66db3f4769146ef20b64b3dcbb649129 /src/dynamics/joint/multibody_joint | |
| parent | cfddaa3c46e58f59d551e3dc7fc5d4380b322789 (diff) | |
| download | rapier-edaa36ac7e702f419faab4ff1b9af858fc84177f.tar.gz rapier-edaa36ac7e702f419faab4ff1b9af858fc84177f.tar.bz2 rapier-edaa36ac7e702f419faab4ff1b9af858fc84177f.zip | |
chore: add more comments
Diffstat (limited to 'src/dynamics/joint/multibody_joint')
| -rw-r--r-- | src/dynamics/joint/multibody_joint/multibody.rs | 4 | ||||
| -rw-r--r-- | src/dynamics/joint/multibody_joint/multibody_joint.rs | 4 | ||||
| -rw-r--r-- | src/dynamics/joint/multibody_joint/multibody_joint_set.rs | 1 |
3 files changed, 5 insertions, 4 deletions
diff --git a/src/dynamics/joint/multibody_joint/multibody.rs b/src/dynamics/joint/multibody_joint/multibody.rs index 352f289..acf1444 100644 --- a/src/dynamics/joint/multibody_joint/multibody.rs +++ b/src/dynamics/joint/multibody_joint/multibody.rs @@ -569,8 +569,6 @@ impl Multibody { return; // Nothing to do. } - let mut kinematic_ndofs = 0; - if self.augmented_mass.ncols() != self.ndofs { // TODO: do a resize instead of a full reallocation. self.augmented_mass = DMatrix::zeros(self.ndofs, self.ndofs); @@ -1058,7 +1056,7 @@ impl Multibody { bodies: &RigidBodySet, link_id: usize, displacement: Option<&[Real]>, - mut out_jacobian: Option<&mut Jacobian<Real>>, + out_jacobian: Option<&mut Jacobian<Real>>, ) -> Isometry<Real> { let branch = self.kinematic_branch(link_id); self.forward_kinematics_single_branch(bodies, &branch, displacement, out_jacobian) diff --git a/src/dynamics/joint/multibody_joint/multibody_joint.rs b/src/dynamics/joint/multibody_joint/multibody_joint.rs index 6b37cb9..179b061 100644 --- a/src/dynamics/joint/multibody_joint/multibody_joint.rs +++ b/src/dynamics/joint/multibody_joint/multibody_joint.rs @@ -17,6 +17,10 @@ use na::{UnitQuaternion, Vector3}; pub struct MultibodyJoint { /// The joint’s description. pub data: GenericJoint, + /// Is the joint a kinematic joint? + /// + /// Kinematic joint velocities are never changed by the physics engine. This gives the user + /// total control over the values of their degrees of freedoms. pub kinematic: bool, pub(crate) coords: SpacialVector<Real>, pub(crate) joint_rot: Rotation<Real>, diff --git a/src/dynamics/joint/multibody_joint/multibody_joint_set.rs b/src/dynamics/joint/multibody_joint/multibody_joint_set.rs index 092a250..6ffdece 100644 --- a/src/dynamics/joint/multibody_joint/multibody_joint_set.rs +++ b/src/dynamics/joint/multibody_joint/multibody_joint_set.rs @@ -158,7 +158,6 @@ impl MultibodyJointSet { kinematic: bool, wake_up: bool, ) -> Option<MultibodyJointHandle> { - println!("Inserting kinematic: {}", kinematic); let link1 = self.rb2mb.get(body1.0).copied().unwrap_or_else(|| { let mb_handle = self.multibodies.insert(Multibody::with_root(body1, true)); MultibodyLinkId { |
