chore: add more comments

This commit is contained in:
Sébastien Crozet
2024-06-09 10:57:37 +02:00
committed by Sébastien Crozet
parent cfddaa3c46
commit edaa36ac7e
41 changed files with 897 additions and 202 deletions

View File

@@ -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)

View File

@@ -17,6 +17,10 @@ use na::{UnitQuaternion, Vector3};
pub struct MultibodyJoint {
/// The joints 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>,

View File

@@ -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 {