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

update collada_urdf to use assimp_devel on hydro-devel #386

Merged
merged 2 commits into from
Apr 17, 2014
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
17 changes: 14 additions & 3 deletions jsk_ros_patch/collada_urdf_jsk_patch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,20 @@ find_package(catkin REQUIRED COMPONENTS collada_urdf)

catkin_package(CATKIN_DEPENDS collada_urdf)

execute_process(COMMAND make -C ${PROJECT_SOURCE_DIR})
execute_process(COMMAND cmake -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})
execute_process(COMMAND cmake -E copy ${PROJECT_SOURCE_DIR}/urdf_to_collada ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})

set(ENV{PKG_CONFIG_PATH} ${CATKIN_DEVEL_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH})
add_custom_target(urdf_to_collada ALL DEPENDS ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/urdf_to_collada)
add_custom_command(OUTPUT ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/urdf_to_collada
DEPENDS Makefile
COMMAND cmake -E chdir ${CMAKE_CURRENT_BINARY_DIR} make -f ${PROJECT_SOURCE_DIR}/Makefile PKG_CONFIG_PATH=${CATKIN_DEVEL_PREFIX}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH} PATCH_DIR=${PROJECT_SOURCE_DIR}
COMMAND cmake -E make_directory ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}
COMMAND cmake -E copy ${CMAKE_CURRENT_BINARY_DIR}/urdf_to_collada ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION})

add_dependencies(urdf_to_collada libassimp_devel)

install(PROGRAMS ${CATKIN_DEVEL_PREFIX}/${CATKIN_PACKAGE_BIN_DESTINATION}/urdf_to_collada
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})




Expand Down
36 changes: 9 additions & 27 deletions jsk_ros_patch/collada_urdf_jsk_patch/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,39 +3,21 @@
#
all: urdf_to_collada


ifneq ($(shell rosversion -d),fuerte)
#HG_REVISION = `rosversion collada_urdf`
## robot_model moved to github, 1.9.32 was last version in kforge
GIT_DIR = build/robot_model
GIT_URL = https://github.com/ros/robot_model.git
GIT_REVISION = groovy-devel
GIT_PATCH = set_url_name_groovy.patch cmake_catkin.patch
BUILD_BIN_DIR = `pwd`/$(GIT_DIR)/collada_urdf/build/devel/lib/collada_urdf
include $(shell rospack find mk)/git_checkout.mk
SRC_DIR = $(GIT_DIR)
else ## fuerte
GIT_DIR = build/robot_model
GIT_DIR = build/robot_model/src
GIT_URL = https://github.com/ros/robot_model.git
GIT_REVISION = robot_model-`rosversion robot_model`
GIT_PATCH = cyliner_box_sphere.patch set_url_name.patch cmake_rosbuild.patch collada-dom.patch downloads.patch
BUILD_BIN_DIR = `pwd`/$(GIT_DIR)/collada_urdf/bin
GIT_REVISION = hydro-devel
PATCH_DIR = $(CURDIR)
GIT_PATCH = ${PATCH_DIR}/set_url_name_groovy.patch ${PATCH_DIR}/use_assimp_devel.patch
BUILD_BIN_DIR = build/robot_model/devel/lib/collada_urdf
include $(shell rospack find mk)/git_checkout.mk
SRC_DIR = $(GIT_DIR)
endif

urdf_to_collada:$(SRC_DIR) patched
ifneq ($(shell rosversion -d),fuerte)
ROS_PACKAGE_PATH=`pwd`/$(SRC_DIR)/collada_urdf:$$ROS_PACKAGE_PATH make -C `pwd`/$(SRC_DIR)/collada_urdf
HG_ROS_PACKAGE_PATH=
else
ROS_PACKAGE_PATH=`pwd`/$(SRC_DIR)/collada_urdf:`pwd`/$(SRC_DIR)/colladadom:$$ROS_PACKAGE_PATH make -C `pwd`/$(SRC_DIR)/colladadom
ROS_PACKAGE_PATH=`pwd`/$(SRC_DIR)/collada_urdf:`pwd`/$(SRC_DIR)/colladadom:$$ROS_PACKAGE_PATH make -C `pwd`/$(SRC_DIR)/collada_urdf
endif
urdf_to_collada:$(GIT_DIR) patched
(cd build/robot_model; PKG_CONFIG_PATH=`rospack find assimp_devel`/lib/pkgconfig:${PKG_CONFIG_PATH} catkin_make --pkg collada_urdf --force-cmake)
cp $(BUILD_BIN_DIR)/urdf_to_collada .

clean:
if [ -f $(SRC_DIR)/collada_urdf ] ; then ROS_PACKAGE_PATH=`pwd`/$(SRC_DIR)/collada_urdf:$$ROS_PACKAGE_PATH make -C `pwd`/$(SRC_DIR)/collada_urdf clean; fi
if [ -f build/robot_model/build ] ; then catkin_make clean; fi
rm -fr build/robot_model/build
rm -rf installed patched
rm -f urdf_to_collada

Expand Down
2 changes: 2 additions & 0 deletions jsk_ros_patch/collada_urdf_jsk_patch/manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
<review status="unreviewed" notes=""/>
<url>http://ros.org/wiki/collada_urdf_jsk_patch</url>

<depend package="assimp_devel" />

<rosdep name="libgts" />
<rosdep name="collada_urdf"/>

Expand Down
13 changes: 13 additions & 0 deletions jsk_ros_patch/collada_urdf_jsk_patch/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,20 @@

<buildtool_depend>catkin</buildtool_depend>

<build_depend>angles</build_depend>
<build_depend>assimp_devel</build_depend>
<build_depend>resource_retriever</build_depend>
<build_depend>collada-dom</build_depend>
<build_depend>collada_parser</build_depend>
<build_depend>collada_urdf</build_depend>
<build_depend>roscpp</build_depend>
<build_depend>urdf</build_depend>
<build_depend>urdfdom</build_depend>
<build_depend>urdfdom_headers</build_depend>
<build_depend>geometric_shapes</build_depend>
<build_depend>tf</build_depend>
<build_depend>cmake_modules</build_depend>

<run_depend>collada_urdf</run_depend>
<!-- <test_depend>collada_urdf</test_depend> -->

Expand Down
69 changes: 69 additions & 0 deletions jsk_ros_patch/collada_urdf_jsk_patch/use_assimp_devel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
diff --git a/collada_urdf/CMakeLists.txt b/collada_urdf/CMakeLists.txt
index fc93e4c..9b44a6e 100644
--- a/collada_urdf/CMakeLists.txt
+++ b/collada_urdf/CMakeLists.txt
@@ -15,12 +15,13 @@ include_directories(include)
find_package(Boost REQUIRED COMPONENTS system filesystem program_options)
include_directories(${Boost_INCLUDE_DIR})

-find_package(assimp QUIET)
+set(ASSIMP_FOUND "")
+find_package(assimp_devel QUIET)
if ( NOT ASSIMP_FOUND )
- find_package(Assimp QUIET)
+ find_package(Assimp_Devel QUIET)
if ( NOT ASSIMP_FOUND )
find_package(PkgConfig REQUIRED)
- pkg_check_modules(ASSIMP assimp)
+ pkg_check_modules(ASSIMP assimp_devel)
endif()
endif()
if( ASSIMP_FOUND )
diff --git a/collada_urdf/src/collada_urdf.cpp b/collada_urdf/src/collada_urdf.cpp
index aae003d..c739252 100644
--- a/collada_urdf/src/collada_urdf.cpp
+++ b/collada_urdf/src/collada_urdf.cpp
@@ -63,13 +63,13 @@
#include <boost/scoped_ptr.hpp>

#if defined(ASSIMP_UNIFIED_HEADER_NAMES)
-#include <assimp/scene.h>
-#include <assimp/LogStream.hpp>
-#include <assimp/DefaultLogger.hpp>
-#include <assimp/IOStream.hpp>
-#include <assimp/IOSystem.hpp>
-#include <assimp/Importer.hpp>
-#include <assimp/postprocess.h>
+#include <scene.h>
+#include <LogStream.hpp>
+#include <DefaultLogger.hpp>
+#include <IOStream.hpp>
+#include <IOSystem.hpp>
+#include <Importer.hpp>
+#include <postprocess.h>
#else
#include <assimp.hpp>
#include <aiScene.h>
diff --git a/collada_urdf/src/collada_to_urdf.cpp b/collada_urdf/src/collada_to_urdf.cpp
index 3a4d6e6..c9040d5 100644
--- a/collada_urdf/src/collada_to_urdf.cpp
+++ b/collada_urdf/src/collada_to_urdf.cpp
@@ -6,12 +6,12 @@
#include <urdf_parser/urdf_parser.h>

#if defined(ASSIMP_UNIFIED_HEADER_NAMES)
-#include <assimp/IOSystem.hpp>
-#include <assimp/IOStream.hpp>
-#include <assimp/Importer.hpp>
-#include <assimp/Exporter.hpp>
-#include <assimp/postprocess.h>
-#include <assimp/scene.h>
+#include <IOSystem.hpp>
+#include <IOStream.hpp>
+#include <Importer.hpp>
+#include <Exporter.hpp>
+#include <postprocess.h>
+#include <scene.h>
#else
#include <assimp.hpp>
#if defined(ASSIMP_EXPORT_API)