Skip to content

Commit af83dbe

Browse files
committed
erobot tune up
1 parent 164ff53 commit af83dbe

File tree

9 files changed

+231
-233
lines changed

9 files changed

+231
-233
lines changed

roboticstoolbox/backend/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from roboticstoolbox.backend.urdf import *
33

44
# try:
5-
#from roboticstoolbox.backend.Swift import *
5+
from roboticstoolbox.backend.Swift import *
66
# except ImportError:
77
# pass
88

roboticstoolbox/models/URDF/Panda.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Panda(ERobot):
1010
Class that imports a Panda URDF model
1111
1212
``Panda()`` is a class which imports a Franka-Emika Panda robot definition
13-
from a URDF file. The model describes its kinematic and graphical
13+
from a URDF file. The model describes its kinematic and graphical
1414
characteristics.
1515
1616
.. runblock:: pycon
@@ -37,17 +37,18 @@ def __init__(self):
3737
super().__init__(
3838
elinks,
3939
name=name,
40-
manufacturer = 'Franka Emika',
40+
manufacturer='Franka Emika',
4141
ee_links=elinks[8]
42-
)
42+
)
4343

4444
self.qdlim = np.array([
4545
2.1750, 2.1750, 2.1750, 2.1750, 2.6100, 2.6100, 2.6100, 3.0, 3.0])
4646

47-
# self.addconfiguration("qz", np.array(
48-
# [0, 0, 0, 0, 0, 0, 0, 0, 0]))
49-
# self.addconfiguration("qr", np.array(
50-
# [0, -0.3, 0, -2.2, 0, 2.0, np.pi/4, 0, 0]))
47+
self.addconfiguration("qz", np.array(
48+
[0, 0, 0, 0, 0, 0, 0, 0, 0]))
49+
50+
self.addconfiguration("qr", np.array(
51+
[0, -0.3, 0, -2.2, 0, 2.0, np.pi/4, 0, 0]))
5152

5253

5354
if __name__ == '__main__': # pragma nocover

roboticstoolbox/robot/ELink.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class ELink(Link):
3838
3939
The ELink object holds all information related to a robot link and can form
4040
a serial-connected chain or a rigid-body tree.
41-
41+
4242
It inherits from the Link class which provides common functionality such
4343
as joint and link such as kinematics parameters,
4444
.
@@ -118,7 +118,7 @@ def __init__(
118118

119119
def __repr__(self):
120120
name = self.__class__.__name__
121-
s = "ets=" + str(self.ets())
121+
s = "ets=" + str(self.ets)
122122
if self.parent is not None:
123123
s += ", parent=" + str(self.parent.name)
124124
args = [s] + super()._params()
@@ -136,7 +136,7 @@ def __str__(self):
136136
parent = ""
137137
else:
138138
parent = f" [{self.parent.name}]"
139-
return f"name[{self.name}({parent}): {self.ets()}] "
139+
return f"name[{self.name}({parent}): {self.ets}] "
140140

141141
@property
142142
def v(self):
@@ -225,18 +225,12 @@ def geometry(self, geom):
225225

226226
self._geometry = new_geom
227227

228-
229228
# @r.setter
230229
# def r(self, T):
231230
# if not isinstance(T, SE3):
232231
# T = SE3(T)
233232
# self._r = T
234233

235-
236-
237-
238-
239-
240234
def A(self, q=None, fast=False):
241235
"""
242236
Link transform matrix
@@ -278,12 +272,12 @@ def A(self, q=None, fast=False):
278272
else:
279273
return self.Ts
280274

275+
@property
281276
def ets(self):
282277
if self.v is None:
283278
return self._ets
284279
else:
285-
return self._ets * self.v
286-
280+
return self._ets * self.v
287281

288282
def closest_point(self, shape, inf_dist=1.0):
289283
'''

0 commit comments

Comments
 (0)