module documentation

Undocumented

Class ControllerLister Convenience functor for querying loaded controller data.
Class ControllerManagerLister Convenience functor for querying the list of active controller managers.
Function filter_by_hardware_interface Filter controller state list by controller hardware interface.
Function filter_by_name Filter controller state list by controller name.
Function filter_by_resources Filter controller state list by claimed resources.
Function filter_by_state Filter controller state list by controller state.
Function filter_by_type Filter controller state list by controller type.
Function get_controller_managers Get list of active controller manager namespaces.
Function get_rosparam_controller_names Get list of ROS parameter names that potentially represent a controller configuration.
Function is_controller_manager Check if the input namespace exposes the controller_manager ROS interface.
Variable cm_services Undocumented
Function _filter_by_attr Filter input list by the value of its elements' attributes.
Function _sloppy_get_controller_managers Get list of I{potential} active controller manager namespaces.
Function _srv_exists Check if a ROS service of specific name and type exists.
Constant _LIST_CONTROLLER_TYPES_STR Undocumented
Constant _LIST_CONTROLLER_TYPES_TYPE Undocumented
Constant _LIST_CONTROLLERS_STR Undocumented
Constant _LIST_CONTROLLERS_TYPE Undocumented
Constant _LOAD_CONTROLLER_STR Undocumented
Constant _LOAD_CONTROLLER_TYPE Undocumented
Constant _RELOAD_CONTROLLER_LIBS_STR Undocumented
Constant _RELOAD_CONTROLLER_LIBS_TYPE Undocumented
Constant _SWITCH_CONTROLLER_STR Undocumented
Constant _SWITCH_CONTROLLER_TYPE Undocumented
Constant _UNLOAD_CONTROLLER_STR Undocumented
Constant _UNLOAD_CONTROLLER_TYPE Undocumented
def filter_by_hardware_interface(ctrl_list, hardware_interface, match_substring=False):

Filter controller state list by controller hardware interface.

@param ctrl_list: Controller state list @type ctrl_list: [controller_manager_msgs/ControllerState] @param hardware_interface: Controller hardware interface @type hardware_interface: str @param match_substring: Set to True to allow substring matching @type match_substring: bool @return: Controllers matching the specified hardware interface @rtype: [controller_manager_msgs/ControllerState]

def filter_by_name(ctrl_list, ctrl_name, match_substring=False):

Filter controller state list by controller name.

@param ctrl_list: Controller state list @type ctrl_list: [controller_manager_msgs/ControllerState] @param ctrl_name: Controller name @type ctrl_name: str @param match_substring: Set to True to allow substring matching @type match_substring: bool @return: Controllers matching the specified name @rtype: [controller_manager_msgs/ControllerState]

def filter_by_resources(ctrl_list, resources, hardware_interface=None, match_any=False):

Filter controller state list by claimed resources.

@param ctrl_list: Controller state list @type ctrl_list: [controller_manager_msgs/ControllerState] @param resources: Controller resources @type resources: [str] @param hardware_interface Controller hardware interface where to look for resources. If specified, the requested resources will only be searched for in this interface. If unspecified, all controller hardware interfaces will be searched for; i.e., if a controller claims resources from multiple interfaces, the method will succeed if _any_ interface contains the requested resources (any or all, depending on the value of C{match_any}). Specifying this parameter allows finer control over determining which interfaces claim specific resources. @param match_any: If set to False, all elements in C{resources} must be claimed by the interface specified in C{hardware_interface} (or _any_ interface, if C{hardware_interface} is unspecified) for a positive match. Note that a controller's resources can contain additional entries than those in C{resources}). If set to True, at least one element in C{resources} must be claimed by the interface specified in C{hardware_interface} (or _any_ interface, if C{hardware_interface} is unspecified) for a positive match. @type match_any: bool @return: Controllers matching the specified hardware interface @rtype: [controller_manager_msgs/ControllerState]

def filter_by_state(ctrl_list, ctrl_state, match_substring=False):

Filter controller state list by controller state.

@param ctrl_list: Controller state list @type ctrl_list: [controller_manager_msgs/ControllerState] @param ctrl_state: Controller state @type ctrl_state: str @param match_substring: Set to True to allow substring matching @type match_substring: bool @return: Controllers matching the specified state @rtype: [controller_manager_msgs/ControllerState]

def filter_by_type(ctrl_list, ctrl_type, match_substring=False):

Filter controller state list by controller type.

@param ctrl_list: Controller state list @type ctrl_list: [controller_manager_msgs/ControllerState] @param ctrl_type: Controller type @type ctrl_type: str @param match_substring: Set to True to allow substring matching @type match_substring: bool @return: Controllers matching the specified type @rtype: [controller_manager_msgs/ControllerState]

def get_controller_managers(namespace='/', initial_guess=None):

Get list of active controller manager namespaces.

@param namespace: Namespace where to look for controller managers. @type namespace: str @param initial_guess: Initial guess of the active controller managers. Typically c{initial_guess} is the output of a previous call to this method, and is useful when periodically checking for changes in the list of active controller managers. Elements in this list will go through a lazy validity check (as opposed to a full name+type API verification), so providing a good estimate can significantly reduce the number of ROS master queries incurred by this method. @type initial_guess: [str] @return: Sorted list of active controller manager namespaces. @rtype: [str]

def get_rosparam_controller_names(namespace='/'):

Get list of ROS parameter names that potentially represent a controller configuration.

Example usage:
  • Assume the following parameters exist in the ROS parameter: server:

    • C{/foo/type}
    • C{/xxx/type/xxx}
    • C{/ns/bar/type}
    • C{/ns/yyy/type/yyy}
  • The potential controllers found by this method are:

>>> names    = get_rosparam_controller_names()      # returns ['foo']
>>> names_ns = get_rosparam_controller_names('/ns') # returns ['bar']

@param namespace: Namespace where to look for controllers. @type namespace: str @return: Sorted list of ROS parameter names. @rtype: [str]

def is_controller_manager(namespace):

Check if the input namespace exposes the controller_manager ROS interface.

This method has the overhead of several ROS master queries (one per ROS API member).

@param namespace: Namespace to check @type namespace: str @return: True if namespace exposes the controller_manager ROS interface @rtype: bool

cm_services =

Undocumented

def _filter_by_attr(list_in, attr_name, attr_val, match_substring=False):

Filter input list by the value of its elements' attributes.

def _sloppy_get_controller_managers(namespace):

Get list of I{potential} active controller manager namespaces.

The method name is prepended with I{sloppy}, and the returned list contains I{potential} active controller managers because it does not perform a thorough check of the expected ROS API. It rather tries to minimize the number of ROS master queries.

This method has the overhead of one ROS master query.

@param namespace: Namespace where to look for controller managers. @type namespace: str @return: List of I{potential} active controller manager namespaces. @rtype: [str]

def _srv_exists(srv_name, srv_type):

Check if a ROS service of specific name and type exists.

This method has the overhead of one ROS master query.

@param srv_name: Fully qualified service name @type srv_name: str @param srv_type: Service type @type srv_type: str

_LIST_CONTROLLER_TYPES_STR: str =

Undocumented

Value
'list_controller_types'
_LIST_CONTROLLER_TYPES_TYPE: str =

Undocumented

Value
'controller_manager_msgs/ListControllerTypes'
_LIST_CONTROLLERS_STR: str =

Undocumented

Value
'list_controllers'
_LIST_CONTROLLERS_TYPE: str =

Undocumented

Value
'controller_manager_msgs/ListControllers'
_LOAD_CONTROLLER_STR: str =

Undocumented

Value
'load_controller'
_LOAD_CONTROLLER_TYPE: str =

Undocumented

Value
'controller_manager_msgs/LoadController'
_RELOAD_CONTROLLER_LIBS_STR: str =

Undocumented

Value
'reload_controller_libraries'
_RELOAD_CONTROLLER_LIBS_TYPE: str =

Undocumented

Value
'controller_manager_msgs/ReloadControllerLibraries'
_SWITCH_CONTROLLER_STR: str =

Undocumented

Value
'switch_controller'
_SWITCH_CONTROLLER_TYPE: str =

Undocumented

Value
'controller_manager_msgs/SwitchController'
_UNLOAD_CONTROLLER_STR: str =

Undocumented

Value
'unload_controller'
_UNLOAD_CONTROLLER_TYPE: str =

Undocumented

Value
'controller_manager_msgs/UnloadController'