Skip to content
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

cleanup urdfdom compatibility #27

Merged
merged 2 commits into from
Jan 30, 2017
Merged
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
16 changes: 2 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include_directories(SYSTEM ${Boost_INCLUDE_DIR})
find_package(console_bridge REQUIRED)
find_package(urdfdom_headers REQUIRED)

find_package(catkin REQUIRED COMPONENTS cmake_modules urdfdom_py)
find_package(catkin REQUIRED COMPONENTS cmake_modules urdf urdfdom_py)

find_package(TinyXML REQUIRED)

Expand All @@ -16,22 +16,11 @@ link_directories(${catkin_LIBRARY_DIRS})

add_compile_options(-std=c++11)

### Maintain compatibility to old urdfdom_headers (version < 4.0)
if( "0.4.0" VERSION_GREATER "${urdfdom_headers_VERSION}")
set(HAVE_URDFDOM_4 0)
else()
set(HAVE_URDFDOM_4 1)
endif()
set(generated_compat_header "${CATKIN_DEVEL_PREFIX}/include/${PROJECT_NAME}/urdfdom_compatibility.h")
include_directories("${CATKIN_DEVEL_PREFIX}/include")
configure_file(urdfdom_compatibility.h.in "${generated_compat_header}" @ONLY)


catkin_python_setup()

catkin_package(
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include ${TinyXML_INCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include
INCLUDE_DIRS include ${TinyXML_INCLUDE_DIRS}
DEPENDS console_bridge urdfdom_headers urdfdom_py
)

Expand All @@ -49,7 +38,6 @@ install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h"
)
install(FILES ${generated_compat_header} DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})

install(PROGRAMS
scripts/display_srdf
Expand Down
3 changes: 1 addition & 2 deletions include/srdfdom/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@
#include <string>
#include <vector>
#include <utility>
#include <urdf_model/model.h>
#include <srdfdom/urdfdom_compatibility.h>
#include <urdf/model.h> // TODO: replace with urdf_model/types.h in Lunar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// TODO: replace with urdf_model/types.h in Lunar

Does this still hold?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried replacing it on a Ubuntu Zesty system and got an error:

/root/ros/ws_catkin/src/srdfdom/include/srdfdom/model.h:66:28: error: 'ModelInterface' in namespace 'urdf' does not name a type

Which I have not looked into

#include <boost/shared_ptr.hpp>
#include <tinyxml.h>

Expand Down
1 change: 1 addition & 0 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
<build_depend>boost</build_depend>
<build_depend>cmake_modules</build_depend>
<build_depend>libconsole-bridge-dev</build_depend>
<build_depend>urdf</build_depend>
<build_depend>liburdfdom-headers-dev</build_depend>
<build_depend>urdfdom_py</build_depend>
<build_depend>tinyxml</build_depend>
Expand Down
78 changes: 0 additions & 78 deletions urdfdom_compatibility.h.in

This file was deleted.