xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.10
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version ros2
Last Updated 2024-03-01
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

2.0.10 (2024-01-25)

  • Expose python.abs()
  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Robert Haschke

2.0.9 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

2.0.8 (2022-10-22)

  • Install xacro using console_script entrypoint (#304)
  • Provide xacro.process() returning the processed file (#229)
  • Dotted YAML access from list iterator (#318)
  • Optionally allow comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Chen Bainian, Gonzalo de Pedro, Gonzo, Jacob Perron, Melvin Wang, Robert Haschke, vandanamandlik

2.0.7 (2021-09-04)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval security vulnerability
    • safe_eval()
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructors: Enable expressions as well
  • Improve macro arg parsing (#278) to support:
    • \$(substitution args)
    • \${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Name Repo Deps
cob_description github-4am-robotics-cob_common
raw_description github-4am-robotics-cob_common
create_description github-AutonomyLab-create_robot
depthai_bridge github-luxonis-depthai-ros
depthai_descriptions github-luxonis-depthai-ros
depthai_examples github-luxonis-depthai-ros
leo_description github-LeoRover-leo_common-ros2
leo_bringup github-LeoRover-leo_robot-ros2
leo_gz_bringup github-LeoRover-leo_simulator-ros2
mir_description github-DFKI-NI-mir_robot
moveit_resources_prbt_moveit_config github-ros-planning-moveit2
moveit_resources_prbt_pg70_support github-ros-planning-moveit2
moveit_resources_prbt_support github-ros-planning-moveit2
dual_arm_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
raspimouse_description github-rt-net-raspimouse_description
realsense2_description github-IntelRealSense-realsense-ros
schunk_svh_driver github-SCHUNK-GmbH-Co-KG-schunk_svh_ros_driver
ur_bringup github-UniversalRobots-Universal_Robots_ROS2_Driver
ur_moveit_config github-UniversalRobots-Universal_Robots_ROS2_Driver
ur_robot_driver github-UniversalRobots-Universal_Robots_ROS2_Driver
urdf_sim_tutorial github-ros-urdf_sim_tutorial
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
flir_camera_description github-ros-drivers-flir_camera_driver
pmb2_description github-pal-robotics-pmb2_robot
crane_plus_control github-rt-net-crane_plus
crane_plus_description github-rt-net-crane_plus
crane_plus_moveit_config github-rt-net-crane_plus
dbw_fca_description bitbucket-dataspeedinc-dbw_ros
dbw_ford_description bitbucket-dataspeedinc-dbw_ros
dbw_polaris_description bitbucket-dataspeedinc-dbw_ros
open_manipulator_x_description github-dynamixel-community-dynamixel_hardware
pantilt_bot_description github-dynamixel-community-dynamixel_hardware
gazebo_ros2_control_demos github-ros-simulation-gazebo_ros2_control
launch_param_builder github-PickNikRobotics-launch_param_builder
raspimouse_slam github-rt-net-raspimouse_slam_navigation_ros2
simple_launch github-oKermorgant-simple_launch
panda_arm_1_moveit_config github-robosoft-ai-SMACC2
panda_arm_2_moveit_config github-robosoft-ai-SMACC2
turtlebot3_manipulation_bringup github-ROBOTIS-GIT-turtlebot3_manipulation
turtlebot3_manipulation_moveit_config github-ROBOTIS-GIT-turtlebot3_manipulation
urdf_launch github-ros-urdf_launch
webots_ros2_importer github-cyberbotics-webots_ros2
webots_ros2_universal_robot github-cyberbotics-webots_ros2
irobot_create_common_bringup github-iRobotEducation-create3_sim
irobot_create_description github-iRobotEducation-create3_sim
ur_description github-UniversalRobots-Universal_Robots_ROS2_Description
bcr_bot github-blackcoffeerobotics-bcr_bot
gazebo_set_joint_positions_plugin github-Boeing-gazebo_set_joint_positions_plugin
qb_softhand_industry_ros2_control bitbucket-qbrobotics-qbshin-ros
reach_ros github-ros-industrial-reach_ros2
sick_scan_xd github-SICKAG-sick_scan_xd
ign_ros2_control_demos github-ros-controls-gz_ros2_control
canopen_tests github-ros-industrial-ros2_canopen
kortex_bringup github-Kinovarobotics-ros2_kortex
kinova_gen3_6dof_robotiq_2f_85_moveit_config github-Kinovarobotics-ros2_kortex
kinova_gen3_7dof_robotiq_2f_85_moveit_config github-Kinovarobotics-ros2_kortex
robotiq_description github-PickNikRobotics-ros2_robotiq_gripper
ros_gz_sim_demos github-gazebosim-ros_gz
andino_description github-Ekumen-OS-andino
andino_gz_classic github-Ekumen-OS-andino
clearpath_platform github-clearpathrobotics-clearpath_common
clearpath_platform_description github-clearpathrobotics-clearpath_common
clearpath_config_live github-clearpathrobotics-clearpath_desktop
hey5_description github-pal-robotics-hey5_description
pal_gripper_description github-pal-robotics-pal_gripper
pal_hey5_description github-pal-robotics-pal_hey5
pal_robotiq_description github-pal-robotics-pal_robotiq_gripper
pal_robotiq_epick_description github-pal-robotics-pal_robotiq_gripper
pal_urdf_utils github-pal-robotics-pal_urdf_utils
play_motion2 github-pal-robotics-play_motion2
tiago_description github-pal-robotics-tiago_robot

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.10
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version ros2
Last Updated 2024-03-01
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

2.0.10 (2024-01-25)

  • Expose python.abs()
  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Robert Haschke

2.0.9 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

2.0.8 (2022-10-22)

  • Install xacro using console_script entrypoint (#304)
  • Provide xacro.process() returning the processed file (#229)
  • Dotted YAML access from list iterator (#318)
  • Optionally allow comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Chen Bainian, Gonzalo de Pedro, Gonzo, Jacob Perron, Melvin Wang, Robert Haschke, vandanamandlik

2.0.7 (2021-09-04)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval security vulnerability
    • safe_eval()
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructors: Enable expressions as well
  • Improve macro arg parsing (#278) to support:
    • \$(substitution args)
    • \${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Name Repo Deps
depthai_bridge github-luxonis-depthai-ros
depthai_descriptions github-luxonis-depthai-ros
depthai_examples github-luxonis-depthai-ros
leo_description github-LeoRover-leo_common-ros2
leo_bringup github-LeoRover-leo_robot-ros2
mir_description github-DFKI-NI-mir_robot
moveit_resources_prbt_moveit_config github-ros-planning-moveit2
moveit_resources_prbt_pg70_support github-ros-planning-moveit2
moveit_resources_prbt_support github-ros-planning-moveit2
dual_arm_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
realsense2_description github-IntelRealSense-realsense-ros
ur_moveit_config github-UniversalRobots-Universal_Robots_ROS2_Driver
ur_robot_driver github-UniversalRobots-Universal_Robots_ROS2_Driver
urdf_sim_tutorial github-ros-urdf_sim_tutorial
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
flir_camera_description github-ros-drivers-flir_camera_driver
gazebo_ros2_control_demos github-ros-simulation-gazebo_ros2_control
launch_param_builder github-PickNikRobotics-launch_param_builder
simple_launch github-oKermorgant-simple_launch
urdf_launch github-ros-urdf_launch
webots_ros2_importer github-cyberbotics-webots_ros2
webots_ros2_universal_robot github-cyberbotics-webots_ros2
ur_description github-UniversalRobots-Universal_Robots_ROS2_Description
gz_ros2_control_demos github-ros-controls-gz_ros2_control
gz_ros2_control_tests github-ros-controls-gz_ros2_control
kortex_bringup github-Kinovarobotics-ros2_kortex
kinova_gen3_6dof_robotiq_2f_85_moveit_config github-Kinovarobotics-ros2_kortex
kinova_gen3_7dof_robotiq_2f_85_moveit_config github-Kinovarobotics-ros2_kortex
robotiq_description github-PickNikRobotics-ros2_robotiq_gripper
ros_gz_sim_demos github-gazebosim-ros_gz

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.10
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version ros2
Last Updated 2024-03-01
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

2.0.10 (2024-01-25)

  • Expose python.abs()
  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Robert Haschke

2.0.9 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

2.0.8 (2022-10-22)

  • Install xacro using console_script entrypoint (#304)
  • Provide xacro.process() returning the processed file (#229)
  • Dotted YAML access from list iterator (#318)
  • Optionally allow comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Chen Bainian, Gonzalo de Pedro, Gonzo, Jacob Perron, Melvin Wang, Robert Haschke, vandanamandlik

2.0.7 (2021-09-04)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval security vulnerability
    • safe_eval()
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructors: Enable expressions as well
  • Improve macro arg parsing (#278) to support:
    • \$(substitution args)
    • \${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Name Repo Deps
leo_description github-LeoRover-leo_common-ros2
leo_bringup github-LeoRover-leo_robot-ros2
mir_description github-DFKI-NI-mir_robot
moveit_resources_prbt_moveit_config github-ros-planning-moveit2
moveit_resources_prbt_pg70_support github-ros-planning-moveit2
moveit_resources_prbt_support github-ros-planning-moveit2
dual_arm_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
trac_ik_examples bitbucket-traclabs-trac_ik
ur_moveit_config github-UniversalRobots-Universal_Robots_ROS2_Driver
ur_robot_driver github-UniversalRobots-Universal_Robots_ROS2_Driver
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
flir_camera_description github-ros-drivers-flir_camera_driver
gazebo_ros2_control_demos github-ros-simulation-gazebo_ros2_control
launch_param_builder github-PickNikRobotics-launch_param_builder
simple_launch github-oKermorgant-simple_launch
urdf_launch github-ros-urdf_launch
webots_ros2_importer github-cyberbotics-webots_ros2
webots_ros2_universal_robot github-cyberbotics-webots_ros2
ur_description github-UniversalRobots-Universal_Robots_ROS2_Description
reach_ros github-ros-industrial-reach_ros2
gz_ros2_control_demos github-ros-controls-gz_ros2_control
gz_ros2_control_tests github-ros-controls-gz_ros2_control
canopen_tests github-ros-industrial-ros2_canopen
kortex_bringup github-Kinovarobotics-ros2_kortex
kinova_gen3_6dof_robotiq_2f_85_moveit_config github-Kinovarobotics-ros2_kortex
kinova_gen3_7dof_robotiq_2f_85_moveit_config github-Kinovarobotics-ros2_kortex
robotiq_description github-PickNikRobotics-ros2_robotiq_gripper
ros_gz_sim_demos github-gazebosim-ros_gz

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.14.17
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version noetic-devel
Last Updated 2024-03-10
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

1.14.17 (2024-01-25)

  • Expose python.abs()
  • Contributors: Robert Haschke

1.14.16 (2023-05-24)

  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Alec Tiefenthal, Robert Haschke

1.14.15 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Remove obsolete options from completion
  • Contributors: Robert Haschke

1.14.14 (2022-10-21)

  • Dotted YAML access from list iterator (#318)
  • Link to extended wiki
  • Contributors: Robert Haschke

1.14.13 (2022-02-12)

  • Only optionally activate comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Robert Haschke

1.14.12 (2022-01-30)

  • Issue a warning only for evaluation errors in comments
  • Add LICENSE file
  • Contributors: Robert Haschke

1.14.11 (2022-01-20)

  • Fix resolving of macros and properties declared and used in/from a namespace (#297, #306)

    Macros and properties that are declared within a namespaced include shouldn\'t require the namespace prefix when used within the namespace.

  • Perform expression evaluation in comments (#300)

  • Expose xacro.arg() to facilitate access to substitution args

  • Fix scoped macro evaluation

    • Replace [Macro|Property]NameSpace with common NameSpace class derived from Table
    • Use the scoped macro Table
  • Contributors: Robert Haschke

1.14.10 (2021-10-02)

  • Allow property names to be evaluated from an expression This allows to turn macros into a function that can compute an arbitrary property:

    <xacro:macro name="square" params="name args">
      <!-- Perform some complex computation and set the property within the parent's scope -->
      <xacro:property name="${name}" value="${[float(x)**2 for x in args]}" scope="parent" />
    </xacro:macro>
    <xacro:square name="result" args="${python.range(5)}" />
    
  • Fix error reporting for invalid symbols in NameSpaces

  • Allow removal of a property definition (#288)

    <xacro:property name=\"prop\" remove=\"true\"/>

  • Allow greedy property evaluation (#284) This can be used, to redefine a property from its previous value, e.g. for normalization:

    <xacro:property name="prop" value="${prop.lower()}" lazy_eval="false"/>
    
  • Correctly expose XML namespaces imported via xacro:include within a macro (#287)

  • Throw when attempting to declare a property starting with double underscore (#286)

  • Improve global symbols (#283)

    • Expose most builtin symbols of python
    • Expose xacro functions into xacro namespace

      • xacro.print_location() to print the current filestack
      • tokenize(string, sep=',; ', skip_empty=True) to facilitate string tokenization
      • message(), warning(), error(), and fatal() to output messages on stderr. All but message() print the error location (macro call and file hierarchy) by default:

        ${xacro.message('message', 'text', 2, 3.14, color=32, print_location=True)}
        ${xacro.warning('warning')}
        ${xacro.error('error', print_location=False)}
        ${xacro.fatal('fatal')}
        
    • Rework handling of file and macro stack, such that print_location() works from anywhere

    • Unit tests: Reduce reported stdout/stderr output

    • Rework definition of global_symbols to expose functions into namespaces python, math, xacro

  • Contributors: Robert Haschke

1.14.9 (2021-09-03)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval() security vulnerability
    • safe_eval(): Forbid symbol names starting with double underscore
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructor: Enable expressions as well
  • Contributors: Robert Haschke

1.14.8 (2021-07-19)

  • Improve macro arg parsing (#278) to support:
    • $(substitution args)
    • ${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

1.14.7 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

1.14.6 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • Contributors: Robert Haschke

1.14.5 (2020-10-13)

  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • [maintanence] Use setuptools instead of distutils (#233)
  • [maintanence] fix Travis: export correct ROS_PYTHON_VERSION
  • Contributors: Alejandro Hern

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
audibot_description github-robustify-audibot
rokubimini_description gitlab-botasys-bota_driver
cob_calibration_data github-ipa320-cob_calibration_data
cob_description github-4am-robotics-cob_common
raw_description github-4am-robotics-cob_common
cob_cartesian_controller github-4am-robotics-cob_control
cob_obstacle_distance github-4am-robotics-cob_control
cob_twist_controller github-4am-robotics-cob_control
cob_grasp_generation github-ipa320-cob_manipulation
cob_hardware_config github-ipa320-cob_robots
cob_moveit_config github-ipa320-cob_robots
cob_gazebo_worlds github-ipa320-cob_simulation
crane_x7_moveit_config github-rt-net-crane_x7_ros
create_description github-AutonomyLab-create_robot
dbw_fca_description bitbucket-DataspeedInc-dbw_fca_ros
dbw_mkz_description bitbucket-dataspeedinc-dbw_mkz_ros
dbw_polaris_description bitbucket-DataspeedInc-dbw_polaris_ros
depthai_descriptions github-luxonis-depthai-ros
depthai_examples github-luxonis-depthai-ros
dingo_description github-dingo-cpr-dingo
ensenso_description github-ensenso-ros_driver
fath_pivot_mount_description github-clearpathrobotics-lockmount_description
fetch_description github-fetchrobotics-fetch_ros
fetch_moveit_config github-fetchrobotics-fetch_ros
franka_description github-frankaemika-franka_ros
franka_visualization github-frankaemika-franka_ros
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
human_description github-ros4hri-human_description
husky_description github-husky-husky
jackal_description github-jackal-jackal
jackal_navigation github-jackal-jackal
jsk_data github-jsk-ros-pkg-jsk_common
khi_duaro_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs007l_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs007n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs013n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs020n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs025n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs030n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs080n_moveit_config github-Kawasaki-Robotics-khi_robot
leo_description github-LeoRover-leo_common
leo_viz github-LeoRover-leo_desktop
leo_bringup github-LeoRover-leo_robot
robot github-ros-metapackages
mir_description github-DFKI-NI-mir_robot
moveit_setup_assistant github-ros-planning-moveit
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
open_manipulator_p_gazebo github-ROBOTIS-GIT-open_manipulator_p_simulations
open_manipulator_gazebo github-ROBOTIS-GIT-open_manipulator_simulations
openni_description github-ros-drivers-openni_camera
panda_moveit_config github-ros-planning-panda_moveit_config
pass_through_controllers github-UniversalRobots-Universal_Robots_ROS_passthrough_controllers
pf_description github-PepperlFuchs-pf_lidar_ros_driver
prbt_gazebo github-PilzDE-pilz_robots
prbt_moveit_config github-PilzDE-pilz_robots
prbt_support github-PilzDE-pilz_robots
pincher_arm_bringup github-fictionlab-pincher_arm
pincher_arm_moveit_config github-fictionlab-pincher_arm
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pr2_description github-pr2-pr2_common
pr2_gazebo github-PR2-pr2_simulator
prbt_pg70_support github-PilzDE-prbt_grippers
psen_scan_v2 github-PilzDE-psen_scan_v2
raspimouse_description github-rt-net-raspimouse_description
rc_visard_description github-roboception-rc_visard_ros
ridgeback_description github-ridgeback-ridgeback
ridgeback_navigation github-ridgeback-ridgeback
robot_upstart github-clearpathrobotics-robot_upstart
robotont_description github-robotont-robotont_description
robotont_nuc_description github-robotont-robotont_nuc_description
ackermann_steering_controller github-ros-controls-ros_controllers
diff_drive_controller github-ros-controls-ros_controllers
effort_controllers github-ros-controls-ros_controllers
four_wheel_steering_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
cartesian_trajectory_controller github-UniversalRobots-Universal_Robots_ROS_controllers_cartesian
schunk_description github-ipa320-schunk_modular_robotics
schunk_svh_driver github-SCHUNK-GmbH-Co-KG-schunk_svh_ros_driver
sciurus17_moveit_config github-rt-net-sciurus17_ros
sick_ldmrs_description github-SICKAG-sick_ldmrs_laser
sick_tim github-uos-sick_tim
trac_ik_examples bitbucket-traclabs-trac_ik
turtlebot3_description github-ROBOTIS-GIT-turtlebot3
ur10_moveit_config github-ros-industrial-universal_robot
ur10e_moveit_config github-ros-industrial-universal_robot
ur16e_moveit_config github-ros-industrial-universal_robot
ur20_moveit_config github-ros-industrial-universal_robot
ur30_moveit_config github-ros-industrial-universal_robot
ur3_moveit_config github-ros-industrial-universal_robot
ur3e_moveit_config github-ros-industrial-universal_robot
ur5_moveit_config github-ros-industrial-universal_robot
ur5e_moveit_config github-ros-industrial-universal_robot
ur_description github-ros-industrial-universal_robot
urdf_geometry_parser github-ros-controls-urdf_geometry_parser
urdf_sim_tutorial github-ros-urdf_sim_tutorial
urdf_tutorial github-ros-urdf_tutorial
urg_node github-ros-drivers-urg_node
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
warthog_description github-warthog-cpr-warthog
xpp_hyq github-leggedrobotics-xpp
xpp_quadrotor github-leggedrobotics-xpp
flir_camera_description github-ros-drivers-flir_camera_driver
clober_description github-CLOBOT-Co-Ltd-clober
bcr_bot github-blackcoffeerobotics-bcr_bot
cpr_onav_description github-cpr-application-cpr_onav_description
diffbot_gazebo github-ros-mobile-robots-diffbot
ign_ros_control_demos github-ros-controls-ign_ros_control
mia_hand_moveit_config bitbucket-prensiliasrl-mia_hand_ros_pkgs
reach_ros github-ros-industrial-reach_ros
rm_description github-rm-controls-rm_description
sick_scan_xd github-SICKAG-sick_scan_xd
thunder_line_follower_pmr3100 github-ThundeRatz-thunder_line_follower_pmr3100

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.6
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version dashing-devel
Last Updated 2021-05-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With Xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Documentation can be found in the wiki: http://wiki.ros.org/xacro

CHANGELOG

Changelog for package xacro

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.6
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version dashing-devel
Last Updated 2021-05-30
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With Xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Documentation can be found in the wiki: http://wiki.ros.org/xacro

CHANGELOG

Changelog for package xacro

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.10
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version ros2
Last Updated 2024-03-01
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

2.0.10 (2024-01-25)

  • Expose python.abs()
  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Robert Haschke

2.0.9 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

2.0.8 (2022-10-22)

  • Install xacro using console_script entrypoint (#304)
  • Provide xacro.process() returning the processed file (#229)
  • Dotted YAML access from list iterator (#318)
  • Optionally allow comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Chen Bainian, Gonzalo de Pedro, Gonzo, Jacob Perron, Melvin Wang, Robert Haschke, vandanamandlik

2.0.7 (2021-09-04)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval security vulnerability
    • safe_eval()
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructors: Enable expressions as well
  • Improve macro arg parsing (#278) to support:
    • \$(substitution args)
    • \${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

No known dependants.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.10
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version ros2
Last Updated 2024-03-01
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

2.0.10 (2024-01-25)

  • Expose python.abs()
  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Robert Haschke

2.0.9 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

2.0.8 (2022-10-22)

  • Install xacro using console_script entrypoint (#304)
  • Provide xacro.process() returning the processed file (#229)
  • Dotted YAML access from list iterator (#318)
  • Optionally allow comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Chen Bainian, Gonzalo de Pedro, Gonzo, Jacob Perron, Melvin Wang, Robert Haschke, vandanamandlik

2.0.7 (2021-09-04)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval security vulnerability
    • safe_eval()
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructors: Enable expressions as well
  • Improve macro arg parsing (#278) to support:
    • \$(substitution args)
    • \${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 2.0.10
License BSD
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version ros2
Last Updated 2024-03-01
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Recent documentation can be found in the wiki. For older releases, have a look at the ROS wiki.

CHANGELOG

Changelog for package xacro

2.0.10 (2024-01-25)

  • Expose python.abs()
  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Robert Haschke

2.0.9 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

2.0.8 (2022-10-22)

  • Install xacro using console_script entrypoint (#304)
  • Provide xacro.process() returning the processed file (#229)
  • Dotted YAML access from list iterator (#318)
  • Optionally allow comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Chen Bainian, Gonzalo de Pedro, Gonzo, Jacob Perron, Melvin Wang, Robert Haschke, vandanamandlik

2.0.7 (2021-09-04)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval security vulnerability
    • safe_eval()
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructors: Enable expressions as well
  • Improve macro arg parsing (#278) to support:
    • \$(substitution args)
    • \${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

2.0.6 (2021-05-30)

  • [feature] Expose YamlDictWrapper as dotify() to allow dotted access to any dict (#274)
  • [fix] Scoped macro evaluation (#272)
  • Contributors: Robert Haschke

2.0.5 (2021-03-02)

  • [fix] Report correct filename for XML errors (#268)
  • [fix] Python3-compatible property Table (#266)
  • [fix] Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • [fix] Append test directory to existing AMENT_PREFIX_PATH (#260)
  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • [feature] Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Chen Bainian, Robert Haschke, G.A. vd. Hoorn

2.0.3 (2020-08-09)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.2 and 1.14.3 for details
  • Contributors: Robert Haschke

2.0.2 (2020-03-29)

  • Merge improvements of melodic and noetic branches into dashing-devel: see 1.14.1, 1.13.5 for details
  • Contributors: Robert Haschke

2.0.1 (2019-10-06)

  • Revert requiring that all xacro commands are prefixed with \'xacro:\' namespace Although this is deprecated since #79, the corresponding deprecation warning wasn\'t actually issued. Thus, we will accept non-prefixed xacro tags until F-turtle.
  • Install to both, bin/xacro and lib/xacro/xacro
  • Contributors: Robert Haschke

2.0.0 (2019-09-28)

  • PEP8 cleanup
    • code simplifications
    • avoid empty except
    • sort imports
    • format line breaks
  • Code cleanup
    • Removed deprecated options --legacy, --inorder, --check-order, --includes
    • Require all xacro commands to be prefixed with \'xacro:\'
    • Added missing copyright notices
    • Removed python2 stuff
  • Adapt Travis config to use colcon
  • Provide ROS2-based replacement for substition args
  • Modified package structure as per ROS2 rules
    • Using ament_cmake
    • Moved source contents from \"src/xacro\" to \"xacro\"
    • Modified package.xml and setup.py according to ROS2 requirements
    • Configured completion hook
    • Removed catkin artifacts from cmake extension
  • Contributors: vandanamandlik, Jacob Perron, Robert Haschke

1.14.4 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • [fix] Ignore underscores when parsing literal numeric values (#247)
  • Contributors: Robert Haschke

1.14.3 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.14.2 (2020-05-21)

  • [maintanence] Remove deprecated xacro.py (#239)
  • Contributors: Shane Loretz

1.14.1 (2020-03-29)

  • [feature] allow optional xacro includes (#234)
  • Contributors: Robert Haschke

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Dependant Packages

Name Repo Deps
create_description github-AutonomyLab-create_robot
depthai_bridge github-luxonis-depthai-ros
depthai_descriptions github-luxonis-depthai-ros
depthai_examples github-luxonis-depthai-ros
husky_base github-husky-husky
husky_gazebo github-husky-husky
jackal_description github-jackal-jackal
jackal_gazebo github-jackal-jackal_simulator
leo_description github-LeoRover-leo_common-ros2
mir_description github-DFKI-NI-mir_robot
moveit_resources_prbt_moveit_config github-ros-planning-moveit2
moveit_resources_prbt_pg70_support github-ros-planning-moveit2
moveit_resources_prbt_support github-ros-planning-moveit2
dual_arm_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
psen_scan_v2 github-PilzDE-psen_scan_v2
raspimouse_description github-rt-net-raspimouse_description
schunk_svh_driver github-SCHUNK-GmbH-Co-KG-schunk_svh_ros_driver
ur_bringup github-UniversalRobots-Universal_Robots_ROS2_Driver
ur_description github-UniversalRobots-Universal_Robots_ROS2_Driver
ur_moveit_config github-UniversalRobots-Universal_Robots_ROS2_Driver
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
pmb2_description github-pal-robotics-pmb2_robot
crane_plus_control github-rt-net-crane_plus
crane_plus_description github-rt-net-crane_plus
crane_plus_moveit_config github-rt-net-crane_plus
dbw_fca_description bitbucket-dataspeedinc-dbw_ros
dbw_ford_description bitbucket-dataspeedinc-dbw_ros
dbw_polaris_description bitbucket-dataspeedinc-dbw_ros
open_manipulator_x_description github-dynamixel-community-dynamixel_hardware
pantilt_bot_description github-dynamixel-community-dynamixel_hardware
dynamixel_hardware_interface github-OUXT-Polaris-dynamixel_hardware_interface
gazebo_ros2_control_demos github-ros-simulation-gazebo_ros2_control
ign_ros2_control_demos github-ignitionrobotics-ign_ros2_control
launch_param_builder github-PickNikRobotics-launch_param_builder
raspimouse_slam github-rt-net-raspimouse_slam_navigation_ros2
ros_ign_gazebo_demos github-ignitionrobotics-ros_ign
simple_launch github-oKermorgant-simple_launch
turtlebot3_manipulation_bringup github-ROBOTIS-GIT-turtlebot3_manipulation
turtlebot3_manipulation_moveit_config github-ROBOTIS-GIT-turtlebot3_manipulation
urdf_launch github-MetroRobots-urdf_launch
webots_ros2_importer github-cyberbotics-webots_ros2
webots_ros2_universal_robot github-cyberbotics-webots_ros2
xacro_live github-orise-robotics-xacro_live

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.12.2
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version lunar-devel
Last Updated 2018-05-03
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke
README
No README found. No README in repository either.
CHANGELOG

Changelog for package xacro

1.12.2 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • fix xacro-cmake test
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
desistek_saga_description github-uuvsimulator-desistek_saga
eca_a9_description github-uuvsimulator-eca_a9
ensenso_description github-ensenso-ros_driver
franka_description github-frankaemika-franka_ros
franka_visualization github-frankaemika-franka_ros
panda_moveit_config github-frankaemika-franka_ros
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
lauv_description github-uuvsimulator-lauv_gazebo
robot github-ros-metapackages
mir_description github-dfki-ric-mir_robot
moveit_setup_assistant github-ros-planning-moveit
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
openni_description github-ros-drivers-openni_camera
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pr2_description github-pr2-pr2_common
pr2_gazebo github-PR2-pr2_simulator
rc_visard_description github-roboception-rc_visard_ros
rexrov2_description github-uuvsimulator-rexrov2
ackermann_steering_controller github-ros-controls-ros_controllers
diff_drive_controller github-ros-controls-ros_controllers
gripper_action_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
sick_ldmrs_description github-SICKAG-sick_ldmrs_laser
sick_tim github-uos-sick_tim
trac_ik_examples bitbucket-traclabs-trac_ik
urdf_geometry_parser github-ros-controls-urdf_geometry_parser
urdf_tutorial github-ros-urdf_tutorial
uuv_thruster_manager github-uuvsimulator-uuv_simulator
uuv_descriptions github-uuvsimulator-uuv_simulator
uuv_gazebo_ros_plugins github-uuvsimulator-uuv_simulator
uuv_sensor_ros_plugins github-uuvsimulator-uuv_simulator
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
xpp_hyq github-leggedrobotics-xpp
xpp_quadrotor github-leggedrobotics-xpp
ca_description github-AutonomyLab-create_autonomy
dynpick_driver github-tork-a-dynpick_driver
katana_arm_gazebo github-uos-katana_driver

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.10.7
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version jade-devel
Last Updated 2016-06-22
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke
README
No README found. No README in repository either.
CHANGELOG

Changelog for package xacro

1.10.7 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • added short option -i as alternative to --inorder
  • refactored main(), fix #122
  • added xacro indicator to error message, fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • fixed unrelated typo
  • moved core processing pipeline into function process_file()
  • improved documentation: added more comments,input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front for #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags too
  • extended the testcase to include
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
fanuc_cr35ia_support github-ros-industrial-fanuc
fanuc_cr7ia_moveit_config github-ros-industrial-fanuc
fanuc_cr7ia_support github-ros-industrial-fanuc
fanuc_cr7ial_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_support github-ros-industrial-fanuc
fanuc_lrmate200ib3l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_support github-ros-industrial-fanuc
fanuc_lrmate200ic5h_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic5l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_support github-ros-industrial-fanuc
fanuc_m10ia_moveit_config github-ros-industrial-fanuc
fanuc_m10ia_support github-ros-industrial-fanuc
fanuc_m16ib20_moveit_config github-ros-industrial-fanuc
fanuc_m16ib_support github-ros-industrial-fanuc
fanuc_m20ia10l_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_support github-ros-industrial-fanuc
fanuc_m20ib25_moveit_config github-ros-industrial-fanuc
fanuc_m20ib_support github-ros-industrial-fanuc
fanuc_m430ia2f_moveit_config github-ros-industrial-fanuc
fanuc_m430ia2p_moveit_config github-ros-industrial-fanuc
fanuc_m430ia_support github-ros-industrial-fanuc
fanuc_m6ib6s_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_support github-ros-industrial-fanuc
fanuc_m710ic_support github-ros-industrial-fanuc
fanuc_m900ia_support github-ros-industrial-fanuc
fanuc_m900ib_support github-ros-industrial-fanuc
fanuc_r1000ia80f_moveit_config github-ros-industrial-fanuc
fanuc_r1000ia_support github-ros-industrial-fanuc
fanuc_lrmate200id7l_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_support github-ros-industrial-fanuc_experimental
fanuc_r2000ib_support github-ros-industrial-fanuc_experimental
fanuc_r2000ic_support github-ros-industrial-fanuc_experimental
fetch_gazebo github-fetchrobotics-fetch_gazebo
fetch_description github-fetchrobotics-fetch_ros
fetch_moveit_config github-fetchrobotics-fetch_ros
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
jsk_data github-jsk-ros-pkg-jsk_common
robot github-ros-metapackages
moveit_setup_assistant github-ros-planning-moveit
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
openni_description github-ros-drivers-openni_camera
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pr2_description github-pr2-pr2_common
robot_upstart github-clearpathrobotics-robot_upstart
diff_drive_controller github-ros-controls-ros_controllers
gripper_action_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
sick_ldmrs_description github-SICKAG-sick_ldmrs_laser
trac_ik_examples bitbucket-traclabs-trac_ik
uwsim github-uji-ros-pkg-underwater_simulation
uos_common_urdf github-uos-uos_tools
urdf_tutorial github-ros-urdf_tutorial
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
bebop_description github-AutonomyLab-bebop_autonomy
ca_description github-AutonomyLab-create_autonomy
dynpick_driver github-tork-a-dynpick_driver
grizzly_description github-g-grizzly
katana_arm_gazebo github-uos-katana_driver
nao_moveit_config github-ros-naoqi-nao_moveit_config
nao_description github-ros-naoqi-nao_robot
pepper_moveit_config github-ros-naoqi-pepper_moveit_config
pepper_description github-ros-naoqi-pepper_robot
romeo_moveit_config github-ros-aldebaran-romeo_moveit_config
romeo_description github-ros-aldebaran-romeo_robot
rsv_balance_description github-robosavvy-rsv_balance
schunk_canopen_driver github-fzi-forschungszentrum-informatik-schunk_canopen_driver
schunk_svh_driver github-fzi-forschungszentrum-informatik-schunk_svh_driver
aubo_i5_moveit_config github-auboliuxin-aubo_robot
tetris_gazebo github-tork-a-hakuto
rail_ceiling github-GT-RAIL-rail_ceiling
rail_collada_models github-GT-RAIL-rail_collada_models

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.9.5
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version indigo-devel
Last Updated 2017-09-15
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
README
No README found. No README in repository either.
CHANGELOG

Changelog for package xacro

1.9.5 (2015-11-09)

  • optionally include latest improvements in xacro-jade into xacro-indigo
  • Contributors: Morgan Quigley

1.9.4 (2015-04-01)

  • Using xacro for launch files with <arg> tags would cause the <args> tags to get eaten. Removed \"arg\" and only look for \"xacro:arg\".
  • Add test for eating launch parameter arguments
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
  • improved xml matching, add some new unit tests
  • travis-ci: fixup running of tests
  • fix pathnames used in test case
  • Include CATKIN_ENV params at build time.
  • use output filename flag instead of shell redirection
  • create output file only if parsing is successful
  • Contributors: Mike O\'Driscoll, Morgan Quigley, Robert Haschke, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
abb_irb2400_moveit_config github-ros-industrial-abb
abb_irb6640_moveit_config github-ros-industrial-abb
abb_irb6640_support github-ros-industrial-abb
adi_driver github-tork-a-adi_driver
ati_force_torque github-iirob-ati_force_torque
cob_calibration_data github-ipa320-cob_calibration_data
cob_description github-ipa320-cob_common
raw_description github-ipa320-cob_common
cob_cartesian_controller github-ipa320-cob_control
cob_obstacle_distance github-ipa320-cob_control
cob_twist_controller github-ipa320-cob_control
cob_grasp_generation github-ipa320-cob_manipulation
cob_hardware_config github-ipa320-cob_robots
cob_moveit_config github-ipa320-cob_robots
cob_gazebo_worlds github-ipa320-cob_simulation
denso_robot_moveit_config github-DENSORobot-denso_robot_ros
fanuc_cr35ia_support github-ros-industrial-fanuc
fanuc_cr7ia_moveit_config github-ros-industrial-fanuc
fanuc_cr7ia_support github-ros-industrial-fanuc
fanuc_cr7ial_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_support github-ros-industrial-fanuc
fanuc_lrmate200ib3l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_support github-ros-industrial-fanuc
fanuc_lrmate200ic5h_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic5l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_support github-ros-industrial-fanuc
fanuc_m10ia_moveit_config github-ros-industrial-fanuc
fanuc_m10ia_support github-ros-industrial-fanuc
fanuc_m16ib20_moveit_config github-ros-industrial-fanuc
fanuc_m16ib_support github-ros-industrial-fanuc
fanuc_m20ia10l_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_support github-ros-industrial-fanuc
fanuc_m20ib25_moveit_config github-ros-industrial-fanuc
fanuc_m20ib_support github-ros-industrial-fanuc
fanuc_m430ia2f_moveit_config github-ros-industrial-fanuc
fanuc_m430ia2p_moveit_config github-ros-industrial-fanuc
fanuc_m430ia_support github-ros-industrial-fanuc
fanuc_m6ib6s_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_support github-ros-industrial-fanuc
fanuc_m710ic_support github-ros-industrial-fanuc
fanuc_m900ia_support github-ros-industrial-fanuc
fanuc_m900ib_support github-ros-industrial-fanuc
fanuc_r1000ia80f_moveit_config github-ros-industrial-fanuc
fanuc_r1000ia_support github-ros-industrial-fanuc
fanuc_lrmate200id7l_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_support github-ros-industrial-fanuc_experimental
fanuc_r2000ib_support github-ros-industrial-fanuc_experimental
fanuc_r2000ic_support github-ros-industrial-fanuc_experimental
fetch_gazebo github-fetchrobotics-fetch_gazebo
fetch_description github-fetchrobotics-fetch_ros
fetch_moveit_config github-fetchrobotics-fetch_ros
flir_ptu_description github-ros-drivers-flir_ptu
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
heron_description github-heron-heron
husky_description github-husky-husky
husky_ur5_moveit_config github-husky-husky
jackal_description github-jackal-jackal
jackal_navigation github-jackal-jackal
jsk_data github-jsk-ros-pkg-jsk_common
kobuki_description github-yujinrobot-kobuki
robot github-ros-metapackages
tra1_description github-tork-a-minas
tra1_moveit_config github-tork-a-minas
mir_description github-dfki-ric-mir_robot
moveit_setup_assistant github-ros-planning-moveit
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
mrp2_navigation github-milvusrobotics-mrp2_common
openni_description github-ros-drivers-openni_camera
pheeno_ros_description github-acslaboratory-pheeno_ros_description
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pr2_description github-pr2-pr2_common
pr2_gazebo github-PR2-pr2_simulator
rc_visard_description github-roboception-rc_visard_ros
ridgeback_description github-ridgeback-ridgeback
ridgeback_navigation github-ridgeback-ridgeback
robot_upstart github-clearpathrobotics-robot_upstart
diff_drive_controller github-ros-controls-ros_controllers
gripper_action_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
rotors_gazebo github-ethz-asl-rotors_simulator
schunk_description github-ipa320-schunk_modular_robotics
sick_ldmrs_description github-SICKAG-sick_ldmrs_laser
sick_tim github-uos-sick_tim
sr_edc_launch github-shadow-robot-sr-ros-interface-ethercat
staubli_rx160_moveit_config github-ros-industrial-staubli
staubli_rx160_support github-ros-industrial-staubli
staubli_tx60_support github-ros-industrial-staubli_experimental
staubli_tx90_support github-ros-industrial-staubli_experimental
trac_ik_examples bitbucket-traclabs-trac_ik
uwsim github-uji-ros-pkg-underwater_simulation
ur10_moveit_config github-ros-industrial-universal_robot
ur3_moveit_config github-ros-industrial-universal_robot
ur5_moveit_config github-ros-industrial-universal_robot
uos_common_urdf github-uos-uos_tools
urdf_tutorial github-ros-urdf_tutorial
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
warthog_description github-warthog-cpr-warthog
xpp_hyq github-leggedrobotics-xpp
xpp_quadrotor github-leggedrobotics-xpp
abb_irb120_moveit_config github-ros-industrial-abb_experimental
abb_irb120_support github-ros-industrial-abb_experimental
abb_irb120t_moveit_config github-ros-industrial-abb_experimental
abb_irb4400_support github-ros-industrial-abb_experimental
bebop_description github-AutonomyLab-bebop_autonomy
ca_description github-AutonomyLab-create_autonomy
dynpick_driver github-tork-a-dynpick_driver
grizzly_description github-g-grizzly
innok_heros_description github-innokrobotics-innok_heros_description
katana_arm_gazebo github-uos-katana_driver
kuka_kr10_support github-ros-industrial-kuka_experimental
kuka_kr120_support github-ros-industrial-kuka_experimental
kuka_kr150_support github-ros-industrial-kuka_experimental
kuka_kr16_support github-ros-industrial-kuka_experimental
kuka_kr210_support github-ros-industrial-kuka_experimental
kuka_kr3_support github-ros-industrial-kuka_experimental
kuka_kr5_support github-ros-industrial-kuka_experimental
kuka_kr6_support github-ros-industrial-kuka_experimental
kuka_lbr_iiwa_support github-ros-industrial-kuka_experimental
motoman_sda10f_moveit_config github-ros-industrial-motoman
motoman_sia20d_moveit_config github-ros-industrial-motoman
motoman_mh_support github-ros-industrial-motoman_experimental
motoman_mpl80_moveit_config github-ros-industrial-motoman_experimental
motoman_mpl_support github-ros-industrial-motoman_experimental
motoman_sia5d_moveit_config github-ros-industrial-motoman_experimental
nao_moveit_config github-ros-naoqi-nao_moveit_config
nao_description github-ros-naoqi-nao_robot
pepper_moveit_config github-ros-naoqi-pepper_moveit_config
pepper_description github-ros-naoqi-pepper_robot
pheeno_ros_sim github-ACSLaboratory-pheeno_ros_sim
rb1_base_description github-RobotnikAutomation-rb1_base_common
rb1_base_kinova_j2n6a300_moveit_config github-RobotnikAutomation-rb1_base_common
robotiq_c2_model_visualization github-ros-industrial-robotiq
robotnik_sensors github-RobotnikAutomation-robotnik_sensors
roch_description github-SawYer-Robotics-roch_robot
romeo_moveit_config github-ros-aldebaran-romeo_moveit_config
romeo_description github-ros-aldebaran-romeo_robot
roomblock_description github-tork-a-roomblock
schunk_canopen_driver github-fzi-forschungszentrum-informatik-schunk_canopen_driver
schunk_svh_driver github-fzi-forschungszentrum-informatik-schunk_svh_driver
summit_x_description github-RobotnikAutomation-summit_x_common
summit_x_gazebo github-RobotnikAutomation-summit_x_sim
summit_xl_description github-RobotnikAutomation-summit_xl_common
summit_xl_gazebo github-RobotnikAutomation-summit_xl_sim
turtlebot_description github-turtlebot-turtlebot
turtlebot_arm_description github-turtlebot-turtlebot_arm
turtlebot_arm_moveit_config github-turtlebot-turtlebot_arm
create_description github-turtlebot-turtlebot_create
turtlebot_gazebo github-turtlebot-turtlebot_simulator
baxter_examples github-RethinkRobotics-baxter_examples
bwi_gazebo_entities github-utexas-bwi-bwi_common
calvin_description github-uos-calvin_robot
calvin_moveit_config github-uos-calvin_robot
cyton_gamma_1500_description github-GertKanter-cyton_gamma_1500_description
panda_eus github-jsk-ros-pkg-jsk_robot
kingfisher_description github-kf-kingfisher
kurt_description github-uos-kurt_driver
maxwell_defs github-mikeferguson-maxwell
maxwell_moveit_config github-mikeferguson-maxwell
atlas_v3_moveit_config github-ros-planning-moveit_robots
hrpsys_gazebo_general github-start-jsk-rtmros_gazebo
hrp2jsk_moveit_config github-start-jsk-rtmros_gazebo
hrp2jsknt_moveit_config github-start-jsk-rtmros_gazebo
hrp2jsknts_moveit_config github-start-jsk-rtmros_gazebo
hrp2w_moveit_config github-start-jsk-rtmros_gazebo
samplerobot_moveit_config github-start-jsk-rtmros_gazebo
staro_moveit_config github-start-jsk-rtmros_gazebo
segbot_bringup github-utexas-bwi-segbot
segbot_description github-utexas-bwi-segbot
sr_ronex_examples github-shadow-robot-sr-ronex
youbot_gazebo_robot github-youbot-youbot_simulation
youbot_gazebo_worlds github-youbot-youbot_simulation
aubo_i5_moveit_config github-auboliuxin-aubo_robot
carl_description github-GT-RAIL-carl_bot
carl_moveit github-GT-RAIL-carl_moveit
cirkit_unit03_description github-CIR-KIT-Unit03-cirkit_unit03_common
cirkit_unit03_gazebo github-CIR-KIT-Unit03-cirkit_unit03_simulator
evarobot_description github-inomuh-evapc_ros
tetris_gazebo github-tork-a-hakuto
human_model_gazebo github-CIR-KIT-human_detector
stomp_test_kr210_moveit_config github-ros-industrial-industrial_moveit
innok_heros_gazebo github-innokrobotics-innok_heros_gazebo
jaco_gazebo github-GT-RAIL-jaco_gazebo
dualarm_grasping github-start-jsk-jsk_apc
jsk_2015_05_baxter_apc github-start-jsk-jsk_apc
jsk_2016_01_baxter_apc github-start-jsk-jsk_apc
jsk_arc2017_baxter github-start-jsk-jsk_apc
phantomx_reactor_arm_description github-RobotnikAutomation-phantomx_reactor_arm
phantomx_reactor_arm_moveit_config github-RobotnikAutomation-phantomx_reactor_arm
rail_ceiling github-GT-RAIL-rail_ceiling
rail_collada_models github-GT-RAIL-rail_collada_models
rb1_jaco_3fg_moveit_config github-RobotnikAutomation-rb1_common
rb1_mico_3fg_moveit_config github-RobotnikAutomation-rb1_common
schunk_lwa4d github-ipa320-schunk_robots
schunk_lwa4d_moveit_config github-ipa320-schunk_robots
schunk_lwa4p github-ipa320-schunk_robots
schunk_lwa4p_extended github-ipa320-schunk_robots
schunk_pg70 github-ipa320-schunk_robots
schunk_pw70 github-ipa320-schunk_robots
spur_description github-tork-a-spur
robotino_description github-squirrel-project-squirrel_common
softhand_description github-squirrel-project-squirrel_common
steer_drive_controller github-CIR-KIT-steer_drive_ros
Multicar_moveit_config github-gus484-ros
widowx_arm_description github-RobotnikAutomation-widowx_arm
widowx_arm_moveit github-RobotnikAutomation-widowx_arm
jaco_description github-RIVeR-Lab-wpi_jaco
jaco_moveit_config github-RIVeR-Lab-wpi_jaco
mico_description github-RIVeR-Lab-wpi_jaco
mico_moveit_config github-RIVeR-Lab-wpi_jaco
yumi_description github-OrebroUniversity-yumi
yumi_moveit_config github-OrebroUniversity-yumi

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.8.6
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version hydro-devel
Last Updated 2014-06-22
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • William Woodall

Authors

  • Stuart Glaser
README
No README found. No README in repository either.
CHANGELOG

Changelog for package xacro

1.8.6 (2014-06-21)

  • fix tests file so they run properly
  • Contributors: Michael Ferguson

1.8.5 (2014-04-29)

  • Installed xacro relocatable fix.
  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var Fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1
  • Contributors: Aaron Blasdel, Brian Gerkey, Jon Binney, Jonathan Bohren, Ken Conley, Kevin Watts, Rob Wheeler, Stu Glaser, Tully Foote, William Woodall

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
abb_common github-ros-industrial-abb
abb_irb2400_moveit_config github-ros-industrial-abb
abb_irb6640_moveit_config github-ros-industrial-abb
irb_6640_moveit_config github-ros-industrial-abb
cob_moveit_config github-ipa320-cob_manipulation
fanuc_lrmate200ic5h_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic5l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_support github-ros-industrial-fanuc
fanuc_m10ia_moveit_config github-ros-industrial-fanuc
fanuc_m10ia_support github-ros-industrial-fanuc
fanuc_m16ib20_moveit_config github-ros-industrial-fanuc
fanuc_m16ib_support github-ros-industrial-fanuc
fanuc_m20ia10l_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_support github-ros-industrial-fanuc
fanuc_m430ia2f_moveit_config github-ros-industrial-fanuc
fanuc_m430ia2p_moveit_config github-ros-industrial-fanuc
fanuc_m430ia_support github-ros-industrial-fanuc
fanuc_lrmate200ib_support github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_support github-ros-industrial-fanuc_experimental
fanuc_m900ia_support github-ros-industrial-fanuc_experimental
flir_ptu_description github-ros-drivers-flir_ptu
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
jsk_data github-jsk-ros-pkg-jsk_common
kobuki_description github-yujinrobot-kobuki
robot github-ros-metapackages
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pr2_description github-PR2-pr2_common
pr2_gazebo github-PR2-pr2_simulator
robot_upstart github-clearpathrobotics-robot_upstart
diff_drive_controller github-ros-controls-ros_controllers
gripper_action_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
sr_edc_launch github-shadow-robot-sr-ros-interface-ethercat
staubli_rx160_moveit_config github-ros-industrial-staubli
staubli_rx160_support github-ros-industrial-staubli
ur10_moveit_config github-ros-industrial-universal_robot
ur5_moveit_config github-ros-industrial-universal_robot
uos_common_urdf github-uos-uos_tools
urdf_tutorial github-ros-urdf_tutorial
dynpick_driver github-tork-a-dynpick_driver
grizzly_description github-g-grizzly
katana_arm_gazebo github-uos-katana_driver
motoman_sia20d_moveit_config github-ros-industrial-motoman
nao_moveit_config github-ros-naoqi-nao_moveit_config
nao_description github-ros-naoqi-nao_robot
pepper_description github-ros-naoqi-pepper_robot
robotiq_c2_model_visualization github-ros-industrial-robotiq
romeo_moveit_config github-ros-aldebaran-romeo_moveit_config
romeo_description github-ros-aldebaran-romeo_robot
schunk_svh_driver github-fzi-forschungszentrum-informatik-schunk_svh_driver
turtlebot_description github-turtlebot-turtlebot
create_description github-turtlebot-turtlebot_create
turtlebot_gazebo github-turtlebot-turtlebot_simulator
baxter_examples github-RethinkRobotics-baxter_examples
calvin_description github-uos-calvin_robot
calvin_moveit_config github-uos-calvin_robot
crom_moveit_config github-RobotnikAutomation-crom_sim
cyton_gamma_1500_description github-GertKanter-cyton_gamma_1500_description
dynamixel_pro_arm_description github-baxelrod-dynamixel_pro_arm_description
dynamixel_pro_arm_moveit_config github-baxelrod-dynamixel_pro_arm_moveit_config
erratic_description github-arebgun-erratic_robot
husky_description github-husky-husky_description
husky_navigation github-husky-husky_navigation
joint_state_publisher_js github-DLu-joint_state_publisher_js
panda_eus github-jsk-ros-pkg-jsk_robot
kingfisher_description github-kf-kingfisher
kurt_description github-uos-kurt_driver
maggie_description github-UC3MSocialRobots-maggie_robot
moveit_setup_assistant github-ros-planning-moveit_setup_assistant
r2_fullbody_moveit_config github-DLu-nasa_r2_common
r2_moveit_config github-DLu-nasa_r2_common
r2_gazebo github-DLu-nasa_r2_simulator
pmb2_description github-pal-robotics-pmb2_robot
reemc_description github-pal-robotics-reemc_robot
roomba_robin_description github-robinJKU-roomba_robin
roomba_robin_gazebo github-robinJKU-roomba_robin_simulator
hrpsys_gazebo_general github-start-jsk-rtmros_gazebo
hrp2jsk_moveit_config github-start-jsk-rtmros_gazebo
hrp2jsknt_moveit_config github-start-jsk-rtmros_gazebo
hrp2jsknts_moveit_config github-start-jsk-rtmros_gazebo
hrp2w_moveit_config github-start-jsk-rtmros_gazebo
samplerobot_moveit_config github-start-jsk-rtmros_gazebo
staro_moveit_config github-start-jsk-rtmros_gazebo
b21_description github-DLu-rwi_ros
rmp_description github-sri-robotics-segwayrmp
sr_description github-shadow-robot-sr-ros-interface
sr_moveit_config github-shadow-robot-sr-ros-interface
sr_ronex_examples github-shadow-robot-sr-ronex
wheeled_robin_description github-robinJKU-wheeled_robin
youbot_gazebo_robot github-youbot-youbot_simulation
youbot_gazebo_worlds github-youbot-youbot_simulation

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.11.3
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version kinetic-devel
Last Updated 2018-03-28
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke
README
No README found. No README in repository either.
CHANGELOG

Changelog for package xacro

1.11.3 (2018-03-28)

  • extend list of allowed python builtins: min, max, round
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #182: suppress xacro warnings when determining dependencies
  • #171: fix dependency handling (--deps option)
    • allow to specify extra dependencies for xacro_add_xacro_file(s)
    • consider yaml files loaded with load_yaml
  • fixes for #148 and #149
  • fix #156: avoid access to undefined variable target_table
  • fix #148: silently ignore extra attributes that are namespace specifiers
  • allow True/False literals in python expressions
  • Contributors: Robert Haschke, Morgan Quigley, Steven Peters

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
abb_irb2400_moveit_config github-ros-industrial-abb
abb_irb4400_support github-ros-industrial-abb
abb_irb6640_moveit_config github-ros-industrial-abb
abb_irb6640_support github-ros-industrial-abb
adi_driver github-tork-a-adi_driver
ati_force_torque github-KITrobotics-ati_force_torque
audibot_description github-robustify-audibot
rokubimini_description gitlab-botasys-bota_driver
cob_calibration_data github-ipa320-cob_calibration_data
cob_description github-ipa320-cob_common
raw_description github-ipa320-cob_common
cob_cartesian_controller github-ipa320-cob_control
cob_obstacle_distance github-ipa320-cob_control
cob_twist_controller github-ipa320-cob_control
cob_grasp_generation github-ipa320-cob_manipulation
cob_hardware_config github-ipa320-cob_robots
cob_moveit_config github-ipa320-cob_robots
cob_gazebo_worlds github-ipa320-cob_simulation
crane_x7_moveit_config github-rt-net-crane_x7_ros
dbw_fca_description bitbucket-DataspeedInc-dbw_fca_ros
dbw_mkz_description bitbucket-dataspeedinc-dbw_mkz_ros
denso_robot_moveit_config github-DENSORobot-denso_robot_ros
desistek_saga_description github-uuvsimulator-desistek_saga
eca_a9_description github-uuvsimulator-eca_a9
ensenso_description github-ensenso-ros_driver
fake_joint_driver github-tork-a-fake_joint
fanuc_cr35ia_support github-ros-industrial-fanuc
fanuc_cr7ia_moveit_config github-ros-industrial-fanuc
fanuc_cr7ia_support github-ros-industrial-fanuc
fanuc_cr7ial_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_support github-ros-industrial-fanuc
fanuc_lrmate200ib3l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_support github-ros-industrial-fanuc
fanuc_lrmate200ic5h_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic5l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_support github-ros-industrial-fanuc
fanuc_m10ia_moveit_config github-ros-industrial-fanuc
fanuc_m10ia_support github-ros-industrial-fanuc
fanuc_m16ib20_moveit_config github-ros-industrial-fanuc
fanuc_m16ib_support github-ros-industrial-fanuc
fanuc_m20ia10l_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_support github-ros-industrial-fanuc
fanuc_m20ib25_moveit_config github-ros-industrial-fanuc
fanuc_m20ib_support github-ros-industrial-fanuc
fanuc_m430ia2f_moveit_config github-ros-industrial-fanuc
fanuc_m430ia2p_moveit_config github-ros-industrial-fanuc
fanuc_m430ia_support github-ros-industrial-fanuc
fanuc_m6ib6s_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_support github-ros-industrial-fanuc
fanuc_m710ic_support github-ros-industrial-fanuc
fanuc_m900ia_support github-ros-industrial-fanuc
fanuc_m900ib_support github-ros-industrial-fanuc
fanuc_r1000ia80f_moveit_config github-ros-industrial-fanuc
fanuc_r1000ia_support github-ros-industrial-fanuc
fanuc_lrmate200id7l_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_support github-ros-industrial-fanuc_experimental
fanuc_r2000ib_support github-ros-industrial-fanuc_experimental
fanuc_r2000ic_support github-ros-industrial-fanuc_experimental
fetch_gazebo github-fetchrobotics-fetch_gazebo
fetch_description github-fetchrobotics-fetch_ros
fetch_moveit_config github-fetchrobotics-fetch_ros
flir_ptu_description github-ros-drivers-flir_ptu
franka_description github-frankaemika-franka_ros
franka_visualization github-frankaemika-franka_ros
fsrobo_r_moveit_config github-FUJISOFT-Robotics-fsrobo_r
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
heron_description github-heron-heron
heron_simulator github-heron-heron_simulator
husky_description github-husky-husky
igvc_self_drive_description github-robustify-igvc_self_drive_sim
jackal_description github-jackal-jackal
jackal_navigation github-jackal-jackal
jsk_data github-jsk-ros-pkg-jsk_common
khi_duaro_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs007l_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs007n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs013n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs020n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs025n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs030n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs080n_moveit_config github-Kawasaki-Robotics-khi_robot
kobuki_description github-yujinrobot-kobuki
lauv_description github-uuvsimulator-lauv_gazebo
leo_description github-LeoRover-leo_common
leo_viz github-LeoRover-leo_desktop
leuze_description gitlab-cc-asp-fraunhofer-led-leuze_ros_drivers
robot github-ros-metapackages
tra1_description github-tork-a-minas
tra1_moveit_config github-tork-a-minas
mir_description github-dfki-ric-mir_robot
moose_description github-moose-cpr-moose
moveit_setup_assistant github-ros-planning-moveit
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
open_manipulator_description github-ROBOTIS-GIT-open_manipulator
open_manipulator_moveit github-ROBOTIS-GIT-open_manipulator
open_manipulator_p_description github-ROBOTIS-GIT-open_manipulator_p
open_manipulator_p_gazebo github-ROBOTIS-GIT-open_manipulator_p_simulations
open_manipulator_gazebo github-ROBOTIS-GIT-open_manipulator_simulations
open_manipulator_with_tb3_description github-ROBOTIS-GIT-open_manipulator_with_tb3
open_manipulator_with_tb3_waffle_moveit github-ROBOTIS-GIT-open_manipulator_with_tb3
open_manipulator_with_tb3_waffle_pi_moveit github-ROBOTIS-GIT-open_manipulator_with_tb3
open_manipulator_with_tb3_gazebo github-ROBOTIS-GIT-open_manipulator_with_tb3_simulations
openni_description github-ros-drivers-openni_camera
panda_moveit_config github-ros-planning-panda_moveit_config
pheeno_ros_description github-acslaboratory-pheeno_ros_description
prbt_gazebo github-PilzDE-pilz_robots
prbt_moveit_config github-PilzDE-pilz_robots
prbt_support github-PilzDE-pilz_robots
play_motion github-pal-robotics-play_motion
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pr2_description github-pr2-pr2_common
pr2_gazebo github-PR2-pr2_simulator
prbt_pg70_support github-PilzDE-prbt_grippers
raspimouse_description github-rt-net-raspimouse_description
raspimouse_gazebo github-rt-net-raspimouse_sim
rc_visard_description github-roboception-rc_visard_ros
rexrov2_description github-uuvsimulator-rexrov2
ridgeback_description github-ridgeback-ridgeback
ridgeback_navigation github-ridgeback-ridgeback
robot_upstart github-clearpathrobotics-robot_upstart
ackermann_steering_controller github-ros-controls-ros_controllers
diff_drive_controller github-ros-controls-ros_controllers
gripper_action_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
schunk_description github-ipa320-schunk_modular_robotics
sciurus17_moveit_config github-rt-net-sciurus17_ros
seed_r7_description github-seed-solutions-seed_r7_ros_pkg
seed_r7_gazebo github-seed-solutions-seed_r7_ros_pkg
seed_r7_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typef_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typeg2_arm_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typeg_arm_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typeg_moveit_config github-seed-solutions-seed_r7_ros_pkg
sick_ldmrs_description github-SICKAG-sick_ldmrs_laser
sick_tim github-uos-sick_tim
sr_description github-shadow-robot-sr_common
sr_edc_launch github-shadow-robot-sr-ros-interface-ethercat
sr_moveit_hand_config github-shadow-robot-sr_interface
sr_multi_description github-shadow-robot-sr_interface
sr_box_ur10_moveit_config github-shadow-robot-sr_interface
sr_multi_moveit_config github-shadow-robot-sr_interface
sr_multi_moveit_test github-shadow-robot-sr_interface
staubli_rx160_moveit_config github-ros-industrial-staubli
staubli_rx160_support github-ros-industrial-staubli
staubli_tx2_60_support github-ros-industrial-staubli_experimental
staubli_tx2_90_support github-ros-industrial-staubli_experimental
staubli_tx60_support github-ros-industrial-staubli_experimental
staubli_tx90_support github-ros-industrial-staubli_experimental
talos_description github-pal-robotics-talos_robot
talos_description_calibration github-pal-robotics-talos_robot
talos_description_inertial github-pal-robotics-talos_robot
trac_ik_examples bitbucket-traclabs-trac_ik
turtlebot3_description github-ROBOTIS-GIT-turtlebot3
uwsim github-uji-ros-pkg-underwater_simulation
ur10_e_moveit_config github-ros-industrial-universal_robot
ur10_moveit_config github-ros-industrial-universal_robot
ur3_e_moveit_config github-ros-industrial-universal_robot
ur3_moveit_config github-ros-industrial-universal_robot
ur5_e_moveit_config github-ros-industrial-universal_robot
ur5_moveit_config github-ros-industrial-universal_robot
ur_description github-ros-industrial-universal_robot
ur_e_description github-ros-industrial-universal_robot
uos_common_urdf github-uos-uos_tools
urdf_geometry_parser github-ros-controls-urdf_geometry_parser
urdf_test github-pal-robotics-urdf_test
urdf_tutorial github-ros-urdf_tutorial
urg_node github-ros-drivers-urg_node
uuv_thruster_manager github-uuvsimulator-uuv_simulator
uuv_descriptions github-uuvsimulator-uuv_simulator
uuv_gazebo_ros_plugins github-uuvsimulator-uuv_simulator
uuv_sensor_ros_plugins github-uuvsimulator-uuv_simulator
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
warthog_description github-warthog-cpr-warthog
xpp_hyq github-leggedrobotics-xpp
xpp_quadrotor github-leggedrobotics-xpp
abb_crb15000_support github-ros-industrial-abb_experimental
abb_irb1200_5_90_moveit_config github-ros-industrial-abb_experimental
abb_irb1200_7_70_moveit_config github-ros-industrial-abb_experimental
abb_irb1200_support github-ros-industrial-abb_experimental
abb_irb120_moveit_config github-ros-industrial-abb_experimental
abb_irb120_support github-ros-industrial-abb_experimental
abb_irb120t_moveit_config github-ros-industrial-abb_experimental
abb_irb1600_6_12_moveit_config github-ros-industrial-abb_experimental
abb_irb2600_support github-ros-industrial-abb_experimental
abb_irb4600_support github-ros-industrial-abb_experimental
abb_irb52_support github-ros-industrial-abb_experimental
abb_irb6700_support github-ros-industrial-abb_experimental
abb_irb7600_support github-ros-industrial-abb_experimental
bebop_description github-AutonomyLab-bebop_autonomy
framefab_irb6600_workspace_moveit_config github-yijiangh-Choreo
choreo_kr150_2_workspace_moveit_config github-yijiangh-Choreo
choreo_kr5_arc_workspace_moveit_config github-yijiangh-Choreo
kr6_r900_mit_suction_gripper_moveit_config github-yijiangh-Choreo
kr6_r900_workspace_moveit_config github-yijiangh-Choreo
ca_description github-AutonomyLab-create_autonomy
dsr_gazebo github-doosan-robotics-doosan-robot
moveit_config_a0509 github-doosan-robotics-doosan-robot
moveit_config_a0912 github-doosan-robotics-doosan-robot
moveit_config_h2017 github-doosan-robotics-doosan-robot
moveit_config_h2515 github-doosan-robotics-doosan-robot
moveit_config_m0609 github-doosan-robotics-doosan-robot
moveit_config_m0617 github-doosan-robotics-doosan-robot
moveit_config_m1013 github-doosan-robotics-doosan-robot
moveit_config_m1509 github-doosan-robotics-doosan-robot
dynpick_driver github-tork-a-dynpick_driver
flir_camera_description github-ros-drivers-flir_camera_driver
grizzly_description github-g-grizzly
hsr_description github-ToyotaResearchInstitute-hsr_description
iiwa_moveit github-ipa-rwu-iiwa_stack
innok_heros_description github-innokrobotics-innok_heros_description
jaguar_description github-gstavrinos-jaguar
katana_arm_gazebo github-uos-katana_driver
kuka_kr10_support github-ros-industrial-kuka_experimental
kuka_kr120_support github-ros-industrial-kuka_experimental
kuka_kr150_support github-ros-industrial-kuka_experimental
kuka_kr16_support github-ros-industrial-kuka_experimental
kuka_kr210_support github-ros-industrial-kuka_experimental
kuka_kr3_support github-ros-industrial-kuka_experimental
kuka_kr5_support github-ros-industrial-kuka_experimental
kuka_kr6_support github-ros-industrial-kuka_experimental
kuka_lbr_iiwa_support github-ros-industrial-kuka_experimental
loki_description github-UbiquityRobotics-loki_robot
magni_description github-UbiquityRobotics-magni_robot
melfa_description github-tork-a-melfa_robot
rv4fl_moveit_config github-tork-a-melfa_robot
rv7fl_moveit_config github-tork-a-melfa_robot
mobility_base_description bitbucket-dataspeedinc-mobility_base_ros
motoman_ar2010_support github-ros-industrial-motoman
motoman_es_support github-ros-industrial-motoman
motoman_gp110_support github-ros-industrial-motoman
motoman_gp12_support github-ros-industrial-motoman
motoman_gp180_support github-ros-industrial-motoman
motoman_gp200r_support github-ros-industrial-motoman
motoman_gp25_support github-ros-industrial-motoman
motoman_gp35l_support github-ros-industrial-motoman
motoman_gp4_support github-ros-industrial-motoman
motoman_gp50_support github-ros-industrial-motoman
motoman_gp70l_support github-ros-industrial-motoman
motoman_gp7_support github-ros-industrial-motoman
motoman_gp88_support github-ros-industrial-motoman
motoman_gp8_support github-ros-industrial-motoman
motoman_hc10_support github-ros-industrial-motoman
motoman_hc20_support github-ros-industrial-motoman
motoman_ma2010_moveit_config github-ros-industrial-motoman
motoman_ma2010_support github-ros-industrial-motoman
motoman_mh110_support github-ros-industrial-motoman
motoman_mh12_support github-ros-industrial-motoman
motoman_mh50_support github-ros-industrial-motoman
motoman_mh5_support github-ros-industrial-motoman
motoman_motomini_support github-ros-industrial-motoman
motoman_motopos_d500_support github-ros-industrial-motoman
motoman_ms210_moveit_config github-ros-industrial-motoman
motoman_ms210_support github-ros-industrial-motoman
motoman_sda10f_moveit_config github-ros-industrial-motoman
motoman_sda10f_support github-ros-industrial-motoman
motoman_sia10d_support github-ros-industrial-motoman
motoman_sia10f_support github-ros-industrial-motoman
motoman_sia20d_moveit_config github-ros-industrial-motoman
motoman_sia20d_support github-ros-industrial-motoman
motoman_sia30d_support github-ros-industrial-motoman
motoman_sia50_support github-ros-industrial-motoman
motoman_sia5d_support github-ros-industrial-motoman
motoman_bmda3_support github-ros-industrial-motoman_experimental
motoman_csda10f_moveit_config github-ros-industrial-motoman_experimental
motoman_csda10f_support github-ros-industrial-motoman_experimental
motoman_epx_support github-ros-industrial-motoman_experimental
motoman_mh_support github-ros-industrial-motoman_experimental
motoman_mhj_support github-ros-industrial-motoman_experimental
motoman_mpl80_moveit_config github-ros-industrial-motoman_experimental
motoman_mpl_support github-ros-industrial-motoman_experimental
motoman_mpx3500_support github-ros-industrial-motoman_experimental
motoman_sia5d_moveit_config github-ros-industrial-motoman_experimental
multi_jackal_base github-NicksSimulationsROS-multi_jackal
multi_jackal_control github-NicksSimulationsROS-multi_jackal
multi_jackal_description github-NicksSimulationsROS-multi_jackal
nao_moveit_config github-ros-naoqi-nao_moveit_config
nao_description github-ros-naoqi-nao_robot
pepper_moveit_config github-ros-naoqi-pepper_moveit_config
pepper_description github-ros-naoqi-pepper_robot
pheeno_ros_sim github-ACSLaboratory-pheeno_ros_sim
pioneer_mrs github-hanzheteng-pioneer_mrs
raspigibbon_description github-raspberrypigibbon-raspigibbon_ros
rb1_dual_ur3_moveit_config github-RobotnikAutomation-rb1_base_common
rb1_base_description github-RobotnikAutomation-rb1_base_common
recordit github-ipa-jfh-robot_recorder
robotiq_2f_c2_gripper_visualization github-ros-industrial-robotiq
robotnik_sensors github-RobotnikAutomation-robotnik_sensors
roch_description github-SawYer-Robotics-roch_robot
romeo_moveit_config github-ros-aldebaran-romeo_moveit_config
romeo_description github-ros-aldebaran-romeo_robot
roomblock_description github-tork-a-roomblock
rsv_balance_description github-robosavvy-rsv_balance
schunk_canopen_driver github-fzi-forschungszentrum-informatik-schunk_canopen_driver
schunk_svh_driver github-fzi-forschungszentrum-informatik-schunk_svh_driver
summit_x_description github-RobotnikAutomation-summit_x_common
summit_x_gazebo github-RobotnikAutomation-summit_x_sim
summit_xl_j2n6s200_moveit_config github-RobotnikAutomation-summit_xl_common
summit_xl_j2s6s200_moveit_config github-RobotnikAutomation-summit_xl_common
summit_xl_j2s6s300_moveit_config github-RobotnikAutomation-summit_xl_common
summit_xl_j2s7s300_moveit_config github-RobotnikAutomation-summit_xl_common
summit_xl_description github-RobotnikAutomation-summit_xl_common
summit_xl_gazebo github-RobotnikAutomation-summit_xl_sim
svenzva_moveit github-SvenzvaRobotics-svenzva_ros
turtlebot_description github-turtlebot-turtlebot
turtlebot_arm_description github-turtlebot-turtlebot_arm
turtlebot_arm_moveit_config github-turtlebot-turtlebot_arm
create_description github-turtlebot-turtlebot_create
turtlebot_gazebo github-turtlebot-turtlebot_simulator
dual_xarm6_moveit_config github-xArm-Developer-xarm_ros
xarm5_vacuum_gripper_moveit_config github-xArm-Developer-xarm_ros
xarm6_vacuum_gripper_moveit_config github-xArm-Developer-xarm_ros
xarm7_vacuum_gripper_moveit_config github-xArm-Developer-xarm_ros
lite6_moveit_config github-xArm-Developer-xarm_ros
uf_robot_moveit_config github-xArm-Developer-xarm_ros
xarm5_gripper_moveit_config github-xArm-Developer-xarm_ros
xarm5_moveit_config github-xArm-Developer-xarm_ros
xarm6_gripper_moveit_config github-xArm-Developer-xarm_ros
xarm6_moveit_config github-xArm-Developer-xarm_ros
xarm7_gripper_moveit_config github-xArm-Developer-xarm_ros
xarm7_moveit_config github-xArm-Developer-xarm_ros
xbot_description github-DroidAITech-xbot
xiaoqiang_description github-bluewhalerobot-xiaoqiang

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange

xacro package from xacro repo

xacro

Package Summary

Tags No category tags.
Version 1.13.20
License BSD
Build type CATKIN
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/ros/xacro.git
VCS Type git
VCS Version melodic-devel
Last Updated 2023-05-24
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Xacro (XML Macros) Xacro is an XML macro language. With xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions.

Additional Links

Maintainers

  • Robert Haschke
  • Morgan Quigley

Authors

  • Stuart Glaser
  • William Woodall
  • Robert Haschke

Xacro (XML Macros)

Xacro is an XML macro language

With Xacro, you can construct shorter and more readable XML files by using macros that expand to larger XML expressions. Documentation can be found in the wiki: http://wiki.ros.org/xacro

CHANGELOG

Changelog for package xacro

1.13.20 (2023-05-24)

  • Fix hasattr support of YamlDictWrapper (#324)
  • Contributors: Alec Tiefenthal

1.13.19 (2023-02-27)

  • Evaluate arg value as str/unicode (#322)
  • Contributors: Robert Haschke

1.13.18 (2022-10-21)

  • Dotted YAML access from list iterator (#318)
  • Contributors: Robert Haschke

1.13.17 (2022-02-12)

  • Only optionally activate comment evaluation (#310)

    Comment evaluation can be enabled with a special comment:

    • <!-- xacro:eval-comments --> or
    • <!-- xacro:eval-comments:on -->

    It remains active for the following comments until: - the current XML tag\'s scope is left (or a new tag entered) - another tag or non-whitespace text is processed - it becomes explicitly disabled via: <!-- xacro:eval-comments:off -->

  • Fix property resolution with namespace usage (#308)

    • Allow access to properties in parent scopes again (fixes #305)
    • Pick correct scope when defining a property into the parent (fixes #307)

      Setting a property within the parent scope may occur in two contexts:

    1.  From within a macro. In that case, one wants to set the
        property in the caller\'s scope.
    2.  From within the included file. In that case, one wants to
        set the property in the includer\'s scope.
    
  • Contributors: Robert Haschke

1.13.16 (2022-01-30)

  • Issue a warning only for evaluation errors in comments
  • Add LICENSE file
  • Contributors: Robert Haschke

1.13.15 (2022-01-20)

  • Fix resolving of macros and properties declared and used in/from a namespace (#297, #306)

    Macros and properties that are declared within a namespaced include shouldn\'t require the namespace prefix when used within the namespace.

  • Perform expression evaluation in comments (#300)

  • Expose xacro.arg() to facilitate access to substitution args

  • Contributors: Robert Haschke

1.13.14 (2021-10-02)

  • Allow property names to be evaluated from an expression This allows to turn macros into a function that can compute an arbitrary property:

    <xacro:macro name="square" params="name args">
      <!-- Perform some complex computation and set the property within the parent's scope -->
      <xacro:property name="${name}" value="${[float(x)**2 for x in args]}" scope="parent" />
    </xacro:macro>
    <xacro:square name="result" args="${python.range(5)}" />
    
  • Fix error reporting for invalid symbols in NameSpaces

  • Allow removal of a property definition (#288)

    <xacro:property name=\"prop\" remove=\"true\"/>

  • Allow greedy property evaluation (#284) This can be used, to redefine a property from its previous value, e.g. for normalization:

    <xacro:property name="prop" value="${prop.lower()}" lazy_eval="false"/>
    
  • Correctly expose XML namespaces imported via xacro:include within a macro (#287)

  • Throw when attempting to declare a property starting with double underscore (#286)

  • Improve global symbols (#283)

    • Expose most builtin symbols of python
    • Expose xacro functions into xacro namespace

      • xacro.print_location() to print the current filestack
      • tokenize(string, sep=',; ', skip_empty=True) to facilitate string tokenization
      • message(), warning(), error(), and fatal() to output messages on stderr. All but message() print the error location (macro call and file hierarchy) by default:

        ${xacro.message('message', 'text', 2, 3.14, color=32, print_location=True)}
        ${xacro.warning('warning')}
        ${xacro.error('error', print_location=False)}
        ${xacro.fatal('fatal')}
        
    • Rework handling of file and macro stack, such that print_location() works from anywhere

    • Unit tests: Reduce reported stdout/stderr output

    • Rework definition of global_symbols to expose functions into namespaces python, math, xacro

  • Contributors: Robert Haschke

1.13.13 (2021-09-03)

  • Allow more builtin symbols: sorted, set
  • Don\'t import hidden symbols from math package
  • Fix eval() security vulnerability
    • safe_eval(): Forbid symbol names starting with double underscore
    • unit tests validating the protection mechanism
  • Generalize yaml !degrees constructor: Enable expressions as well
  • Contributors: Robert Haschke

1.13.12 (2021-07-19)

  • Improve macro arg parsing (#278) to support:
    • $(substitution args)
    • ${python expressions}
    • single or double quoting of spaces
  • Contributors: Robert Haschke

1.13.11 (2021-05-30)

  • Expose YamlDictWrapper as dotify()
  • Contributors: Robert Haschke

1.13.10 (2021-02-11)

  • Use outer-scope symbols to resolve include filename in xacro:include (#264)
  • Contributors: Robert Haschke

1.13.9 (2020-10-13)

  • [fix] yaml loading: recursively wrap lists and dicts for dotted dict access (#258)
  • Contributors: Robert Haschke

1.13.8 (2020-08-28)

  • Provide support for yaml constructors !degrees and !radians (#252)
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.13.7 (2020-08-09)

  • [fix] Rework YamlDictWrapper to restore dict properties (#250)
  • Contributors: Robert Haschke

1.13.6 (2020-07-05)

  • [feature] Improve warnings
    • Unify meaning of verbosity > 0 (to print file location)
    • Provide file location on warning in check_attrs()
    • Issue warning on child elements of <xacro:include> tag
  • [feature] Allow dotted access to yaml-loaded dicts: d.key1.key2.key3 (#245)
  • [maint] Travis: Update distro to Bionic
  • Contributors: Robert Haschke, G.A. vd. Hoorn

1.13.5 (2019-12-08)

  • [feature] Expose abs_filename() (#220)
  • [feature] Catch missing closing brace in \$() and \${} expressions
  • [maintanence]
    • Replace deprecated yaml.load() -> yaml.safe_load()
    • Save macro names internally w/o \'xacro:\' prefix
    • Correctly issue deprecation warning for non-prefixed xacro tags
  • Contributors: Robert Haschke

1.13.4 (2019-09-26)

  • [feature] remove xmlns:xacro from processed file (#207)
    • Remove all notions of xmlns:xacro from the resulting document.
    • If the root node defines a xacro:targetNamespace attribute, this will become the global xmlns namespace of the resulting document.
  • [feature] Add len() to allowed python functions (#208)
  • [maintanence]
    • --in-order warning: reduce severity level to message
    • fix and cleanup test of cmake extensions
    • adapt run_xacro() to run xacro from PATH
    • simplify import of substition_args
    • remove \'requires\' field from setup.py
    • fix Travis config: use new repository key, use xenial/kinetic distro
    • basic README.md
    • fix catkin_lint issue
    • remove duplicate catkin_python_setup() (#206)
  • Contributors: Robert Haschke, James Xu, Martin Pecka

1.13.3 (2018-10-14)

  • use INORDER as default in cmake functions
  • remove weird \'None\'s in error messages
  • Contributors: Robert Haschke

1.13.2 (2018-05-14)

  • deprecate --includes option (which is tied to deprecated --legacy processing)
  • moved all option handling to cli.py, including deprecation warnings for options
  • Contributors: Robert Haschke

1.13.1 (2018-05-03)

  • fix parsing of quoted strings in default args for xacro params (#187)
  • Contributors: Robert Haschke

1.13.0 (2018-03-31)

  • make --inorder processing the default
  • Contributors: Robert Haschke

1.12.1 (2018-03-28)

  • #183: unicode support for python2 and python3
  • #178: extend list of allowed python builtins: min, max, round
  • #182: suppress xacro warnings when determining dependencies
  • #151: fixes for #149 and #148
  • #157: fix #156 access to undefined target_table
  • #150: allow True/False literals in python expressions
  • #159: load ROS-related packages on demand, thus becoming more independent from ROS
  • #173: allow default values for properties
  • #172: fix formatting of XacroException
  • #171: fix dependency handling (--deps option)
  • #163: full python 3 compatibility
  • Contributors: Robert Haschke, Kartik Mohta, Morgan Quigley, Steven Peters

1.12.0 (2017-03-25)

1.11.2 (2017-02-27)

  • Convert exception to string in a python2/3 compatible way.
  • Use python2/3 independent check for file type.
  • Contributors: Hans Gaiser, Maarten de Vries

1.11.1 (2016-06-22)

  • workaround for xml.dom.minidom issue
  • ensure non-empty error string
  • Contributors: Robert Haschke

1.11.0 (2016-03-25)

  • added short option -i as alternative to --inorder
  • refactored main to fix #122, #107
  • added xacro indicator to error message to fix #123
  • moved banner generation to process_file()
  • removed special (but obsolete) output handling for just_includes mode
  • moved core processing pipeline into function process_file()
  • improved documentation: more comments, input_file -> input_file_name
  • fix #120: handle non-space whitespace characters in params string
  • extended tests to handle non-space whitespace characters in params string
  • always store macros with xacro: prefix in front: #118
  • fix #115: enforce xacro namespace usage with --xacro-ns option
  • apply correct checking for include tags, and extend testcase
  • allow (one-level) nested expression/extension evaluation
  • Contributors: Robert Haschke, Morgan Quigley

1.10.6 (2015-09-01)

  • use correct catkin environment for cmake dependency checking
  • fixed dependency definition for cmake usage
  • Contributors: Robert Haschke

1.10.5 (2015-08-12)

  • fix #108: evaluate property blocks recursively too
  • improved macro parameter parsing
  • use a regular expression to parse a param spec with forwarding and default
  • allow for spaces in default string (within single quotes)
  • forwarding macro arguments from outer scope
  • switched to [^|]{.title-ref} syntax
  • use more compact [\$|]{.title-ref} syntax
  • moved parsing of argument defaults to grab_macro()
  • explicit forwarding of properties to macro scope
  • replace silent/implicit forwarding of properties from outer scope to macro scope by an explicit \"call\" to a [forward(<name>[,<default>])]{.title-ref} function.
  • implicit forwarding of outer-scope properties to macro args (#100)
  • property evaluation fixes
  • suppress double evaluation of properties
  • adapted unittest to cover the fixed issue
  • fixed evaluation order for properties exported to parent or global scope
  • Merge pull request #103 from ubi-agni/overwrite-check issue warning when attempting to overwrite existing global property
  • fixed unittest: avoid overwrite warning
  • warn when overwriting any globally defined variable
  • Merge pull request #102 from ubi-agni/completion bash completion
  • Merge pull request #99 from ubi-agni/jade-devel reworked macro resolution
  • moved test_macro_name_with_colon() to class TestXacro should be tested both, in oldorder and inorder mode
  • bash completion
  • improved error message for failed \$(find)
  • reworked macro resolution python-eval-based macro resolution (introduced to enable namespaces) heavily restricted the set of possible macro names (only valid python identifiers were allowed) Particularly, xacro: prefixed macro names were forbidden.
  • initial attempt to fix #97
  • add failing test case with colon in the macro name
  • Contributors: Robert Haschke

1.10.4 (2015-06-18)

  • removed test_DEPRECATED_should_replace_before_macroexpand() duplicates test_should_replace_before_macroexpand()
  • fixed evaluation order of macro arguments and body Macro arguments need to be evaluated and assigned to properties before body is evaluated. Otherwise, the evaluated value will be converted to str, i.e. loosing original type.
  • Contributors: Robert Haschke

1.10.3 (2015-06-16)

  • deprecate --oldorder processing
  • added --check-order option to do a simple check for --inorder compatibility
    • Most probable incompatibility is redefining a property after its usage.
    • tested and reported with file location of (first) redefinition after usage.
  • moved command line processing to cli.py
  • explain verbosity levels in usage string
  • colorize errors during cli parsing
  • log definition and usage of properties
  • replaced debug option by verbosity options -q, -v
  • fixed evaluation time of default macro params
  • introduced Macro object to increase code readability
  • parse a macro\'s parameter list once at declaration time (instead of every instantiation)
  • extended test_multiple_blocks() to check for both normal and reversed order
  • added unittest to increase code coverage
  • do not issue deprecation warning for <include> tags that are non-xacro
  • added option --oldorder
  • allow to store properties to parent or global scope
  • added <xacro:attribute>
  • cleaned up error message about missing files
  • moved xml-specific functions to xmlutils.py new generic functions opt_attrs(), reqd_attrs(), and check_attrs() to fetch optional and required attributes and warn about unknown ones in a uniform fashion
  • unittest to allow empty <arg> defaults
  • Merge pull request #94 from ubi-agni/minor-fixes
  • minor fixes
  • remove duplicates in --deps output
  • fixed dependency checking for --inorder mode (which requires full processing)
  • fixed doc of xacro\' cmake macros
  • renamed \"xacro:rename\" to \"xacro:element\"
  • allow namespacing for xacro:include\'s
  • allow renaming of element names using xacro:rename
  • unittest cleanup
  • check property and macro names to be valid python identifiers
  • allow namespacing of xacro:include\'s
  • properties and macros in an included file will go into their own, separate namespace, if the XML attribute [ns]{.title-ref} is provided. Access is by standard python syntax: namespace.name
  • allow renaming of element names <xacro:rename xacro:name=\"<new element name>\"/>
  • moved unittests requiring --inorder processing to class TestXacroInorder
  • added unittest test_dynamic_macro_undefined()
  • improved error message when variable include filename is used without --inorder
  • stripped down unittest test_inorder_processing()
  • improved processing
  • adapted pr2 gold standard removing most comments again this partially reverts 59605fb1521583dc63efdea13f4c45128499bd20
  • remove all XML comments directly before xacro elements (These are considered xacro-related only and should be removed in the final doc.) Leaving an empty line between xacro-unrelated and xacro-related comments allows to include the former.
  • unittest: test_ignore_xacro_comments()
  • improved processing
    • recursive (instead of iterative) eval_all()
    • reusable process_include()
    • replace_node() function to replace xacro tag by some other content
    • avoid reprocessing of nodes
    • avoid deep copy where possible (speedup)
  • fix evaluation (#83)
  • yaml support
  • check for consistency of xml namespaces on xacro:include
  • replaced strip()==\'\' by more efficient isspace()
  • allow transitive definition of substition args
  • fixed evaluation of literals in property definitions
    • literals with preceding whitespace will be silently stripped (#83)
    • more complex evaluation test (perturbing spaces added)
  • fixed xacro namespaces in pr2 files to get rid of new inconsistency warning
  • warning message on inconsistent namespace redefinition for includes
  • yaml support \${load_yaml(\'file.yaml\')} to load dict from yaml file
  • Merge pull request #85 from ubi-agni/error-reporting improved error reporting
  • nicer formatting of multiple \"when evaluating expression\" lines
  • improved formatting of error messages use XacroException to wrap and augment other exceptions to achieve a clearer error formatting
  • better error message for missing substitution args
  • use colorized warnings where possible
  • included macro stack in error-reporting
  • maintain filestack to facilitate error reporting at any time
  • Merge pull request #82 from ubi-agni/unittests improved unittesting
  • allow to capture (and check) stderr in unit tests
  • improved unittests to test both, classic and in-order processing
  • Merge pull request #81 from ubi-agni/jade-devel Thank you for your time and contributions. Improving cosmetics is important.
  • PEP8 cleanup
  • cmake: only copy files to devel space if new
  • Merge pull request #80 from ubi-agni/jade-devel
  • improved error-handling opening the output file - running multiple xacro process in parallel, all writing into a new dir could cause a race condition when creating the dir

    • improved error message on output creation failure
  • removed rospy dependency

    • Importing rospy caused build order issues with ros_comm in workspace
  • Filtering out REMAP command-line arguments is done manually now.

  • update authors/maintainers and copyright statements

  • deprecate non-namespaced xacro tags

  • added missing print_location_msg() for file that actually failed parsing

  • improved deprecation warnings

  • New cli option [--xacro-ns]{.title-ref} allows to enforce the new policy requiring the xacro namespace prefix (and suppressing deprecation warnings). However, non-prefixed tags will not be modified by xacro anymore (as requested by #41, #59, #60). Partially reverted cb73cfd8c678adfda2172accef398189ea2338a1, handling <arg> tags in the same fashion as other tags, i.e. issue a warning if used without prefix and ignoring it with cli argument [--xacro-ns]{.title-ref}.

  • fixed pr2 xacro files to use \'xacro:\' prefixed tags only

  • fixed unittests in test_xacro.py to use \'xacro:\' prefixed tags only

  • deprecation message for missing xacro namespace prefix in xml tags

  • moved colored warning messages into color.py (for reuseability)

  • added missing print_location_msg() for file that actually failed parsing

  • improved xacro\'s cmake macros

  • prepend \${PACKAGE_NAME} to all generated cmake targets Otherwise multiple packages employing xacro\'s cmake macros will use the same conflicting target name. This is only an issue with catkin_make, which defines a single global cmake namespace. The new catkin tools (or catkin_make_isolated) build each package separately.

  • basic unittest for xacro\'s cmake macros

  • improved xacro\'s cmake macros - xacro_add_xacro_file() automatically determines output file from input (removing .xacro suffix). If that fails, a fatal error is raised.

    • added xacro_install() to allow installation into both, devel and install space.
    • replaced conveniency function xacro_add_files()
  • Contributors: Robert Haschke

1.10.2 (2015-05-23)

  • added --debug option to explicitly enable stack traces By default, only show error message to the user. Stack traces are only interesting for xacro developers.
  • recursive include processing

    • more informed error messages (which file was included from where)

    - allows relative path names for include filename specs they are interpreted relative to the current file

  • new substitution command \$(cwd) to extract current working directory

  • added unittest cases

    • creation of required subdirs for output
    • recursive xacro:include
    • extended test_include_glob() to check for all glob patterns
  • added run_xacro() function to simplify unittests running xacro script

  • moved xacro.py back to original location

  • nicely colored deprecation warning

  • create required dirs before opening output file

  • added convenience cmake-macro xacro_add_target() to auto-generate xacro-processed files

  • added cmake status message before launching xacro (xacro might run for quite a while)

  • fetch xacro --deps errors at report them as a warning

  • simplified deprecation message

  • added missing return statement

  • removed obsolete math import left over from deaaae2c69edd7d5e185eeb098c1521d8711608b

  • install xacro.py again (for backwards compatibility) usage of xacro.py issues a deprecation warning

  • simplified scripts/xacro - removed xacro.py

    • made run script \"scripts/xacro\" and install process follow standards
    • removed xacro.py

    - added dependencies to setup.py Having the binaries xacro and xacro.py installed side by side causes problems, because xacro.py is wrongly taken as the module. This was avoided by the rather complex filtering of the sys.path. Switched to ROS standard now, using a binary script called \"xacro\".

  • changed tests to use the whole xacro processing pipeline utilizing the modularization of main() from previous commit This simplifies several existing tests, especially these using files on disk.

  • split main() into process_cli_arg(), parse(), process_doc()

  • extended cmake macro xacro_add_xacro_file()

    • handle INORDER option
    • handle REMAP arguments

    - create absolute input file names automatically usage: xacro_add_xacro_file(input output INORDER REMAP ...)

  • stripped new unit tests to essential xml snippets

  • merged pull request #68: eval properties assigned from <arg> tags as literals In the following example: <xacro:arg name=\"val\" default=\"0.5\"/> <xacro:property name=\"val\" value=\"\$(arg val)\"/> \${val} was not evaluated as a number, but as string only. Thus numerical expressions failed with an exception.

  • factored out get_boolean_value()

  • <xacro:arg> needs to be fully specified

  • (handling <arg> tags (without xacro ns-prefix) disabled native <arg> tags) add test for eating launch parameter arguments remove check for \"arg\" parameter. move new test function to bottom of source

  • added unit tests for evaluation of list, tuple, and dict literals

  • fixed some code style issues

  • fixed string-isinstance checks (for python 3 compatibility)

  • do not evaluate list, dict, tuple expressions as literals (without \${} syntax)

  • added dict to list of known global symbols

  • focused global_symbols definition in the beginning of the file added some basic python symbols: list, str, float, int and map allowing some basic computation

  • tuning performance: instantiate QuickLexer\'s regexps only once

  • Contributors: Robert Haschke, Martin Pecka, Mike O\'Driscoll, Morgan Quigley

1.10.1 (2015-04-01)

  • improved error handling and more descriptive error messages
  • correctly raise a XacroException on invalid, i.e. non-boolean, <xacro:if> expressions. (removed left-over debugging code, added test case)
  • raise an exception on undefined, but used macros Using the syntax <xacro:macroname/> should raise an exception if macroname is not defined. Added appropriate code and a test case.
  • fixed bookkeeping in lazy evaluation switch Table.unevaluated from list to set to avoid multiple key entries
  • fix formatting of changelog
  • Contributors: Robert Haschke

1.10.0 (2015-03-13)

  • security measure: forbid access to __builtins__ in expressions
  • literal evaluation should only consider literals, but no expressions use ast.literal_eval()
  • removed eval() from xacro:if evaluation
  • back to string comparison to handle (lowercase) true and false
  • add test case for equality expressions in <xacro:if>
  • add test case for math function usage
  • python based evaluation of expressions
    • replaced handle_expr with python-internal eval() call
    • care has been taken to resolve variables recursively on demand (in Table.__getitem__)
    • allows for evaluation of standard math functions
    • other desired functions could be added in eval_self_contained
    • Values in Table symbols are not stored as strings but as typed values.
  • If text is required, a conversion with str() is performed, to ensure proper evaluation of expressions. Otherwise 3*\"1\" would evaluate to \"111\".
  • use __future__.division we can handle integer division evaluating to floating-point devision, as before
  • allow variable names for filename attribute in <xacro:include>
  • allow for ordered XML processing to avoid issues with multiply defined properties and macros in (typically 3rd party) include files
    • enable the new behaviour by passing --inorder cmdline option
    • to improve code readibility and reusability, introduced functions
  • process_include(node), grab_macro(elt, macros), grab_property(elt, symbols) containing 1:1 corresponding handling from process_includes, grab_macros, and grab_properties
    • added corresponding test case test_inorder_processing()
  • dynamic macro names using <xacro:call macro=\"\"/>
  • fixup unittests and handling of non-element nodes in <include>, <if>, <macro>
  • updated pr2 gold standard to include all comments
  • allow to ignore comments in nodes_match()
  • New handling of non-element nodes invalidates pr2 gold standard (adding a lot more comments). To allow validation, allow to ignore all comments in comparison (as before).
  • fixed handling of non-element nodes in <include>, <if>, <macro>
  • fixed writexml: text nodes were not printed when other siblings exist
    • print all text, but skip whitespace-only text nodes
  • improved xml matching

    • so far only element nodes (with its attributes) were considered
    • now also consider TEXT, CDATA, and COMMENT nodes
    • added function text_matches (normalizing consecutive whitespace to a single space)
    • added some new unit tests

    - test_consider_non_elements: non-element nodes are not yet considered in <if> and <macro>

  • travis-ci: use catkin_make

  • travis-ci: fixup running of tests

  • fix pathnames used in test case

  • Include CATKIN_ENV params at build time.

  • use output filename flag instead of shell redirection

  • create output file after parsing is complete, not before

  • Contributors: Robert Haschke, Mike O\'Driscoll, Morgan Quigley, William Woodall

1.9.3 (2015-01-14)

  • merge test cases
  • add a snapshot of the pr2 model to the test directory. add a test case which verifies that the pr2 model is parsed equal to a \'golden\' parse of it.
  • add more tests
  • add default arg tests
  • Allow default values for substitution args
  • Fix up comments
  • Allow xacro macros to have default parameters
  • Contributors: Paul Bovbel, Morgan Quigley

1.9.2 (2014-07-11)

  • add a few more tests to exercise the symbol table a bit more
  • allow for recursive evaluation of properties in expressions
  • add useful debugging information when parameters are not set
  • stop test from failing the second time it is run
  • unified if/unless handling, correctly handle floating point expressions
  • floating point expressions not equal zero are now evaluated as True
  • changed quotes to omit cmake warning
  • Contributors: Robert Haschke, Mike Ferguson

1.9.1 (2014-06-21)

  • fixup tests so they run
  • export architecture_independent flag in package.xml
  • installed relocatable fix
  • Contributors: Michael Ferguson, Mike Purvis, Scott K Logan

1.9.0 (2014-03-28)

  • Remove the roslint_python glob, use the default one.
  • Add roslint target to xacro; two whitespace fixes so that it passes.
  • fix evaluation of integers in if statements also added a unit test, fixes #15
  • fix setting of _xacro_py CMake var, fixes #16
  • Add support for globbing multiple files in a single <xacro:include>
  • code cleanup and python3 support
  • check for CATKIN_ENABLE_TESTING

1.8.4 (2013-08-06)

  • Merge pull request #9 from davetcoleman/hydro-devel Xacro should not use plain \'include\' tags but only namespaced ones.
  • Fix for the fact that minidom creates text nodes which count as child nodes
  • Removed <uri> checking and made it more general for any child element of an <include> tag
  • Removed Groovy reference, only being applied to Hydro
  • Created check for Gazebo\'s <uri> tabs only only shows deprecated warnings if not present.
  • Small spelling fix
  • Xacro should not use plain \'include\' tags but only namespaced ones.
  • Merge pull request #8 from piyushk/hydro-devel-conditional xacro conditional blocks
  • using refined arguments instead of sys.argv for xml file location
  • adding conditional blocks to xacro

1.8.3 (2013-04-22)

  • bumped version to 1.8.3 for hydro release
  • backwards compatilibity with rosbuild
  • adding unit test for substitution args
  • Adding supoprt for substitution_args \'arg\' fields
  • Remove bin copy of xacro.py
  • 1.7.3
  • Install xacro.py as a program so it can be run
  • 1.7.2
  • fixed build issues introduced in catkinization
  • 1.7.1
  • PEP8, cleanup, and remove roslib
  • Update copyright, self import guard, and catkinize
  • Catkinize.
  • Cleanup in preparation of catkinization.
  • Added tag unstable for changeset 169c4bf30367
  • Added tag xacro-1.6.1 for changeset fc45af7fdada
  • 1.6.1 marker
  • xacro: fuerte compat with sub args import
  • Added tag unstable for changeset 2d3c8dbfa3c9
  • Added tag xacro-1.6.0 for changeset e4a4455189bf
  • 1.6.0
  • converted to unary stack from common stack
  • xacro: fixed inserting property blocks (ros-pkg #4561)
  • xacro now uses XacroExceptions. String exceptions are not allowed in Python anymore. #4209
  • Added Ubuntu platform tags to manifest
  • Xacro now places comments below <?xml> tag (#3859)
  • Xacro prints out cleaner xml. Elements are now often separated by a newline.
  • xacro dependency on roslaunch removed #3451
  • Xacro now adds a message mentioning that the file was autogenerated (#2775)
  • Remove use of deprecated rosbuild macros
  • Integers stay integers in xacro, fixing #3287
  • Tests for r25868
  • Added a flag for only evaluating include tags in xacro
  • Allowing multiple blocks and multiple insert_blocks, fixing #3322 and #3323
  • doc review completed for xacro
  • adding mainpage for xacro doc review
  • Added xacro.cmake file that exports new xacro_add_xacro_file() macro, #3020
  • Namespaced \"include\" tag in xacro
  • Marked xacro as api reviewed
  • Xacro now correctly declares the namespaces of the included documents in the final
  • Made xacro accept xml namespaces
  • Xacro now errors hard when a property is used without being declared
  • Xacro no longer allows you to create properties with \"\${}\" in the name
  • Added the ability to escape \"\${\" in xacro
  • Made the tests in xacro run again.
  • Created xacro/src
  • migration part 1

Wiki Tutorials

See ROS Wiki Tutorials for more details.

Source Tutorials

Not currently indexed.

Package Dependencies

System Dependencies

No direct system dependencies.

Dependant Packages

Name Repo Deps
abb_irb2400_moveit_config github-ros-industrial-abb
abb_irb4400_support github-ros-industrial-abb
abb_irb6640_moveit_config github-ros-industrial-abb
abb_irb6640_support github-ros-industrial-abb
adi_driver github-tork-a-adi_driver
ati_force_torque github-KITrobotics-ati_force_torque
audibot_description github-robustify-audibot
rokubimini_description gitlab-botasys-bota_driver
clover_description github-CopterExpress-clover
clover_simulation github-CopterExpress-clover
cob_calibration_data github-ipa320-cob_calibration_data
cob_description github-ipa320-cob_common
raw_description github-ipa320-cob_common
cob_cartesian_controller github-ipa320-cob_control
cob_obstacle_distance github-ipa320-cob_control
cob_twist_controller github-ipa320-cob_control
cob_grasp_generation github-ipa320-cob_manipulation
cob_hardware_config github-ipa320-cob_robots
cob_moveit_config github-ipa320-cob_robots
cob_gazebo_worlds github-ipa320-cob_simulation
copernicus_description github-botsync-copernicus
crane_x7_moveit_config github-rt-net-crane_x7_ros
create_description github-AutonomyLab-create_robot
dbw_fca_description bitbucket-DataspeedInc-dbw_fca_ros
dbw_mkz_description bitbucket-dataspeedinc-dbw_mkz_ros
dbw_polaris_description bitbucket-DataspeedInc-dbw_polaris_ros
denso_robot_moveit_config github-DENSORobot-denso_robot_ros
desistek_saga_description github-uuvsimulator-desistek_saga
dingo_description github-dingo-cpr-dingo
eca_a9_description github-uuvsimulator-eca_a9
ensenso_description github-ensenso-ros_driver
fake_joint_driver github-tork-a-fake_joint
fanuc_cr35ia_support github-ros-industrial-fanuc
fanuc_cr7ia_moveit_config github-ros-industrial-fanuc
fanuc_cr7ia_support github-ros-industrial-fanuc
fanuc_cr7ial_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200i_support github-ros-industrial-fanuc
fanuc_lrmate200ib3l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ib_support github-ros-industrial-fanuc
fanuc_lrmate200ic5h_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic5l_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_moveit_config github-ros-industrial-fanuc
fanuc_lrmate200ic_support github-ros-industrial-fanuc
fanuc_m10ia_moveit_config github-ros-industrial-fanuc
fanuc_m10ia_support github-ros-industrial-fanuc
fanuc_m16ib20_moveit_config github-ros-industrial-fanuc
fanuc_m16ib_support github-ros-industrial-fanuc
fanuc_m20ia10l_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_moveit_config github-ros-industrial-fanuc
fanuc_m20ia_support github-ros-industrial-fanuc
fanuc_m20ib25_moveit_config github-ros-industrial-fanuc
fanuc_m20ib_support github-ros-industrial-fanuc
fanuc_m430ia2f_moveit_config github-ros-industrial-fanuc
fanuc_m430ia2p_moveit_config github-ros-industrial-fanuc
fanuc_m430ia_support github-ros-industrial-fanuc
fanuc_m6ib6s_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_moveit_config github-ros-industrial-fanuc
fanuc_m6ib_support github-ros-industrial-fanuc
fanuc_m710ic_support github-ros-industrial-fanuc
fanuc_m900ia_support github-ros-industrial-fanuc
fanuc_m900ib_support github-ros-industrial-fanuc
fanuc_r1000ia80f_moveit_config github-ros-industrial-fanuc
fanuc_r1000ia_support github-ros-industrial-fanuc
fanuc_lrmate200id7l_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_moveit_config github-ros-industrial-fanuc_experimental
fanuc_lrmate200id_support github-ros-industrial-fanuc_experimental
fanuc_r2000ib_support github-ros-industrial-fanuc_experimental
fanuc_r2000ic_support github-ros-industrial-fanuc_experimental
fath_pivot_mount_description github-clearpathrobotics-fath_pivot_mount_description
fetch_gazebo github-fetchrobotics-fetch_gazebo
fetch_description github-fetchrobotics-fetch_ros
fetch_moveit_config github-fetchrobotics-fetch_ros
flir_ptu_description github-ros-drivers-flir_ptu
franka_description github-frankaemika-franka_ros
franka_visualization github-frankaemika-franka_ros
fsrobo_r_moveit_config github-FUJISOFT-Robotics-fsrobo_r
hector_components_description github-tu-darmstadt-ros-pkg-hector_models
hector_sensors_description github-tu-darmstadt-ros-pkg-hector_models
hector_xacro_tools github-tu-darmstadt-ros-pkg-hector_models
heifu_description gitlab-pdmfc-drones-ros1-heifu
heron_description github-heron-heron
heron_simulator github-heron-heron_simulator
human_description github-ros4hri-human_description
husky_description github-husky-husky
husky_cartographer_navigation github-husky-husky_cartographer_navigation
igvc_self_drive_description github-robustify-igvc_self_drive_sim
jackal_description github-jackal-jackal
jackal_navigation github-jackal-jackal
jackal_cartographer_navigation github-jackal-jackal_cartographer_navigation
jsk_data github-jsk-ros-pkg-jsk_common
khi_duaro_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs007l_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs007n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs013n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs020n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs025n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs030n_moveit_config github-Kawasaki-Robotics-khi_robot
khi_rs080n_moveit_config github-Kawasaki-Robotics-khi_robot
kobuki_description github-yujinrobot-kobuki
lauv_description github-uuvsimulator-lauv_gazebo
leo_description github-LeoRover-leo_common
leo_viz github-LeoRover-leo_desktop
leo_bringup github-LeoRover-leo_robot
leuze_description gitlab-cc-asp-fraunhofer-led-leuze_ros_drivers
robot github-ros-metapackages
tra1_description github-tork-a-minas
tra1_moveit_config github-tork-a-minas
mir_description github-DFKI-NI-mir_robot
moose_description github-moose-cpr-moose
moveit_setup_assistant github-ros-planning-moveit
moveit_resources_dual_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_fanuc_moveit_config github-ros-planning-moveit_resources
moveit_resources_panda_description github-ros-planning-moveit_resources
moveit_resources_panda_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_moveit_config github-ros-planning-moveit_resources
moveit_resources_prbt_pg70_support github-ros-planning-moveit_resources
moveit_resources_prbt_support github-ros-planning-moveit_resources
mrp2_slam github-milvusrobotics-mrp2_common
mrp2_navigation github-milvusrobotics-mrp2_common
open_manipulator_description github-ROBOTIS-GIT-open_manipulator
open_manipulator_p_description github-ROBOTIS-GIT-open_manipulator_p
open_manipulator_p_gazebo github-ROBOTIS-GIT-open_manipulator_p_simulations
open_manipulator_gazebo github-ROBOTIS-GIT-open_manipulator_simulations
open_manipulator_with_tb3_description github-ROBOTIS-GIT-open_manipulator_with_tb3
open_manipulator_with_tb3_waffle_moveit github-ROBOTIS-GIT-open_manipulator_with_tb3
open_manipulator_with_tb3_waffle_pi_moveit github-ROBOTIS-GIT-open_manipulator_with_tb3
open_manipulator_with_tb3_gazebo github-ROBOTIS-GIT-open_manipulator_with_tb3_simulations
openni_description github-ros-drivers-openni_camera
panda_moveit_config github-ros-planning-panda_moveit_config
pass_through_controllers github-UniversalRobots-Universal_Robots_ROS_passthrough_controllers
pf_description github-PepperlFuchs-pf_lidar_ros_driver
pheeno_ros_description github-acslaboratory-pheeno_ros_description
prbt_gazebo github-PilzDE-pilz_robots
prbt_moveit_config github-PilzDE-pilz_robots
prbt_support github-PilzDE-pilz_robots
pincher_arm_bringup github-fictionlab-pincher_arm
pincher_arm_moveit_config github-fictionlab-pincher_arm
play_motion github-pal-robotics-play_motion
pointgrey_camera_description github-ros-drivers-pointgrey_camera_driver
pouco2000_ros_gazebo github-PoussPouss-pouco2000
pr2_description github-pr2-pr2_common
pr2_gazebo github-PR2-pr2_simulator
prbt_pg70_support github-PilzDE-prbt_grippers
psen_scan_v2 github-PilzDE-psen_scan_v2
raspimouse_description github-rt-net-raspimouse_description
raspimouse_gazebo github-rt-net-raspimouse_sim
rc_visard_description github-roboception-rc_visard_ros
rexrov2_description github-uuvsimulator-rexrov2
ridgeback_description github-ridgeback-ridgeback
ridgeback_navigation github-ridgeback-ridgeback
ridgeback_cartographer_navigation github-ridgeback-ridgeback_cartographer_navigation
robot_upstart github-clearpathrobotics-robot_upstart
robotont_description github-robotont-robotont_description
robotont_nuc_description github-robotont-robotont_nuc_description
ackermann_steering_controller github-ros-controls-ros_controllers
diff_drive_controller github-ros-controls-ros_controllers
effort_controllers github-ros-controls-ros_controllers
gripper_action_controller github-ros-controls-ros_controllers
joint_trajectory_controller github-ros-controls-ros_controllers
cartesian_trajectory_controller github-UniversalRobots-Universal_Robots_ROS_controllers_cartesian
rotors_gazebo github-ethz-asl-rotors_simulator
schunk_description github-ipa320-schunk_modular_robotics
schunk_svh_driver github-SCHUNK-GmbH-Co-KG-schunk_svh_ros_driver
sciurus17_moveit_config github-rt-net-sciurus17_ros
seed_r7_description github-seed-solutions-seed_r7_ros_pkg
seed_r7_gazebo github-seed-solutions-seed_r7_ros_pkg
seed_r7_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typef_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typeg2_arm_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typeg_arm_moveit_config github-seed-solutions-seed_r7_ros_pkg
seed_r7_typeg_moveit_config github-seed-solutions-seed_r7_ros_pkg
sick_ldmrs_description github-SICKAG-sick_ldmrs_laser
sick_tim github-uos-sick_tim
sr_description github-shadow-robot-sr_common
sr_edc_launch github-shadow-robot-sr-ros-interface-ethercat
sr_moveit_hand_config github-shadow-robot-sr_interface
sr_multi_description github-shadow-robot-sr_interface
sr_box_ur10_moveit_config github-shadow-robot-sr_interface
sr_multi_moveit_config github-shadow-robot-sr_interface
sr_multi_moveit_test github-shadow-robot-sr_interface
staubli_rx160_moveit_config github-ros-industrial-staubli
staubli_rx160_support github-ros-industrial-staubli
staubli_tx2_60_support github-ros-industrial-staubli_experimental
staubli_tx2_90_support github-ros-industrial-staubli_experimental
staubli_tx60_support github-ros-industrial-staubli_experimental
staubli_tx90_support github-ros-industrial-staubli_experimental
talos_description github-pal-robotics-talos_robot
talos_description_calibration github-pal-robotics-talos_robot
talos_description_inertial github-pal-robotics-talos_robot
trac_ik_examples bitbucket-traclabs-trac_ik
turtlebot3_description github-ROBOTIS-GIT-turtlebot3
uwsim github-uji-ros-pkg-underwater_simulation
ur10_moveit_config github-ros-industrial-universal_robot
ur10e_moveit_config github-ros-industrial-universal_robot
ur16e_moveit_config github-ros-industrial-universal_robot
ur3_moveit_config github-ros-industrial-universal_robot
ur3e_moveit_config github-ros-industrial-universal_robot
ur5_moveit_config github-ros-industrial-universal_robot
ur5e_moveit_config github-ros-industrial-universal_robot
ur_description github-ros-industrial-universal_robot
uos_common_urdf github-uos-uos_tools
urdf_geometry_parser github-ros-controls-urdf_geometry_parser
urdf_sim_tutorial github-ros-urdf_sim_tutorial
urdf_test github-pal-robotics-urdf_test
urdf_tutorial github-ros-urdf_tutorial
urg_node github-ros-drivers-urg_node
uuv_thruster_manager github-uuvsimulator-uuv_simulator
uuv_descriptions github-uuvsimulator-uuv_simulator
uuv_gazebo_ros_plugins github-uuvsimulator-uuv_simulator
uuv_sensor_ros_plugins github-uuvsimulator-uuv_simulator
velodyne_description bitbucket-DataspeedInc-velodyne_simulator
warthog_description github-warthog-cpr-warthog
xpp_hyq github-leggedrobotics-xpp
xpp_quadrotor github-leggedrobotics-xpp

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged xacro at Robotics Stack Exchange