@@ -491,6 +491,8 @@ def base_link(self, link):
491
491
raise ValueError ('must be an ELink' )
492
492
# self._reset_fk_path()
493
493
# --------------------------------------------------------------------- #
494
+ # TODO get configuration string
495
+
494
496
495
497
@property
496
498
def ee_links (self ):
@@ -556,6 +558,16 @@ def ets(self, ee=None):
556
558
557
559
return ets
558
560
561
+ def config (self ):
562
+ s = ''
563
+ for link in self .links :
564
+ if link .v is not None :
565
+ if link .v .isprismatic :
566
+ s += 'P'
567
+ elif link .v .isrevolute :
568
+ s += 'R'
569
+ return s
570
+
559
571
# --------------------------------------------------------------------- #
560
572
561
573
# def fkine(self, q=None):
@@ -1123,7 +1135,11 @@ def __str__(self):
1123
1135
link .parent .name if link .parent is not None else "-" ,
1124
1136
link ._joint_name if link .parent is not None else "" ,
1125
1137
ets .__str__ (f"q{ link ._jindex } " ))
1126
- return str (table )
1138
+
1139
+ s = str (table )
1140
+ s += self .configurations_str ()
1141
+
1142
+ return s
1127
1143
1128
1144
def hierarchy (self ):
1129
1145
"""
@@ -1844,20 +1860,26 @@ def collided(self, shape):
1844
1860
import roboticstoolbox as rtb
1845
1861
np .set_printoptions (precision = 4 , suppress = True )
1846
1862
1847
- robot = rtb .models .ETS .Panda ()
1848
- print (robot )
1849
- print (robot .base , robot .tool )
1850
- print (robot .ee_links )
1851
- ets = robot .ets ()
1852
- print (ets )
1853
- print ('n' , ets .n )
1854
- ets2 = ets .compile ()
1855
- print (ets2 )
1856
-
1857
- q = np .random .rand (7 )
1858
- # print(ets.eval(q))
1859
- # print(ets2.eval(q))
1860
-
1861
- J1 = robot .jacob0 (q )
1862
- J2 = ets2 .jacob0 (q )
1863
- print (J1 - J2 )
1863
+ p = rtb .models .URDF .Panda ()
1864
+ print (p [1 ].m )
1865
+
1866
+ # robot = rtb.models.ETS.Panda()
1867
+ # print(robot)
1868
+ # print(robot.base, robot.tool)
1869
+ # print(robot.ee_links)
1870
+ # ets = robot.ets()
1871
+ # print(ets)
1872
+ # print('n', ets.n)
1873
+ # ets2 = ets.compile()
1874
+ # print(ets2)
1875
+
1876
+ # q = np.random.rand(7)
1877
+ # # print(ets.eval(q))
1878
+ # # print(ets2.eval(q))
1879
+
1880
+ # J1 = robot.jacob0(q)
1881
+ # J2 = ets2.jacob0(q)
1882
+ # print(J1-J2)
1883
+
1884
+ # print(robot[2].v, robot[2].v.jindex)
1885
+ # print(robot[2].Ts)
0 commit comments