Skip to content

Removed deprecated code #217

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: rolling
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ string(REGEX REPLACE "[^/]+" ".." RELATIVE_PATH_LIBDIR_TO_PREFIX "${CMAKE_INSTAL
add_subdirectory(urdf_parser)

set(PKG_NAME ${PROJECT_NAME})
set(PKG_LIBRARIES urdfdom_sensor urdfdom_model_state urdfdom_model urdfdom_world)
set(PKG_LIBRARIES urdfdom_sensor urdfdom_model urdfdom_world)
set(PKG_DEPENDS urdfdom_headers)
set(PKG_EXPORTS urdfdom)
set(cmake_conf_file "cmake/urdfdom-config")
Expand All @@ -91,7 +91,7 @@ install(FILES package.xml DESTINATION share/${PROJECT_NAME})
# Make the package config file
set(PKG_DESC "Unified Robot Description Format")
set(PKG_DEPENDS "urdfdom_headers") # make the list separated by spaces instead of ;
set(PKG_URDF_LIBS "-lurdfdom_sensor -lurdfdom_model_state -lurdfdom_model -lurdfdom_world")
set(PKG_URDF_LIBS "-lurdfdom_sensor -lurdfdom_model -lurdfdom_world")
set(pkg_conf_file "cmake/pkgconfig/urdfdom.pc")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${pkg_conf_file}.in" "${CMAKE_BINARY_DIR}/${pkg_conf_file}" @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/${pkg_conf_file}
Expand Down
13 changes: 0 additions & 13 deletions urdf_parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,6 @@ add_urdfdom_library(
LINK
urdfdom_model)

add_urdfdom_library(
LIBNAME
urdfdom_model_state
SOURCES
src/urdf_model_state.cpp
src/twist.cpp)

add_library(urdf_parser INTERFACE)
target_include_directories(urdf_parser INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
Expand All @@ -86,10 +79,6 @@ add_executable(check_urdf src/check_urdf.cpp)
target_include_directories(check_urdf PUBLIC include)
target_link_libraries(check_urdf urdfdom_model urdfdom_world)

# Deprecated executable
add_executable(urdf_to_graphiz src/urdf_to_graphviz.cpp)
target_link_libraries(urdf_to_graphiz urdfdom_model)

add_executable(urdf_to_graphviz src/urdf_to_graphviz.cpp)
target_include_directories(urdf_to_graphviz PUBLIC include)
target_link_libraries(urdf_to_graphviz urdfdom_model)
Expand All @@ -108,7 +97,6 @@ endif()
INSTALL(
TARGETS
check_urdf
urdf_to_graphiz
urdf_to_graphviz
urdf_mem_test
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
Expand All @@ -120,7 +108,6 @@ INSTALL(
urdfdom_model
urdfdom_world
urdfdom_sensor
urdfdom_model_state
urdf_parser
EXPORT
urdfdom
Expand Down
23 changes: 0 additions & 23 deletions urdf_parser/include/urdf_parser/urdf_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#include <urdf_model/model.h>
#include <urdf_model/color.h>
#include <urdf_model/utils.h>
#include <urdf_model_state/model_state.h>
#include <urdf_sensor/sensor.h>
#include <urdf_world/types.h>

Expand Down Expand Up @@ -147,30 +146,8 @@ class URDFVersion final
}

namespace urdf{

URDFDOM_DLLAPI ModelInterfaceSharedPtr parseURDF(const std::string &xml_string);
URDFDOM_DLLAPI ModelInterfaceSharedPtr parseURDFFile(const std::string &path);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI tinyxml2::XMLDocument* exportURDF(ModelInterfaceSharedPtr &model);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI tinyxml2::XMLDocument* exportURDF(const ModelInterface &model);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI bool parsePose(Pose&, tinyxml2::XMLElement*);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI bool parseCamera(Camera&, tinyxml2::XMLElement*);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI bool parseRay(Ray&, tinyxml2::XMLElement*);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI bool parseSensor(Sensor&, tinyxml2::XMLElement*);

[[deprecated("File an issue at https://github.com/ros/urdfdom if you rely on this")]]
URDFDOM_DLLAPI bool parseModelState(ModelState&, tinyxml2::XMLElement*);
}

#endif
12 changes: 0 additions & 12 deletions urdf_parser/src/model.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,16 +303,4 @@ tinyxml2::XMLDocument* exportURDFInternal(const ModelInterface &model)

return doc;
}

tinyxml2::XMLDocument* exportURDF(const ModelInterface &model)
{
return exportURDFInternal(model);
}

tinyxml2::XMLDocument* exportURDF(ModelInterfaceSharedPtr &model)
{
return exportURDFInternal(*model);
}


}
5 changes: 0 additions & 5 deletions urdf_parser/src/pose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,6 @@ bool parsePoseInternal(Pose &pose, tinyxml2::XMLElement* xml)
return true;
}

bool parsePose(Pose &pose, tinyxml2::XMLElement* xml)
{
return parsePoseInternal(pose, xml);
}

bool exportPose(Pose &pose, tinyxml2::XMLElement* xml)
{
tinyxml2::XMLElement* origin = xml->GetDocument()->NewElement("origin");
Expand Down
152 changes: 0 additions & 152 deletions urdf_parser/src/urdf_model_state.cpp

This file was deleted.

47 changes: 1 addition & 46 deletions urdf_parser/src/urdf_sensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <urdf_parser/urdf_parser.h>

#include "./pose.hpp"
#include "./urdf_sensor.hpp"

namespace urdf{

Expand Down Expand Up @@ -173,11 +174,6 @@ bool parseCameraInternal(Camera &camera, tinyxml2::XMLElement* config)
return true;
}

bool parseCamera(Camera &camera, tinyxml2::XMLElement* config)
{
return parseCameraInternal(camera, config);
}

bool parseRayInternal(Ray &ray, tinyxml2::XMLElement* config)
{
ray.clear();
Expand Down Expand Up @@ -297,11 +293,6 @@ bool parseRayInternal(Ray &ray, tinyxml2::XMLElement* config)
return false;
}

bool parseRay(Ray &ray, tinyxml2::XMLElement* config)
{
return parseRayInternal(ray, config);
}

VisualSensorSharedPtr parseVisualSensor(tinyxml2::XMLElement *g)
{
VisualSensorSharedPtr visual_sensor;
Expand Down Expand Up @@ -331,40 +322,4 @@ VisualSensorSharedPtr parseVisualSensor(tinyxml2::XMLElement *g)
return visual_sensor;
}


bool parseSensor(Sensor &sensor, tinyxml2::XMLElement* config)
{
sensor.clear();

const char *name_char = config->Attribute("name");
if (!name_char)
{
CONSOLE_BRIDGE_logError("No name given for the sensor.");
return false;
}
sensor.name = std::string(name_char);

// parse parent_link_name
const char *parent_link_name_char = config->Attribute("parent_link_name");
if (!parent_link_name_char)
{
CONSOLE_BRIDGE_logError("No parent_link_name given for the sensor.");
return false;
}
sensor.parent_link_name = std::string(parent_link_name_char);

// parse origin
tinyxml2::XMLElement *o = config->FirstChildElement("origin");
if (o)
{
if (!parsePoseInternal(sensor.origin, o))
return false;
}

// parse sensor
sensor.sensor = parseVisualSensor(config);
return true;
}


}
Loading