Public Member Functions | |
def | __init__ |
Interfaces with the behavior manager to control who has access to each of the robot resources at any given time. | |
def | relinquish |
Relinquishes control of the resource to the behavior manager. | |
def | request |
Requests control of the resource from the behavior manager. | |
def | set_preempt_cb |
def | set_resume_cb |
Private Member Functions | |
def | _call_preempt |
def | _call_resume |
def | _heartbeat_cb |
Private Attributes | |
_bname | |
_default_priority | |
_heartbeat_pub | |
_heartbeat_timer | |
_preempt_cb | |
_preempt_srv | |
_relinquish_resource | |
_request_resource | |
_resource | |
_resume_cb | |
_resume_srv |
Definition at line 157 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient.__init__ | ( | self, | |
resource, | |||
preempt_cb, | |||
resume_cb = None , |
|||
priority = BMPriorities.MEDIUM , |
|||
name = "behavior" |
|||
) |
Interfaces with the behavior manager to control who has access to each of the robot resources at any given time.
resource | Name of the resource this behavior will register (must be in ALLOWED_RESOURCES) ['l_arm', 'r_arm', 'l_gripper', 'r_gripper', 'base', 'head', 'torso'] |
preempt_cb | Function to be called preempt_cb() when behavior needs to be preempted. Make sure this function is non-blocking. |
resume_cb | Function to be called will_resume = resume_cb() when the preemptor has released control. The bool will_resume, if True, will give that behavior back control. Make sure this function is non-blocking. |
priority | The strength of the behavior to overrule others. A behavior with equal or greater priority will be able to preempt the current active behavior. |
name | Optional prefix given to the behavior to make services more readable |
Definition at line 172 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient._call_preempt | ( | self, | |
req | |||
) | [private] |
Definition at line 205 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient._call_resume | ( | self, | |
req | |||
) | [private] |
Definition at line 209 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient._heartbeat_cb | ( | self, | |
te | |||
) | [private] |
Definition at line 218 of file behavior_manager.py.
Relinquishes control of the resource to the behavior manager.
Definition at line 239 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient.request | ( | self, | |
priority = None |
|||
) |
Requests control of the resource from the behavior manager.
priority | Override the default priority set in the initialization. |
Definition at line 225 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient.set_preempt_cb | ( | self, | |
preempt_cb | |||
) |
Definition at line 212 of file behavior_manager.py.
def kelsey_sandbox.behavior_manager.BehaviorManagerClient.set_resume_cb | ( | self, | |
resume_cb | |||
) |
Definition at line 215 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 225 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.
Definition at line 172 of file behavior_manager.py.