def abort(self, req=None):
"""
Service function for the aborting the task '[name]_abort'.
handles a shutdown of the task but instead of calling signal_complete,
this method calls `signal_aborted`, which lets the task server know
that it can proceed with launching a mayday task (as opposed to queueing
up another general task).
Args:
msg (std_msgs.msg.String): the message received through the
subscriber channel.
"""
if not self.active:
logwarn("Can't abort {} because task isn't active.".format(self.name))
return False
self.instruct()
self.prep_shutdown(did_fail=True)
return True
评论列表
文章目录