@@ -1447,7 +1447,7 @@ def URDF_read(file_path, tld=None, xacro_tld=None):
1447
1447
1448
1448
# --------------------------------------------------------------------- #
1449
1449
1450
- def get_path (self , end = None , start = None , _fknm = False ):
1450
+ def get_path (self , end = None , start = None ):
1451
1451
"""
1452
1452
Find a path from start to end. The end must come after
1453
1453
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):
1466
1466
path = []
1467
1467
n = 0
1468
1468
1469
- end , start , tool = self ._get_limit_links (end , start )
1469
+ end , start , tool = self ._get_limit_links (end = end , start = start )
1470
1470
1471
1471
# This is way faster than doing if x in y method
1472
1472
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 ]
1477
1474
except KeyError :
1478
1475
pass
1479
1476
1480
1477
if start .name not in self ._path_cache :
1481
1478
self ._path_cache [start .name ] = {}
1482
- self ._path_cache_fknm [start .name ] = {}
1479
+ # self._path_cache_fknm[start.name] = {}
1483
1480
1484
1481
link = end
1485
1482
@@ -1498,18 +1495,15 @@ def get_path(self, end=None, start=None, _fknm=False):
1498
1495
n += 1
1499
1496
1500
1497
path .reverse ()
1501
- path_fknm = [x ._fknm for x in path ]
1498
+ # path_fknm = [x._fknm for x in path]
1502
1499
1503
1500
if tool is None :
1504
1501
tool = SE3 ()
1505
1502
1506
1503
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)
1508
1505
1509
- if _fknm :
1510
- return path_fknm , n , tool .A
1511
- else :
1512
- return path , n , tool
1506
+ return path , n , tool
1513
1507
1514
1508
def fkine (
1515
1509
self ,
@@ -1915,7 +1909,7 @@ def link_collision_damper(
1915
1909
:rtype: ndarray(6), ndarray(6)
1916
1910
"""
1917
1911
1918
- start , end , _ = self ._get_limit_links ()
1912
+ end , start , _ = self ._get_limit_links (start = start , end = end )
1919
1913
1920
1914
links , n , _ = self .get_path (start = start , end = end )
1921
1915
@@ -1935,11 +1929,9 @@ def indiv_calculation(link, link_col, q):
1935
1929
lpTcp = - wTlp + wTcp
1936
1930
1937
1931
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 )
1939
1933
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 )
1943
1935
n_dim = Je .shape [1 ]
1944
1936
dp = norm_h @ shape .v
1945
1937
l_Ain = zeros ((1 , n ))
0 commit comments