Skip to content

Commit

Permalink
Remove tinyxml dependency from kdl_parser. (#43)
Browse files Browse the repository at this point in the history
It was deprecated in Foxy, and we can now remove it for Galactic.

Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
  • Loading branch information
clalancette authored Sep 2, 2020
1 parent 77d8ab5 commit 5ece2a0
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 47 deletions.
3 changes: 0 additions & 3 deletions kdl_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ project(kdl_parser)

find_package(ament_cmake_ros REQUIRED)
find_package(orocos_kdl REQUIRED)
find_package(tinyxml_vendor REQUIRED)
find_package(TinyXML REQUIRED)
find_package(urdf REQUIRED)
find_package(urdfdom_headers REQUIRED)

Expand All @@ -23,7 +21,6 @@ target_include_directories(${PROJECT_NAME}
"$<INSTALL_INTERFACE:include>"
)
ament_target_dependencies(${PROJECT_NAME}
TinyXML
orocos_kdl
urdf
urdfdom_headers)
Expand Down
18 changes: 0 additions & 18 deletions kdl_parser/include/kdl_parser/kdl_parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#define KDL_PARSER__KDL_PARSER_HPP_

#include <string>
#include <tinyxml.h> // NOLINT

#include "kdl/tree.hpp"
#include "urdf_model/model.h"
Expand All @@ -56,14 +55,6 @@ namespace kdl_parser
KDL_PARSER_PUBLIC
bool treeFromFile(const std::string & file, KDL::Tree & tree);

/** Constructs a KDL tree from the parameter server, given the parameter name
* \param param the name of the parameter on the parameter server
* \param tree The resulting KDL Tree
* returns true on success, false on failure
*/
KDL_PARSER_PUBLIC
bool treeFromParam(const std::string & param, KDL::Tree & tree);

/** Constructs a KDL tree from a string containing xml
* \param xml A string containting the xml description of the robot
* \param tree The resulting KDL Tree
Expand All @@ -72,15 +63,6 @@ bool treeFromParam(const std::string & param, KDL::Tree & tree);
KDL_PARSER_PUBLIC
bool treeFromString(const std::string & xml, KDL::Tree & tree);

/** Constructs a KDL tree from a TiXmlDocument
* \param xml_doc The TiXmlDocument containting the xml description of the robot
* \param tree The resulting KDL Tree
* returns true on success, false on failure
*/
[[deprecated("Use treeFromString instead")]]
KDL_PARSER_PUBLIC
bool treeFromXml(TiXmlDocument * xml_doc, KDL::Tree & tree);

/** Constructs a KDL tree from a URDF robot model
* \param robot_model The URDF robot model
* \param tree The resulting KDL Tree
Expand Down
4 changes: 0 additions & 4 deletions kdl_parser/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,9 @@

<depend version_gte="1.3.0">orocos_kdl</depend>

<build_depend>tinyxml</build_depend>
<build_depend>tinyxml_vendor</build_depend>
<build_depend>urdf</build_depend>
<build_depend>urdfdom_headers</build_depend>

<exec_depend>tinyxml</exec_depend>
<exec_depend>tinyxml_vendor</exec_depend>
<exec_depend>urdf</exec_depend>

<test_depend>ament_lint_auto</test_depend>
Expand Down
22 changes: 0 additions & 22 deletions kdl_parser/src/kdl_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,6 @@ bool treeFromFile(const std::string & file, KDL::Tree & tree)
return treeFromString(buffer.str(), tree);
}

bool treeFromParam(const std::string & param, KDL::Tree & tree)
{
fprintf(stderr, "treeFromParam currently not implemented.\n");
return false;
/*
urdf::Model robot_model;
if (!robot_model.initParam(param)){
ROS_ERROR("Could not generate robot model");
return false;
}
return treeFromUrdfModel(robot_model, tree);
*/
}

bool treeFromString(const std::string & xml, KDL::Tree & tree)
{
urdf::Model robot_model;
Expand All @@ -191,14 +177,6 @@ bool treeFromString(const std::string & xml, KDL::Tree & tree)
return treeFromUrdfModel(robot_model, tree);
}

bool treeFromXml(TiXmlDocument * xml_doc, KDL::Tree & tree)
{
std::stringstream ss;
ss << *xml_doc;
return treeFromString(ss.str(), tree);
}


bool treeFromUrdfModel(const urdf::ModelInterface & robot_model, KDL::Tree & tree)
{
if (!robot_model.getRoot()) {
Expand Down

0 comments on commit 5ece2a0

Please sign in to comment.