File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,6 @@ def __init__(
20
20
self .name = name
21
21
self .manufacturer = manufacturer
22
22
23
- if base is None :
24
- base = SE3 ()
25
- if tool is None :
26
- tool = SE3 ()
27
23
self .base = base
28
24
self .tool = tool
29
25
if keywords is not None and not isinstance (keywords , (tuple , list )):
@@ -96,15 +92,22 @@ def manufacturer(self, manufacturer_new):
96
92
97
93
@base .setter
98
94
def base (self , T ):
99
- if not isinstance (T , SE3 ):
100
- T = SE3 (T )
101
- self ._base = T
95
+ # if not isinstance(T, SE3):
96
+ # T = SE3(T)
97
+ if T is None or isinstance (T , SE3 ):
98
+ self ._base = T
99
+ else :
100
+ raise ValueError ('base must be set to None (no tool) or an SE3' )
102
101
103
102
@tool .setter
104
103
def tool (self , T ):
105
- if not isinstance (T , SE3 ):
106
- T = SE3 (T )
107
- self ._tool = T
104
+ # if not isinstance(T, SE3):
105
+ # T = SE3(T)
106
+ # this is allowed to be none, it's helpful for symbolics rather than having an identity matrix
107
+ if T is None or isinstance (T , SE3 ):
108
+ self ._tool = T
109
+ else :
110
+ raise ValueError ('tool must be set to None (no tool) or an SE3' )
108
111
109
112
@gravity .setter
110
113
def gravity (self , gravity_new ):
You can’t perform that action at this time.
0 commit comments