8000 add flag to ignore Coulomb friction · G-SS/robotics-toolbox-python@1f7a553 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f7a553

Browse files
committed
add flag to ignore Coulomb friction
1 parent ce57f27 commit 1f7a553

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

roboticstoolbox/robot/DHLink.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def nofriction(self, coulomb=True, viscous=False):
573573

574574
return link
575575

576-
def friction(self, qd):
576+< A77D div class="diff-text-inner"> def friction(self, qd, coulomb=True):
577577
"""
578578
``tau = friction(qd)`` Calculates the joint friction force/torque (n)
579579
for joint velocity qd (n). The friction model includes:
@@ -607,10 +607,11 @@ def friction(self, qd):
607607

608608
tau = self.B * np.abs(self.G) * qd
609609

610-
if qd > 0:
611-
tau += self.Tc[0]
612-
elif qd < 0:
613-
tau += self.Tc[1]
610+
if coulomb:
611+
if qd > 0:
612+
tau += self.Tc[0]
613+
elif qd < 0:
614+
tau += self.Tc[1]
614615

615616
# Scale up by gear ratio
616617
tau = -np.abs(self.G) * tau

0 commit comments

Comments
 (0)
0