Undocumented
Class |
|
Container class for holding a Constant declaration |
Class |
|
Container class for storing information about a single field in a MsgSpec |
Class |
|
Container class for storing loaded msg description files. Field types and names are stored in separate lists with 1-to-1 correspondence. MsgSpec can also return an md5 of the source text. |
Exception |
|
Undocumented |
Function | base |
Compute the base data type, e.g. for arrays, get the underlying array item type @param type_: ROS msg type (e.g. 'std_msgs/String') @type type_: str @return: base type @rtype: str |
Function | get |
List all messages that a package contains. |
Function | get |
@param msg_type_name: name of message type @type msg_type_name: str @return: msg spec for msg type name @rtype: L{MsgSpec} |
Function | is |
@param msg_type_name: name of message type @type msg_type_name: str @return: True if msg_type_name is a builtin/primitive type @rtype: bool |
Function | is |
@param type_: message type name @type type_: str @return: True if \x07 type_ refers to the ROS Header type @rtype: bool |
Function | is |
@param msg_type_name: name of message type @type msg_type_name: str @return: True if msg spec for specified msg type name is registered. NOTE: builtin types are not registered. @rtype: bool |
Function | is |
@return: True if the name is a legal constant type. Only simple types are allowed. @rtype: bool |
Function | is |
@return: True if the name is a syntatically legal message field name @rtype: bool |
Function | is |
@return: True if the name is a syntatically legal message type name @rtype: bool |
Function | is |
Undocumented |
Function | list |
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 @return [str]: message type names... |
Function | load |
Load message specification for specified type |
Function | load |
Convert the .msg representation in the file to a MsgSpec instance. This does not register the object. @param file_path: path of file to load from @type file_path: str: @param package_context: package name to prepend to type name or... |
Function | load |
Load message specification from a string. @param text: .msg text @type text: str @param package_context: package name to use for the type name or |
Function | load |
Load package into the local registered namespace. All messages found in the package will be registered if they are successfully loaded. This should only be done with one package (i.e. the 'main' package) per Python instance. |
Function | load |
Register all messages that the specified package depends on. |
Function | msg |
Determine the file system path for the specified .msg resource. .msg resource does not have to exist. |
Function | parse |
Parse ROS message field type @param type_: ROS field type @type type_: str @return: base_type, is_array, array_length @rtype: str, bool, int @raise MsgSpecException: if type_ cannot be parsed |
Function | register |
Load MsgSpec into the type dictionary |
Function | reinit |
Reinitialize roslib.msgs. This API is for message generators (e.g. genpy) that need to re-initialize the registration table. |
Function | resolve |
Resolve type name based on current package context. |
Function | set |
Undocumented |
Constant | BUILTIN |
Undocumented |
Constant | COMMENTCHAR |
Undocumented |
Constant | CONSTCHAR |
Undocumented |
Constant | DURATION |
Undocumented |
Constant | DURATION |
Undocumented |
Constant | EXT |
Undocumented |
Constant | EXTENDED |
Undocumented |
Constant | HEADER |
Undocumented |
Constant | PRIMITIVE |
Undocumented |
Constant | REGISTERED |
Undocumented |
Constant | RESERVED |
Undocumented |
Constant | SEP |
Undocumented |
Constant | TIME |
Undocumented |
Constant | TIME |
Undocumented |
Constant | VERBOSE |
Undocumented |
Function | _convert |
Convert constant value declaration to python value. Does not do type-checking, so ValueError or other exceptions may be raised. |
Function | _init |
Undocumented |
Function | _msg |
Predicate for filtering directory list. matches message files @param f: filename @type f: str |
Function | _strify |
Convert spec into a string representation. Helper routine for MsgSpec. @param indent: internal use only @type indent: str @param buff: internal use only @type buff: StringIO @return: string representation of spec @rtype: str... |
Variable | _initialized |
Undocumented |
Variable | _loaded |
Undocumented |
Compute the base data type, e.g. for arrays, get the underlying array item type @param type_: ROS msg type (e.g. 'std_msgs/String') @type type_: str @return: base type @rtype: str
List all messages that a package contains.
@param package: package to load messages from @type package: str @return: list of message type names and specs for package, as well as a list
of message names that could not be processed.
@rtype: [(str, L{MsgSpec}), [str]]
@param msg_type_name: name of message type @type msg_type_name: str @return: msg spec for msg type name @rtype: L{MsgSpec}
@param msg_type_name: name of message type @type msg_type_name: str @return: True if msg_type_name is a builtin/primitive type @rtype: bool
@param type_: message type name @type type_: str @return: True if \x07 type_ refers to the ROS Header type @rtype: bool
@param msg_type_name: name of message type @type msg_type_name: str @return: True if msg spec for specified msg type name is registered. NOTE: builtin types are not registered. @rtype: bool
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 @return [str]: message type names
Load message specification for specified type
- @param package_context: package name to use for the type name or
- '' to use the local (relative) naming convention.
@type package_context: str @return: Message type name and message specification @rtype: (str, L{MsgSpec})
Convert the .msg representation in the file to a MsgSpec instance. This does not register the object. @param file_path: path of file to load from @type file_path: str: @param package_context: package name to prepend to type name or
'' to use local (relative) naming convention.
@type package_context: str @return: Message type name and message specification @rtype: (str, L{MsgSpec}) @raise MsgSpecException: if syntax errors or other problems are detected in file
Load message specification from a string. @param text: .msg text @type text: str @param package_context: package name to use for the type name or
'' to use the local (relative) naming convention.
@type package_context: str @return: Message specification @rtype: L{MsgSpec} @raise MsgSpecException: if syntax errors or other problems are detected in file
Load package into the local registered namespace. All messages found in the package will be registered if they are successfully loaded. This should only be done with one package (i.e. the 'main' package) per Python instance.
@param package: package name @type package: str
Register all messages that the specified package depends on.
- @param load_recursive: (optional) if True, load all dependencies,
- not just direct dependencies. By default, this is false to prevent packages from incorrectly inheriting dependencies.
@type load_recursive: bool
Determine the file system path for the specified .msg resource. .msg resource does not have to exist.
@param package: name of package .msg file is in @type package: str @param type_: type name of message, e.g. 'Point2DFloat32' @type type_: str @return: file path of .msg file in specified package @rtype: str
Parse ROS message field type @param type_: ROS field type @type type_: str @return: base_type, is_array, array_length @rtype: str, bool, int @raise MsgSpecException: if type_ cannot be parsed
Load MsgSpec into the type dictionary
@param msg_type_name: name of message type @type msg_type_name: str @param msg_spec: spec to load @type msg_spec: L{MsgSpec}
Reinitialize roslib.msgs. This API is for message generators (e.g. genpy) that need to re-initialize the registration table.
Resolve type name based on current package context.
NOTE: in ROS Diamondback, 'Header' resolves to 'std_msgs/Header'. In previous releases, it resolves to 'roslib/Header' (REP 100).
- e.g.::
- resolve_type('String', 'std_msgs') -> 'std_msgs/String' resolve_type('String[]', 'std_msgs') -> 'std_msgs/String[]' resolve_type('std_msgs/String', 'foo') -> 'std_msgs/String' resolve_type('uint16', 'std_msgs') -> 'uint16' resolve_type('uint16[]', 'std_msgs') -> 'uint16[]'
Undocumented
Value |
|
Convert constant value declaration to python value. Does not do type-checking, so ValueError or other exceptions may be raised.
@param type_: ROS field type @type type_: str @param val: string representation of constant @type val: str: @raise ValueError: if unable to convert to python representation @raise MsgSpecException: if value exceeds specified integer width