@@ -1447,7 +1447,7 @@ def URDF_read(file_path, tld=None, xacro_tld=None):
14471447
14481448 # --------------------------------------------------------------------- #
14491449
1450- def get_path (self , end = None , start = None , _fknm = False ):
1450+ def get_path (self , end = None , start = None ):
14511451 """
14521452 Find a path from start to end. The end must come after
14531453 the start (ie end must be further away from the base link
@@ -1466,20 +1466,17 @@ def get_path(self, end=None, start=None, _fknm=False):
14661466 path = []
14671467 n = 0
14681468
1469- end , start , tool = self ._get_limit_links (end , start )
1469+ end , start , tool = self ._get_limit_links (end = end , start = start )
14701470
14711471 # This is way faster than doing if x in y method
14721472 try :
1473- if _fknm :
1474- return self ._path_cache_fknm [start .name ][end .name ]
1475- else :
1476- return self ._path_cache [start .name ][end .name ]
1473+ return self ._path_cache [start .name ][end .name ]
14771474 except KeyError :
14781475 pass
14791476
14801477 if start .name not in self ._path_cache :
14811478 self ._path_cache [start .name ] = {}
1482- self ._path_cache_fknm [start .name ] = {}
1479+ # self._path_cache_fknm[start.name] = {}
14831480
14841481 link = end
14851482
@@ -1498,18 +1495,15 @@ def get_path(self, end=None, start=None, _fknm=False):
14981495 n += 1
14991496
15001497 path .reverse ()
1501- path_fknm = [x ._fknm for x in path ]
1498+ # path_fknm = [x._fknm for x in path]
15021499
15031500 if tool is None :
15041501 tool = SE3 ()
15051502
15061503 self ._path_cache [start .name ][end .name ] = (path , n , tool )
1507- self ._path_cache_fknm [start .name ][end .name ] = (path_fknm , n , tool .A )
1504+ # self._path_cache_fknm[start.name][end.name] = (path_fknm, n, tool.A)
15081505
1509- if _fknm :
1510- return path_fknm , n , tool .A
1511- else :
1512- return path , n , tool
1506+ return path , n , tool
15131507
15141508 def fkine (
15151509 self ,
@@ -1915,7 +1909,7 @@ def link_collision_damper(
19151909 :rtype: ndarray(6), ndarray(6)
19161910 """
19171911
1918- start , end , _ = self ._get_limit_links ()
1912+ end , start , _ = self ._get_limit_links (start = start , end = end )
19191913
19201914 links , n , _ = self .get_path (start = start , end = end )
19211915
@@ -1935,11 +1929,9 @@ def indiv_calculation(link, link_col, q):
19351929 lpTcp = - wTlp + wTcp
19361930
19371931 norm = lpTcp / d
1938- norm_h = expand_dims (concatenate ((norm , 0 , 0 , 0 )), axis = 0 )
1932+ norm_h = expand_dims (concatenate ((norm , [ 0 , 0 , 0 ] )), axis = 0 )
19391933
1940- Je = self .jacobe (
1941- q , start = self .base_link , end = link , tool = link_col .base .A
1942- )
1934+ Je = self .jacobe (q , start = self .base_link , end = link , tool = link_col .T )
19431935 n_dim = Je .shape [1 ]
19441936 dp = norm_h @ shape .v
19451937 l_Ain = zeros ((1 , n ))
0 commit comments