urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Name | Deps |
---|---|
srdfdom |
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Name | Deps |
---|---|
srdfdom |
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Name | Deps |
---|---|
srdfdom |
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Name | Deps |
---|---|
srdfdom |
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 0.4.6 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | melodic-devel |
Last Updated | 2021-10-04 |
Dev Status | MAINTAINED |
CI status |
|
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
0.4.6 (2021-10-04)
- Support name attribute for collisions (#67)
- Contributors: Nick Lamprianidis
0.4.5 (2020-12-04)
0.4.4 (2020-10-29)
- Replace deprecated function (#60)
- Contributors: Roel
0.4.3 (2020-04-01)
- Remove lxml dependency (#57)
- Use setuptools instead of distutils (#56)
- Bump CMake version to avoid CMP0048 (#55)
- update backward compatibility on visual and collisions (#47)
- Allow name attribute in visual tag (#31)
- Contributors: Kei Okada, Shane Loretz, gerkey
0.4.2 (2020-01-22)
- Add in support for the version tag. (#52)
- Contributors: Chris Lalancette
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Package Dependencies
System Dependencies
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.2.1 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | ros2 |
Last Updated | 2024-11-11 |
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
Additional Links
Maintainers
- Chris Lalancette
Authors
- Antonio El Khoury
- David Lu
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
- Kelsey Hawkins
- Shane Loretz
- Thomas Moulard
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.2.1 (2023-05-01)
- Switch to unittest.mock (#78)
- Add BSD LICENSE file (#77)
- Update Maintainers (#76)
- Contributors: Audrow Nash, Scott K Logan, Silvio Traversaro
1.2.0 (2022-03-30)
- Fix the binary install location. (#74)
- Get Iterable from collections.abc. (#73)
- Contributors: Chris Lalancette
1.1.0 (2021-03-15)
- Use a Python entry point for 'display_urdf' (#64)
- Move the 'display_urdf' script into the Python module (#64)
- Make 'file' argument to display_urdf required (#64)
- Make sure to add the version when creating a new URDF. (#62)
- Remove the from_parameter_server method from urdf.py for ROS 2. (#63)
- Silence pytest warnings when running locally. (#61)
- Contributors: Chris Lalancette, Scott K Logan
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Name | Deps |
---|---|
srdfdom |
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 1.0.0 |
License | BSD |
Build type | AMENT_PYTHON |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | foxy-devel |
Last Updated | 2020-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
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
1.0.0 (2020-03-10)
- Add in support for the version tag. (#52) (#54)
- ROS 2 Port (reopened) (#53)
- Contributors: Chris Lalancette, Henning Kayser
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 0.3.3 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2017-07-26 |
Dev Status | MAINTAINED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Not yet sure how to get it to generate catkin-like development installs, which uses __init__.py
to point to the development source directory.
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection (serialization?) changes
Reflection (or just Serialization?)
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate type, for preserving the order of aggregate types (i.e., the URDF robot model, and for the future, SDF models, links with multiple visuals / collisions, etc). This allows for basic checks to see if “scalar” elements are defined multiple times. (We were affected by this at one point with a pose defined twice with different values, screwing up the loading / saving of a model with this API).
- Dumping to YAML, used for printing to string.
- Doesn’t preserve ordering because of it, but someone posted an issue about this on pyyaml’s issue tracker, and I think a few solutions were posted (including one from the author)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Develop a Python SDF API in a
sdf
module.- Maybe make the package itself be
robot_model_py
so that the respective modules would berobot_model_py.urdf_parser
androbot_model_py.sdf_parser
? - Parse Gazebo’s SDF definition files at some point? For speed’s sake, parse it and have it generate code to use?
- Maybe make the package itself be
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together and (I think) adds some “noise” from OpenDE for positions.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 0.3.3 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2017-07-26 |
Dev Status | MAINTAINED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Not yet sure how to get it to generate catkin-like development installs, which uses __init__.py
to point to the development source directory.
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection (serialization?) changes
Reflection (or just Serialization?)
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate type, for preserving the order of aggregate types (i.e., the URDF robot model, and for the future, SDF models, links with multiple visuals / collisions, etc). This allows for basic checks to see if “scalar” elements are defined multiple times. (We were affected by this at one point with a pose defined twice with different values, screwing up the loading / saving of a model with this API).
- Dumping to YAML, used for printing to string.
- Doesn’t preserve ordering because of it, but someone posted an issue about this on pyyaml’s issue tracker, and I think a few solutions were posted (including one from the author)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Develop a Python SDF API in a
sdf
module.- Maybe make the package itself be
robot_model_py
so that the respective modules would berobot_model_py.urdf_parser
androbot_model_py.sdf_parser
? - Parse Gazebo’s SDF definition files at some point? For speed’s sake, parse it and have it generate code to use?
- Maybe make the package itself be
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together and (I think) adds some “noise” from OpenDE for positions.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 0.3.3 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2017-07-26 |
Dev Status | MAINTAINED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Not yet sure how to get it to generate catkin-like development installs, which uses __init__.py
to point to the development source directory.
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection (serialization?) changes
Reflection (or just Serialization?)
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate type, for preserving the order of aggregate types (i.e., the URDF robot model, and for the future, SDF models, links with multiple visuals / collisions, etc). This allows for basic checks to see if “scalar” elements are defined multiple times. (We were affected by this at one point with a pose defined twice with different values, screwing up the loading / saving of a model with this API).
- Dumping to YAML, used for printing to string.
- Doesn’t preserve ordering because of it, but someone posted an issue about this on pyyaml’s issue tracker, and I think a few solutions were posted (including one from the author)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Develop a Python SDF API in a
sdf
module.- Maybe make the package itself be
robot_model_py
so that the respective modules would berobot_model_py.urdf_parser
androbot_model_py.sdf_parser
? - Parse Gazebo’s SDF definition files at some point? For speed’s sake, parse it and have it generate code to use?
- Maybe make the package itself be
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together and (I think) adds some “noise” from OpenDE for positions.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Dependant Packages
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 0.3.3 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | indigo-devel |
Last Updated | 2017-07-26 |
Dev Status | MAINTAINED |
CI status | Continuous Integration |
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Not yet sure how to get it to generate catkin-like development installs, which uses __init__.py
to point to the development source directory.
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection (serialization?) changes
Reflection (or just Serialization?)
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate type, for preserving the order of aggregate types (i.e., the URDF robot model, and for the future, SDF models, links with multiple visuals / collisions, etc). This allows for basic checks to see if “scalar” elements are defined multiple times. (We were affected by this at one point with a pose defined twice with different values, screwing up the loading / saving of a model with this API).
- Dumping to YAML, used for printing to string.
- Doesn’t preserve ordering because of it, but someone posted an issue about this on pyyaml’s issue tracker, and I think a few solutions were posted (including one from the author)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Develop a Python SDF API in a
sdf
module.- Maybe make the package itself be
robot_model_py
so that the respective modules would berobot_model_py.urdf_parser
androbot_model_py.sdf_parser
? - Parse Gazebo’s SDF definition files at some point? For speed’s sake, parse it and have it generate code to use?
- Maybe make the package itself be
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together and (I think) adds some “noise” from OpenDE for positions.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.
Wiki Tutorials
Launch files
Messages
Services
Plugins
Recent questions tagged urdfdom_py at Robotics Stack Exchange
urdfdom_py package from urdfdom_py repourdfdom_py |
|
Package Summary
Tags | No category tags. |
Version | 0.4.6 |
License | BSD |
Build type | CATKIN |
Use | RECOMMENDED |
Repository Summary
Checkout URI | https://github.com/ros/urdf_parser_py.git |
VCS Type | git |
VCS Version | melodic-devel |
Last Updated | 2021-10-04 |
Dev Status | MAINTAINED |
CI status |
|
Released | RELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Package Description
Additional Links
Maintainers
- Chris Lalancette
- Shane Loretz
Authors
- Thomas Moulard
- David Lu
- Kelsey Hawkins
- Antonio El Khoury
- Eric Cousineau
- Ioan Sucan
- Jackie Kay
urdf_parser_py
Development Setup
You must manually run setup.py
. For catkin development, you can install to $ws/../build/lib/pythonX.Y/dist-packages via
devel_prefix=$(cd $(catkin_find --first-only)/.. && pwd)
cd ../urdf_parser_py
python setup.py install --install-layout deb --prefix $devel_prefix
Authors
- Thomas Moulard -
urdfpy
implementation, integration - David Lu -
urdf_python
implementation, integration - Kelsey Hawkins -
urdf_parser_python
implementation, integration - Antonio El Khoury - bugfixes
- Eric Cousineau - reflection update
Reflection
This an attempt to generalize the structure of the URDF via reflection to make it easier to extend. This concept is taken from Gazebo’s SDF structure, and was done with SDF in mind to a) make an SDF parser and b) make a simple converter between URDF and SDF.
Changes
- Features:
- Transmission and basic Gazebo nodes.
- General aggregate types, preserving order
- Dumping to YAML, used for printing to string (dictionaries do not preserve attribute ordering)
- XML Parsing: minidom has been swapped out with lxml.etree, but it should not be hard to change that back. Maybe Sax could be used for event-driven parsing.
- API:
- Loading methods rely primarily on instance methods rather than static methods, mirroring Gazebo’s SDF construct-then-load method
- Renamed static
parse_xml()
tofrom_xml()
, and renamedload_*
methods tofrom_*
if they are static
Todo
- Support additional formats (SDF, drakeURDF, etc.)
- Make a direct, two-way URDF <-> SDF converter.
- Gazebo has the ability to load URDFs and save SDFs, but it lumps everything together
- Consider a cleaner implementation for reflection.
- Make the names a little clearer, especially the fact that
from_xml
andto_xml
write to a node, but do not create a new one. - Abstraction layer is not clear. Should explicitly use abstract classes, and try to really clarify the dispatch order (
xmlr.Element
,xmlr.Param
,xmlr.Object
, etc.)
- Make the names a little clearer, especially the fact that
- Figure out good policy for handling default methods. If saving to XML, write out default values, or leave them out for brevity (and to leave it open for change)? Might be best to add that as an option.
- Find a lightweight package that can handle the reflection aspect more elegantly. Enthought traits? IPython’s spinoff of traits?
Changelog for package urdfdom_py
0.4.6 (2021-10-04)
- Support name attribute for collisions (#67)
- Contributors: Nick Lamprianidis
0.4.5 (2020-12-04)
0.4.4 (2020-10-29)
- Replace deprecated function (#60)
- Contributors: Roel
0.4.3 (2020-04-01)
- Remove lxml dependency (#57)
- Use setuptools instead of distutils (#56)
- Bump CMake version to avoid CMP0048 (#55)
- update backward compatibility on visual and collisions (#47)
- Allow name attribute in visual tag (#31)
- Contributors: Kei Okada, Shane Loretz, gerkey
0.4.2 (2020-01-22)
- Add in support for the version tag. (#52)
- Contributors: Chris Lalancette
0.4.1 (2019-10-22)
- Python 3 fixes (#38 #43 #48)
- Remove old example test (#37)
- Contributors: Chris Lalancette, Eric Cousineau, Markus Grimm, Timon Engelke
0.4.0 (2018-02-21)
- Add Link.visual and Link.collision properties (#28)
- Add tests for mutli-visual and multi-collision
- links and collisions load properly as aggregates
- Add XPath information when a parse error is encountered
- Remove travis support. (#22)
- Reformat python code to pep8 standard (#21)
- Update core.py to allow passing addHeader arg to to_xml_string function (#19)
- fixed defaults for xyz/rpy, fixed set_default for Param, added unit tests (#16)
- Make unit test run with [catkin_make run_tests]{.title-ref} (#15)
- Contributors: Chris Lalancette, Chris Paxton, Eric Cousineau, Shane Loretz, Will Baker, eugene-katsevman
0.3.3 (2017-02-10)
- Made Chris and Shane the maintainers
- Added python-lxml to the travis build.
- Reverted line break (ros/urdfdom#77) now that there is a more generic solution. (#5)
- Added line break to make errors easier to read. (#4)
- Contributors: Chris Lalancette, Isaac I.Y. Saito
0.3.1 (2016-02-22)
- Add travis
- Add package.xml for ROS release
- Tweak CMakeLists to reflect migration from urdfdom
- Contributors: Jackie Kay
0.3.0 (2016-02-16)
- [urdf_parser_py] Add missing newline
- color and texture in link material are optional
- fixed transmission parser to match specification
http://wiki.ros.org/urdf/XML/Transmission#A.3Ctransmission.3E_Elements
proper unittest for urdf_parser_py
- added transmission parsing tests
- Merge pull request #59 from goretkin/goretkin-optional-calibration joint calibration is optional
- made hardware interface optional in both transmission actuator and joint
- joint calibration is optional according to http://wiki.ros.org/urdf/XML/joint
- set limit(upper/lower), safety_controller(soft_upper/lower_limit, k_position) is optional
- urdf_parser_py.xml_reflection : python 3 compatibility Substitute 'Exception, e' with [Exception as e]{.title-ref}. This ensure compatibility with Python 3 and Python 2.6,2.7 . Check https://docs.python.org/3/howto/pyporting.html#capturing-the-currently-raised-exception for more info.
- urdf_parser_py: Confirmed that both new transmissions are parseable in the same robot. test: Added in specific test for tranmsissions. Have it print the type. \@todo: Make this a unittest.
- urdf_parser_py: Added attribute preservation for xmlr.RawType (i.e., <gazebo reference="..."/>)
- urdf_parser_py: Parsing new transmission format works. Need to add in test for old PR2 transmission types. test/calvin: Added in generated Calvin URDF provided by v4hn test/romeo: Reformatted to match Calvin test
- urdf_parser_py.urdf: Adding duck-typed parsing for ros_control and PR2 transmissions.
- [urdf_parser_py] Python3 compatibility
- Contributors: Antonio El Khoury, Doug Sievers, Eric Cousineau, Gustavo Goretkin, Ioan A Sucan, Ioan Sucan, Jackie Kay, Kei Okada, Kelsey Hawkins, Séverin Lemaignan, Tamaki Nishino, Thomas Moulard, VahidAminZ, Vincent Rabaud, eacousineau, isucan
0.2.9 (2013-09-10)
- add xml_reflection to the install rule
- use install-layout deb
- install urdf_python_py with plain cmake
- xml_reflection: Moved into urdf_parser_py
- urdf_parser_py, xml_reflection: Removed catkin build stuff
- urdf_parser_py, xml_reflection: Remove runtime dependencies on rospy, roslib. Will remove catkin from setup.py, along with CMakeLists.txt files
- README.md: Moving into urdf_parser_py
- urdf/Transmission: Uncommented line. Need to figure out how to make transmission types more flexible (for usage with ros_control)
- urdf: Commented out transmissions -- need to address more generalized plugins (see ros_control packages)
- urdf: Made sure that geometry children constraint does not count comments Removed .pyc files Conflicts: .gitignore
- Added in some compatibility methods / accessors for calibration stack
- CMakeLists.txt: Reflected path change {examples => scripts}/display_urdf package.xml's: Removed python export path (does not apply)
- test: Reorganized. TODO Make actual unit test?
- xml_reflection: Refactoring into catkin package. Trying to figure out how to manage source setup.sh for development...
- urdf: Changed ordering of tags to match that of romeo.urdf test: Added in romeo test (fuerte branch)
- Corrected wrong import for xml_reflection.basics module
- Added in test for pelican_urdf
- xml_reflection: Made separate package, moved out of urdf_parser_py
- urdf.Transmission: Needed to add tag
- urdf.Transmission: Small bufix for type
- urdf: Changed Mesh.scale attribute to not be required (thanks to Carlos De La Guardia)
- Refactored variable names to match PEP 8 - http://www.python.org/dev/peps/pep-0008/#introduction
- Finished refactoring. Instance methods: to_xml => write_xml, load_xml => read_xml. Class methods: from_{xml,string}
- Renamed to_xml to dump_xml, but that is inconsistent with pyyaml. Will rename to {read,write}_xml for clarity.
- Fixed bug in Robot.add_joint() (thanks to Carlos De La Guardia). Fixed some SDF stuff
- Starting to develop SDF stuff
- Touched up some namespace stuff a little, fixed example script.
- Updated API, added back in static from_xml and generalized it. Updated example file.
- Going to separate out xml and python variables
- Starting to do some baic refactoring
- Have Gazebo stuff working a little better. Yaml dumps work as well
- Added in Gazebo tags, but it looks ugly... Need to just extra all children and insert those normally
- Did that refactoring stuff
- Refactoring loading design
- Realizing that maybe I should make a factory-type object for aggregate types
- Changing to accomadate aggregate types
- Added in check_valid() for warnings / assertions
- Things are updated now. Might run slower, but meh
- Can at least run urdf.py
- Things coming together code wise, but have not yet tested. Need to
- Have basic reflection setup, continuing on
- Modifying reflection setup
- There's a problem if an element is supposed to be unique and there's multiple instances of it, it will be overwritten by later occurences. In what seems to be the policy of the urdfdom parser, it uses the first instance, whereas this implementation uses the last instance.
- Tried to add in Gazebo stuff
- Trying a few more complicated things
- Seems to be working now
- More reworking
- Trying out a couple of methods
- Doing some more rework
- Adding transition, but want to set value easily... Going to try etree
- Messing around with the yaml stuff
- Bugfixed color stuff
- Update version to 0.3.0
- Add setup.py, remove comments
- Catkinize package
- Fix inertia matrix constructor.
- ixy was set to iyy by mistake.
- Reported by Joseph Salini.
-
Do not strip trailing zeros in float display. * Stripping trailing zeros causes the removal of exponents if value is expressed in scientific notation (e.g. 1.2e-10 -> 1.2e-1).
-
Fix float display while writing xml document. * The older method caused a loss of float precision when writing urdf file.
- Added verbose flag to parsing methods. If false, the parser will not throw warnings if it encounters unknown elements.
- Changed Joint names to strings (was causing a bug), added get_root which detects the link which is top in the tree (URDF's should guarantee a unique root/tree structure), and added an option to get_chain which allows one to not include fixed joints in the chain.
- Load link inertial origin when parsing URDF.
- Do not display XML output in display_urdf.
- Add tree structure pretty printing.
- Allow the user to choose from which parameter the model is loaded.
- Enhance naming following Kelsey Hawkins's suggestions.
- make load/parse methods static
- rename load into load_xml_file, parse into parse_xml_string
- rename loadFromParameterServer into load_from_paremeter_server
- Ignore compiled Python files.
- Support model loading from the parameter server. Make test generic.
- Update manifest.xml to use epydoc.
- Update manifest.xml.
- Replace urdf_python by urdf_parser_py everywhere.
- Remove unwanted packages.