Classes | Functions | Variables
rqt_py_common.rosaction Namespace Reference

Classes

class  ROSActionException
 
class  RosActionProtoArgsException
 
class  ROSActionProtoException
 

Functions

def _get_action_class (type_str, message_type, reload_on_error=False)
 
def _get_action_class_genpy (type_str, message_type, reload_on_error=False)
 
def _list_resources (path, rfilter=os.path.isfile)
 
def _list_types (path, subdir, ext)
 
def _msg_filter (ext)
 
def _stdin_arg (parser, full)
 
def construct_ordered_mapping (self, node, deep=False)
 
def construct_yaml_map_with_ordered_dict (self, node)
 
def create_names_filter (names)
 
def get_action_class (action_type, reload_on_error=False)
 
def get_array_type_instance (field_type, default_package=None)
 
def get_message_class_genpy (message_type, reload_on_error=False)
 
def get_msg_text (type_, raw=False, rospack=None)
 
def get_yaml_for_msg (msg, prefix='', time_offset=None, current_time=None, field_filter=None, flow_style_=None, fill_arrays_=False)
 
def init_rosaction_proto ()
 
def iterate_packages (rospack, mode)
 
def list_actions (package)
 
def list_types (package, mode=MODE_ACTION)
 
def represent_ordered_mapping (self, tag, mapping, flow_style=None)
 
def rosaction_cmd_list (mode, full, argv=None)
 
def rosaction_cmd_md5 (mode, full)
 
def rosaction_cmd_package (mode, full)
 
def rosaction_cmd_packages (mode, full, argv=None)
 
def rosaction_cmd_prototype (args)
 
def rosaction_cmd_show (mode, full)
 
def rosaction_debug (rospack, mode, type_, raw=False)
 
def rosaction_md5 (mode, type_)
 
def rosaction_search (rospack, mode, base_type)
 
def rosactionmain (mode=MODE_ACTION)
 
def spec_to_str (action_context, spec, buff=None, indent='')
 

Variables

dictionary _action_class_cache = {}
 
dictionary _message_class_cache_genpy = {}
 
int MAX_DEFAULT_NON_FLOW_ITEMS = 4
 
string MODE_ACTION = '.action'
 

Function Documentation

def rqt_py_common.rosaction._get_action_class (   type_str,
  message_type,
  reload_on_error = False 
)
private
Taken from roslib.message._get_message_or_service_class

Definition at line 163 of file rosaction.py.

def rqt_py_common.rosaction._get_action_class_genpy (   type_str,
  message_type,
  reload_on_error = False 
)
private
Taken from genpy.message._get_message_or_service_class

Utility for retrieving message/service class instances. Used by
get_message_class and get_service_class.
:param type_str: 'msg' or 'srv', ``str``
:param message_type: type name of message/service, ``str``
:returns: Message/Service  for message/service type or None, ``class``
:raises: :exc:`ValueError` If message_type is invalidly specified

Definition at line 105 of file rosaction.py.

def rqt_py_common.rosaction._list_resources (   path,
  rfilter = os.path.isfile 
)
private
List resources in a package directory within a particular
subdirectory. This is useful for listing messages, services, etc...
:param rfilter: resource filter function that returns true if filename is
the desired resource type, ``fn(filename)->bool``

Definition at line 261 of file rosaction.py.

def rqt_py_common.rosaction._list_types (   path,
  subdir,
  ext 
)
private
List all messages in the specified package
:param package str: name of package to search
:param include_depends bool: if True, will also list messages in package
                             dependencies
:returns [str]: message type names

Definition at line 276 of file rosaction.py.

def rqt_py_common.rosaction._msg_filter (   ext)
private

Definition at line 251 of file rosaction.py.

def rqt_py_common.rosaction._stdin_arg (   parser,
  full 
)
private

Definition at line 755 of file rosaction.py.

def rqt_py_common.rosaction.construct_ordered_mapping (   self,
  node,
  deep = False 
)

Definition at line 382 of file rosaction.py.

def rqt_py_common.rosaction.construct_yaml_map_with_ordered_dict (   self,
  node 
)

Definition at line 399 of file rosaction.py.

def rqt_py_common.rosaction.create_names_filter (   names)
returns a function to use as filter that returns all objects slots except those with names in list.

Definition at line 559 of file rosaction.py.

def rqt_py_common.rosaction.get_action_class (   action_type,
  reload_on_error = False 
)
Taken from roslib.message.get_action_class

Definition at line 217 of file rosaction.py.

def rqt_py_common.rosaction.get_array_type_instance (   field_type,
  default_package = None 
)
returns a single instance of field_type, where field_type can be a
message or ros primitive or an flexible size array.

Definition at line 434 of file rosaction.py.

def rqt_py_common.rosaction.get_message_class_genpy (   message_type,
  reload_on_error = False 
)
Taken from genpy.message.get_message_class

Get the message class. NOTE: this function maintains a
local cache of results to improve performance.
:param message_type: type name of message, ``str``
:param reload_on_error: (optional). Attempt to reload the Python
  module if unable to load message the first time. Defaults to
  False. This is necessary if messages are built after the first load.
:returns: Message class for message/service type, ``Message class``
:raises :exc:`ValueError`: if  message_type is invalidly specified

Definition at line 141 of file rosaction.py.

def rqt_py_common.rosaction.get_msg_text (   type_,
  raw = False,
  rospack = None 
)
Get .msg file for type_ as text
:param type_: message type, ``str``
:param raw: if True, include comments and whitespace (default False), ``bool``
:returns: text of .msg file, ``str``
:raises :exc:`ROSActionException` If type_ is unknown

Definition at line 707 of file rosaction.py.

def rqt_py_common.rosaction.get_yaml_for_msg (   msg,
  prefix = '',
  time_offset = None,
  current_time = None,
  field_filter = None,
  flow_style_ = None,
  fill_arrays_ = False 
)
Builds a YAML string of message.
@param msg: A object, dict or array
@param flow_style_: if True, produces one line with brackets, if false uses multiple lines with indentation, if None uses both using heuristics
@param prefix: prefixes all lines with this string
@param fill_arrays_: if True, for all flexible size arrays an element will be generated
@param current_time: currently not used. Only provided for API compatibility. current_time passes in the current time with respect to the message.
@type  current_time: Time
@param field_filter: filter the fields that are strified for Messages.
@type  field_filter: fn(Message)->iter(str)
@type  flow_style_: bool
@return: a string

Definition at line 473 of file rosaction.py.

def rqt_py_common.rosaction.init_rosaction_proto ( )

Definition at line 566 of file rosaction.py.

def rqt_py_common.rosaction.iterate_packages (   rospack,
  mode 
)
Iterator for packages that contain actions
:param mode: .action, ``str``

Definition at line 235 of file rosaction.py.

def rqt_py_common.rosaction.list_actions (   package)
List actions contained in package
:param package: package name, ``str``
:returns: list of actions in package, ``[str]``

Definition at line 315 of file rosaction.py.

def rqt_py_common.rosaction.list_types (   package,
  mode = MODE_ACTION 
)
Lists msg/srvs contained in package
:param package: package name, ``str``
:param mode: MODE_ACTION. Defaults to msgs, ``str``
:returns: list of msgs/srv in package, ``[str]``

Definition at line 293 of file rosaction.py.

def rqt_py_common.rosaction.represent_ordered_mapping (   self,
  tag,
  mapping,
  flow_style = None 
)

Definition at line 406 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_cmd_list (   mode,
  full,
  argv = None 
)

Definition at line 88 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_cmd_md5 (   mode,
  full 
)

Definition at line 824 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_cmd_package (   mode,
  full 
)

Definition at line 847 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_cmd_packages (   mode,
  full,
  argv = None 
)

Definition at line 859 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_cmd_prototype (   args)

Definition at line 578 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_cmd_show (   mode,
  full 
)

Definition at line 769 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_debug (   rospack,
  mode,
  type_,
  raw = False 
)
Prints contents of msg/srv file
:param mode: MODE_ACTION or MODE_SRV, ``str``

Definition at line 876 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_md5 (   mode,
  type_ 
)

Definition at line 810 of file rosaction.py.

def rqt_py_common.rosaction.rosaction_search (   rospack,
  mode,
  base_type 
)
Iterator for all packages that contain a message matching base_type

:param base_type: message base type to match, e.g. 'String' would match std_msgs/String, ``str``

Definition at line 744 of file rosaction.py.

def rqt_py_common.rosaction.rosactionmain (   mode = MODE_ACTION)
Main entry point for command-line tools (rosaction).

rosaction can interact with either ros messages or ros services. The mode
param indicates which
:param mode: MODE_ACTION or MODE_SRV, ``str``

Definition at line 324 of file rosaction.py.

def rqt_py_common.rosaction.spec_to_str (   action_context,
  spec,
  buff = None,
  indent = '' 
)
Convert spec into a string representation. Helper routine for MsgSpec.
:param indent: internal use only, ``str``
:param buff: internal use only, ``StringIO``
:returns: string representation of spec, ``str``

Definition at line 687 of file rosaction.py.

Variable Documentation

dictionary rqt_py_common.rosaction._action_class_cache = {}
private

Definition at line 214 of file rosaction.py.

dictionary rqt_py_common.rosaction._message_class_cache_genpy = {}
private

Definition at line 138 of file rosaction.py.

int rqt_py_common.rosaction.MAX_DEFAULT_NON_FLOW_ITEMS = 4

Definition at line 83 of file rosaction.py.

string rqt_py_common.rosaction.MODE_ACTION = '.action'

Definition at line 85 of file rosaction.py.



rqt_py_common
Author(s): Dorian Scholz, Isaac Saito, Dirk Thomas
autogenerated on Mon Mar 22 2021 02:13:26