Public Member Functions | Private Member Functions | Private Attributes
kelsey_sandbox.behavior_manager.BehaviorManagerClient Class Reference

List of all members.

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

Detailed Description

Definition at line 157 of file behavior_manager.py.


Constructor & Destructor Documentation

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.

Parameters:
resourceName of the resource this behavior will register (must be in ALLOWED_RESOURCES) ['l_arm', 'r_arm', 'l_gripper', 'r_gripper', 'base', 'head', 'torso']
preempt_cbFunction to be called preempt_cb() when behavior needs to be preempted. Make sure this function is non-blocking.
resume_cbFunction 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.
priorityThe strength of the behavior to overrule others. A behavior with equal or greater priority will be able to preempt the current active behavior.
nameOptional prefix given to the behavior to make services more readable

Definition at line 172 of file behavior_manager.py.


Member Function Documentation

Definition at line 205 of file behavior_manager.py.

Definition at line 209 of file behavior_manager.py.

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.

Requests control of the resource from the behavior manager.

Parameters:
priorityOverride the default priority set in the initialization.
Returns:
Returns True if the resource is available, False if not.

Definition at line 225 of file behavior_manager.py.

Definition at line 212 of file behavior_manager.py.

Definition at line 215 of file behavior_manager.py.


Member Data Documentation

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.


The documentation for this class was generated from the following file:


kelsey_sandbox
Author(s): kelsey
autogenerated on Wed Nov 27 2013 11:52:04