rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core#
1. Module Contents#
1.1. Classes#
Primitive value type |
|
Simple, raw XML value. Need to bugfix putting this back into a document |
|
Extractor that retrieves data from an element, given a specified attribute, casted to value_type. |
|
Mirroring Gazebo’s SDF api |
|
Small container for keeping track of what’s been consumed |
|
Raw python object for yaml / xml representation |
1.2. Functions#
Simple wrapper to add XML reflection to an xml_reflection.Object class |
|
What to do on an error. This can be changed to raise an exception. |
|
Basic mechanism to prevent conflicts for string types for URDF and SDF @note Does not handle nesting! |
|
Can wrap value types if needed |
|
1.3. Data#
1.4. API#
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.reflect(cls, *args, **kwargs)[source]#
Simple wrapper to add XML reflection to an xml_reflection.Object class
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.on_error_stderr(message)[source]#
What to do on an error. This can be changed to raise an exception.
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.on_error = None#
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.skip_default = False#
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.value_types = None#
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.value_type_prefix = <Multiline-String>#
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.start_namespace(namespace)[source]#
Basic mechanism to prevent conflicts for string types for URDF and SDF @note Does not handle nesting!
- rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.get_type(cur_type)[source]#
Can wrap value types if needed
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Path(tag, parent=None, suffix='', tree=None)[source]#
Bases:
objectInitialization
- exception rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ParseError(e, path)[source]#
Bases:
Exception
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueType[source]#
Bases:
objectPrimitive value type
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.BasicType(cur_type)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueType
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ListType[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueType
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.VectorType(count=None)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ListType
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.RawType[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueTypeSimple, raw XML value. Need to bugfix putting this back into a document
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.SimpleElementType(attribute, value_type)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueTypeExtractor that retrieves data from an element, given a specified attribute, casted to value_type.
Initialization
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ObjectType(cur_type)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueType
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.FactoryType(name, typeMap)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueType
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.DuckTypedFactory(name, typeOrder)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.ValueType
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Param(xml_var, value_type, required=True, default=None, var=None)[source]#
Bases:
objectMirroring Gazebo’s SDF api
- @param xml_var: Xml name
- @todo If the value_type is an object with a tag defined in it’s
reflection, allow it to act as the default tag name?
- @param var: Python class variable name. By default it’s the same as the
XML name
Initialization
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Attribute(xml_var, value_type, required=True, default=None, var=None)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Param
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Element(xml_var, value_type, required=True, default=None, var=None, is_raw=False)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Param
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.AggregateElement(xml_var, value_type, var=None, is_raw=False)[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Element
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Info(node)[source]#
Small container for keeping track of what’s been consumed
Initialization
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Reflection(params=[], parent_cls=None, tag=None)[source]#
Bases:
objectInitialization
Construct a XML reflection thing @param parent_cls: Parent class, to use it’s reflection as well. @param tag: Only necessary if you intend to use Object.write_xml_doc()
This does not override the name supplied in the reflection definition thing.
- class rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.core.Object[source]#
Bases:
rofunc.utils.robolab.formatter.urdf_parser.xml_reflection.basics.YamlReflectionRaw python object for yaml / xml representation
- XML_REFL = None#
- pre_write_xml()[source]#
If anything needs to be converted prior to dumping to xml i.e., getting the names of objects and such