Skip to content

Commit

Permalink
prevent drift when linear velocity=0
Browse files Browse the repository at this point in the history
  • Loading branch information
i-make-robots committed Jan 7, 2024
1 parent 79c1fd4 commit a4cb7e6
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ private Pose getEndEffector() {

private void moveTowardsTarget() {
if(getLimb()==null || getEndEffector()==null || getTarget()==null || linearVelocity<0.0001) {
// no limb, no end effector, no target, or no velocity. Do nothing.
getLimb().setAllJointVelocities(new double[getLimb().getNumJoints()]);
return;
}
double[] cartesianVelocity = MatrixHelper.getCartesianBetweenTwoMatrices(
Expand Down

0 comments on commit a4cb7e6

Please sign in to comment.