@@ -120,6 +120,8 @@ def send(self, result_callback=None, timeout=None):
120
120
if result_callback :
121
121
self .on ('result' , result_callback )
122
122
123
+ self .status = {'status' : GoalStatus .PENDING }
124
+
123
125
self .action_client .goal_topic .publish (self .goal_message )
124
126
if timeout :
125
127
self .action_client .ros .call_later (timeout , self ._trigger_timeout )
@@ -163,6 +165,8 @@ def _set_feedback(self, feedback):
163
165
164
166
@property
165
167
def is_active (self ):
168
+ if self .status is None :
169
+ return False
166
170
return (self .status ['status' ] == GoalStatus .ACTIVE or
167
171
self .status ['status' ] == GoalStatus .PENDING )
168
172
@@ -244,15 +248,13 @@ def _on_feedback_message(self, message):
244
248
goal = self .goals .get (goal_id , None )
245
249
246
250
if goal :
247
- goal .emit ('status' , message ['status' ])
248
251
goal .emit ('feedback' , message ['feedback' ])
249
252
250
253
def _on_result_message (self , message ):
251
254
goal_id = message ['status' ]['goal_id' ]['id' ]
252
255
goal = self .goals .get (goal_id , None )
253
256
254
257
if goal :
255
- goal .emit ('status' , message ['status' ])
256
258
goal .emit ('result' , message ['result' ])
257
259
258
260
def add_goal (self , goal ):
0 commit comments