@@ -1779,46 +1779,6 @@ def jacob0v(
17791779
17801780 return Jv
17811781
1782- def joint_velocity_damper (self , ps = 0.05 , pi = 0.1 , n = None , gain = 1.0 ):
1783- '''
1784- Formulates an inequality contraint which, when optimised for will
1785- make it impossible for the robot to run into joint limits. Requires
1786- the joint limits of the robot to be specified. See examples/mmc.py
1787- for use case
1788-
1789- :param ps: The minimum angle (in radians) in which the joint is
1790- allowed to approach to its limit
1791- :type ps: float
1792- :param pi: The influence angle (in radians) in which the velocity
1793- damper becomes active
1794- :type pi: float
1795- :param n: The number of joints to consider. Defaults to all joints
1796- :type n: int
1797- :param gain: The gain for the velocity damper
1798- :type gain: float
1799-
1800- :returns: Ain, Bin as the inequality contraints for an optisator
1801- :rtype: ndarray(6), ndarray(6)
1802- '''
1803-
1804- if n is None :
1805- n = self .n
1806-
1807- Ain = np .zeros ((n , n ))
1808- Bin = np .zeros (n )
1809-
1810- for i in range (n ):
1811- if self .q [i ] - self .qlim [0 , i ] <= pi :
1812- Bin [i ] = - gain * (
1813- ((self .qlim [0 , i ] - self .q [i ]) + ps ) / (pi - ps ))
1814- Ain [i , i ] = - 1
1815- if self .qlim [1 , i ] - self .q [i ] <= pi :
1816- Bin [i ] = gain * (
1817- (self .qlim [1 , i ] - self .q [i ]) - ps ) / (pi - ps )
1818- Ain [i , i ] = 1
1819-
1820- return Ain , Bin
1821-
18221782 def link_collision_damper (
18231783 self , shape , q = None , di = 0.3 , ds = 0.05 , xi = 1.0 ,
18241784 endlink = None , startlink = None ):
0 commit comments