This repository has been archived by the owner on Aug 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
urdf: switch from TinyXML to TinyXML2 #205
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ find_package(catkin REQUIRED COMPONENTS | |
urdf_parser_plugin pluginlib rosconsole_bridge roscpp cmake_modules) | ||
|
||
|
||
find_package(TinyXML REQUIRED) | ||
find_package(TinyXML2 REQUIRED) | ||
|
||
# Find version components | ||
if(NOT urdfdom_headers_VERSION) | ||
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. I think TinyXML2 would have to be added to the DEPENDS list. |
||
) | ||
|
@@ -37,13 +37,13 @@ include_directories( | |
${catkin_INCLUDE_DIRS} | ||
${urdfdom_INCLUDE_DIRS} | ||
${urdfdom_headers_INCLUDE_DIRS} | ||
${TinyXML_INCLUDE_DIRS} | ||
${TinyXML2_INCLUDE_DIRS} | ||
) | ||
|
||
link_directories(${Boost_LIBRARY_DIRS} ${catkin_LIBRARY_DIRS}) | ||
|
||
add_library(${PROJECT_NAME} src/model.cpp src/rosconsole_bridge.cpp) | ||
target_link_libraries(${PROJECT_NAME} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) | ||
target_link_libraries(${PROJECT_NAME} ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${urdfdom_LIBRARIES}) | ||
|
||
if(APPLE) | ||
set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,7 @@ | |
#include <map> | ||
#include <urdf_model/model.h> | ||
#include <urdf/urdfdom_compatibility.h> | ||
#include <tinyxml.h> | ||
#include <tinyxml2.h> | ||
#include <boost/shared_ptr.hpp> | ||
#include <boost/weak_ptr.hpp> | ||
#include <ros/ros.h> | ||
|
@@ -51,10 +51,10 @@ namespace urdf{ | |
class Model: public ModelInterface | ||
{ | ||
public: | ||
/// \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 commentThe 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 commentThe 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. |
||
/// \brief Load Model given a filename | ||
bool initFile(const std::string& filename); | ||
/// \brief Load Model given the name of a parameter on the parameter server | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.