@@ -45,6 +45,7 @@ class Robot(openravepy.Robot):
45
45
def __init__ (self , robot_name = None ):
46
46
self .actions = None
47
47
self .planner = None
48
+ self .detector = None
48
49
self .robot_name = robot_name
49
50
50
51
try :
@@ -98,7 +99,9 @@ def __getattr__(self, name):
98
99
# __methods__ bypass __getattribute__.
99
100
self = bind .InstanceDeduplicator .get_canonical (self )
100
101
101
- if (hasattr (self , 'planner' ) and self .planner is not None
102
+ if (name != 'planner'
103
+ and hasattr (self , 'planner' )
104
+ and self .planner is not None
102
105
and self .planner .has_planning_method (name )):
103
106
104
107
delegate_method = getattr (self .planner , name )
@@ -107,15 +110,19 @@ def wrapper_method(*args, **kw_args):
107
110
return self ._PlanWrapper (delegate_method , args , kw_args )
108
111
109
112
return wrapper_method
110
- elif (hasattr (self , 'actions' ) and self .actions is not None
113
+ elif (name != 'actions'
114
+ and hasattr (self , 'actions' )
115
+ and self .actions is not None
111
116
and self .actions .has_action (name )):
112
117
113
118
delegate_method = self .actions .get_action (name )
114
119
@functools .wraps (delegate_method )
115
120
def wrapper_method (* args , ** kw_args ):
116
121
return delegate_method (self , * args , ** kw_args )
117
122
return wrapper_method
118
- elif (hasattr (self , 'detector' ) and self .detector is not None
123
+ elif (name != 'detector'
124
+ and hasattr (self , 'detector' )
125
+ and self .detector is not None
119
126
and self .detector .has_perception_method (name )):
120
127
121
128
delegate_method = getattr (self .detector , name )
0 commit comments