-
Notifications
You must be signed in to change notification settings - Fork 104
Conversation
The library TinyXML is considered to be unmaintained and since all future development is focused on TinyXML2 this patch updates urdf to use TinyXML2. Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
tinyxml 1 is horribly obsolete and was always a pain to package for distribution maintainers, so I fully agree that we should finally move to tinyxml2 in ROS. CI failed to find the tinyxml2 package in this request. Is there a serious problem with using the old tinyxml in kinetic? |
I believe the build failed because tinyxml2 was not added as a dependency in the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request. The switch to TinyXML2 will have to wait until ROS M because the APIs use TinyXML objects.
I intend to move urdf and urdf_parser_plugin to a new repo. Once I move it and create a ROS M branch, would you be willing to open a pull request there?
/// \brief Load Model from TiXMLElement | ||
bool initXml(TiXmlElement *xml); | ||
/// \brief Load Model from TiXMLDocument | ||
bool initXml(TiXmlDocument *xml); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these constructors in kinetic would break API/ABI compatibility. This change would have to wait until the next Ros release (ROS M).
/// \brief Load Model from XMLElement | ||
bool initXml(tinyxml2::XMLElement *xml); | ||
/// \brief Load Model from XMLDocument | ||
bool initXml(tinyxml2::XMLDocument *xml); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can retarget this pull request to ROS M, I'd be in favor of tinyxml2 not being visible in the APIs at all.
@@ -25,7 +25,7 @@ add_compile_options(-std=c++11) | |||
|
|||
catkin_package( | |||
LIBRARIES ${PROJECT_NAME} | |||
INCLUDE_DIRS include ${TinyXML_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include | |||
INCLUDE_DIRS include ${TinyXML2_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include | |||
CATKIN_DEPENDS rosconsole_bridge roscpp | |||
DEPENDS urdfdom_headers urdfdom Boost |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think TinyXML2 would have to be added to the DEPENDS list.
@@ -25,7 +25,7 @@ add_compile_options(-std=c++11) | |||
|
|||
catkin_package( | |||
LIBRARIES ${PROJECT_NAME} | |||
INCLUDE_DIRS include ${TinyXML_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include | |||
INCLUDE_DIRS include ${TinyXML2_INLCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would rather we change the APIs to not expose TinyXML2 so its headers don't need to be exported.
@sloretz Yes, I can resubmit the PR to a new repo. And I agree it's not wise to expose TinyXML in public API especially if the TinyXML values get converted to strings anyway. Are these methods needed at all by the way? Since there's already Model::initString() existing. If the methods can be dropped there's no need to depend on TinyXML(2). |
such lower level API were probably meant to enable users to parse URDF extensions. But maybe they shall be supported only in urdf_parser.h
By the way, the API
is quite poor since it won't work on on Windows if the filename contains non-ascii chars.
And let the user pass a std::ifstream, boost::filesystem::ifstream, std::stringstream or wathever stream fits her need.
would be redundant then (but could be maintained), |
@rojkov The urdf packages have been moved to their own repo as part of #195. Would you mind moving this to https://github.com/ros/urdf? |
Resubmitted as ros/urdf#4 |
The library TinyXML is considered to be unmaintained and
since all future development is focused on TinyXML2 this
patch updates urdf to use TinyXML2.
depends on ros/urdfdom#99