Skip to content

Commit

Permalink
Solve bug in angle displacement in JointConstraint
Browse files Browse the repository at this point in the history
  • Loading branch information
TanguyNav committed Jan 29, 2024
1 parent 1b3ef9d commit f414ef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SoftRobots/component/constraint/JointConstraint.inl
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ void JointConstraint<DataTypes>::storeLambda(const ConstraintParams* cParams,
// Update joint angle
ReadAccessor<sofa::Data<VecCoord> > positions = m_state->readPositions();
m_currentAngle = positions[d_index.getValue()][0];
d_displacement.setValue(m_initAngle- m_currentAngle);
d_displacement.setValue(-m_initAngle+m_currentAngle);
}


Expand Down

0 comments on commit f414ef7

Please sign in to comment.