Skip to content

Commit

Permalink
(collada_tools) update files for using jsk_common/assimp_devel (jsk-r…
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada committed Apr 17, 2014
1 parent 5310d11 commit b612d1b
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 11 deletions.
8 changes: 8 additions & 0 deletions collada_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ pkg_check_modules(COLLADADOM collada15dom)
include_directories(${COLLADADOM_INCLUDE_DIRS})
link_directories(${COLLADADOM_LIBRARY_DIRS})

rosbuild_find_ros_package(assimp_devel)
set(ENV{PKG_CONFIG_PATH} ${assimp_devel_PACKAGE_PATH}/lib/pkgconfig:$ENV{PKG_CONFIG_PATH})
pkg_check_modules(assimp assimp_devel REQUIRED)
include_directories(${assimp_INCLUDE_DIRS})
link_directories(${assimp_LIBRARY_DIRS})

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
Expand All @@ -46,3 +52,5 @@ rosbuild_add_link_flags(collada_to_graphviz -Wl,--no-as-needed )
rosbuild_add_executable(collada_to_urdf src/collada_to_urdf.cpp)
rosbuild_link_boost(collada_to_urdf filesystem program_options)
rosbuild_add_link_flags(collada_to_urdf -Wl,--no-as-needed )
target_link_libraries(collada_to_urdf ${assimp_LIBRARIES})

14 changes: 9 additions & 5 deletions collada_tools/catkin.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ cmake_minimum_required(VERSION 2.8.3)
project(collada_tools)

if($ENV{ROS_DISTRO} STREQUAL "groovy")
find_package(catkin REQUIRED COMPONENTS roscpp urdf_parser assimp_devel urdf collada_parser)
find_package(catkin REQUIRED COMPONENTS roscpp urdf_parser urdf collada_parser)
else()
find_package(catkin REQUIRED COMPONENTS roscpp urdf_parser_plugin assimp_devel urdf collada_parser)
find_package(catkin REQUIRED COMPONENTS roscpp urdf_parser_plugin urdf collada_parser)
endif()
find_package(Boost REQUIRED COMPONENTS filesystem program_options)

Expand All @@ -14,13 +14,17 @@ pkg_check_modules(COLLADADOM collada-dom-150)
include_directories(${COLLADADOM_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
link_directories(${COLLADADOM_LIBRARY_DIRS})

pkg_check_modules(assimp_devel assimp_devel REQUIRED)
include_directories(${assimp_devel_INCLUDE_DIRS})
link_directories(${assimp_devel_LIBRARY_DIRS})


# check_function_exists(mkstemps HAVE_MKSTEMPS)
# if( HAVE_MKSTEMPS )
# add_definitions("-DHAVE_MKSTEMPS")
# endif()

catkin_package(
CATKIN_DEPENDS assimp_devel
)

set(SOURCE_FILES
Expand All @@ -41,8 +45,8 @@ add_dependencies(collada_to_graphviz libassimp)

add_executable(collada_to_urdf src/collada_to_urdf.cpp)
set_target_properties(collada_to_urdf PROPERTIES LINK_FLAGS "-Wl,--no-as-needed")
target_link_libraries(collada_to_urdf ${catkin_LIBRARIES} ${Boost_LIBRARIES})
add_dependencies(collada_to_urdf libassimp)
target_link_libraries(collada_to_urdf ${catkin_LIBRARIES} ${Boost_LIBRARIES} ${assimp_devel_LIBRARIES})
add_dependencies(collada_to_urdf libassimp_devel)

install(TARGETS collada_to_urdf collada_to_graphviz collada_gazebo_gen
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
Expand Down
12 changes: 6 additions & 6 deletions collada_tools/src/collada_to_urdf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
#include "urdf_parser/urdf_parser.h"

// assimp 3 (assimp_devel)
#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>

#include <iostream>
#include <fstream>
Expand Down

0 comments on commit b612d1b

Please sign in to comment.