diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index 7c98e9d..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -cmake_minimum_required( VERSION 2.8 FATAL_ERROR ) -project(urdfdom_py) - -find_package(catkin REQUIRED) -catkin_package() - -catkin_python_setup() - -catkin_install_python(PROGRAMS - scripts/display_urdf - DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -) - -if (CATKIN_ENABLE_TESTING) - catkin_add_nosetests(test/test_urdf.py) -endif() diff --git a/README.md b/README.md index 4fd97ad..51a10da 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,9 @@ Not yet sure how to get it to generate catkin-like development installs, which u * Kelsey Hawkins - `urdf_parser_python` implementation, integration * Antonio El Khoury - bugfixes * Eric Cousineau - reflection (serialization?) changes +* Ioan Sucan +* Jackie Kay +* Víctor Mayoral Vilches - port to ROS 2 ## Reflection (or just Serialization?) diff --git a/package.xml b/package.xml index 358099d..5106940 100644 --- a/package.xml +++ b/package.xml @@ -1,5 +1,6 @@ - + + urdfdom_py 0.3.3 Python implementation of the URDF parser. @@ -13,6 +14,7 @@ Eric Cousineau Ioan Sucan Jackie Kay + Víctor Mayoral Vilches Chris Lalancette Shane Loretz @@ -21,13 +23,13 @@ https://github.com/ros/urdf_parser_py/issues https://github.com/ros/urdf_parser_py - catkin + ament_cmake - python - - python-lxml - python-yaml - - python-mock + python3-lxml + python3-yaml + python3-mock + + ament_python + diff --git a/setup.py b/setup.py index 2b1050e..333f1b8 100644 --- a/setup.py +++ b/setup.py @@ -1,11 +1,30 @@ -#!/usr/bin/env python +from setuptools import setup -from distutils.core import setup -from catkin_pkg.python_setup import generate_distutils_setup +package_name = 'urdfdom_py' -d = generate_distutils_setup( +setup( + name=package_name, + version='0.3.3', + package_dir={'': 'src'}, packages=['urdf_parser_py', 'urdf_parser_py.xml_reflection'], - package_dir={'': 'src'} + data_files=[ + ('scripts/display_urdf', + ['package.xml']), + ], + install_requires=['setuptools'], + zip_safe=True, + author='Victor Mayoral Vilches', + author_email='vmayoral@acutronicrobotics.com', + maintainer='Victor Mayoral Vilches', + maintainer_email='vmayoral@acutronicrobotics.com', + keywords=['ROS2'], + classifiers=[ + 'Intended Audience :: Developers', + 'License :: OSI Approved :: Apache Software License', + 'Programming Language :: Python', + 'Topic :: Software Development', + ], + description='Python implementation of the URDF parser.', + license='Apache License, Version 2.0', + tests_require=['pytest'], ) - -setup(**d) diff --git a/src/urdf_parser_py/xml_reflection/basics.py b/src/urdf_parser_py/xml_reflection/basics.py index f206088..ca2a608 100644 --- a/src/urdf_parser_py/xml_reflection/basics.py +++ b/src/urdf_parser_py/xml_reflection/basics.py @@ -10,9 +10,9 @@ def xml_string(rootXml, addHeader=True): # Meh - xmlString = etree.tostring(rootXml, pretty_print=True) + xmlString = etree.tostring(rootXml, pretty_print=True, encoding=str) if addHeader: - xmlString = '\n' + xmlString + xmlString = "\n" + xmlString return xmlString