Skip to content

Commit

Permalink
4 ➡️ 5
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina committed Jun 24, 2021
2 parents 2bab469 + c6cdea6 commit edcb1c8
Show file tree
Hide file tree
Showing 54 changed files with 3,141 additions and 6,852 deletions.
19 changes: 14 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ project(ignition-physics5 VERSION 5.0.0)
#============================================================================
# Find ignition-cmake
#============================================================================
find_package(ignition-cmake2 2.1.0 REQUIRED)
find_package(ignition-cmake2 2.8.0 REQUIRED)

#============================================================================
# Configure the project
#============================================================================
ign_configure_project()
ign_configure_project(VERSION_SUFFIX pre1)


#============================================================================
Expand All @@ -37,7 +37,7 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
# Find ignition-common
ign_find_package(ignition-common4
COMPONENTS graphics profiler
REQUIRED_BY mesh dartsim tpe tpelib)
REQUIRED_BY mesh dartsim tpe tpelib bullet)
set(IGN_COMMON_VER ${ignition-common4_VERSION_MAJOR})

#--------------------------------------
Expand All @@ -62,7 +62,7 @@ ign_find_package(EIGEN3 REQUIRED)
#--------------------------------------
# Find SDFormat for the SDF features
ign_find_package(sdformat12
REQUIRED_BY sdf dartsim tpe)
REQUIRED_BY sdf dartsim tpe bullet)

#--------------------------------------
# Find dartsim for the dartsim plugin wrapper
Expand All @@ -78,6 +78,13 @@ ign_find_package(DART
PKGCONFIG dart
PKGCONFIG_VER_COMPARISON >=)

#--------------------------------------
# Find bullet for the bullet plugin wrapper
ign_find_package(IgnBullet
VERSION 2.87
REQUIRED_BY bullet
PKGCONFIG bullet
PKGCONFIG_VER_COMPARISON >=)

message(STATUS "-------------------------------------------\n")

Expand All @@ -92,7 +99,7 @@ set(IGNITION_PHYSICS_ENGINE_INSTALL_DIR
# Configure the build
#============================================================================
ign_configure_build(QUIT_IF_BUILD_ERRORS
COMPONENTS sdf mesh dartsim tpe)
COMPONENTS sdf mesh dartsim tpe bullet)


#============================================================================
Expand All @@ -115,3 +122,5 @@ ign_create_docs(
"${IGNITION-PLUGIN_DOXYGEN_TAGFILE} = ${IGNITION-PLUGIN_API_URL}"
"${IGNITION-MATH_DOXYGEN_TAGFILE} = ${IGNITION-MATH_API_URL}"
)

file(COPY ${CMAKE_SOURCE_DIR}/tutorials/img/ DESTINATION ${CMAKE_BINARY_DIR}/doxygen/html/img/)
23 changes: 23 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,15 @@

### Ignition Physics 4.x.x (20XX-XX-XX)

### Ignition Physics 4.1.0 (2021-05-01)

1. [TPE] Update link pose and velocity
* [Pull request #179](https://github.com/ignitionrobotics/ign-physics/pull/179)

1. Infrastructure
* [Pull request #221](https://github.com/ignitionrobotics/ign-physics/pull/221)
* [Pull request #215](https://github.com/ignitionrobotics/ign-physics/pull/215)

### Ignition Physics 4.0.0 (2021-03-30)

1. Remove nested models
Expand Down Expand Up @@ -85,6 +94,20 @@

### Ignition Physics 3.x.x (20XX-XX-XX)

### Ignition Physics 3.3.0 (2021-06-18)

1. Fix DART deprecation warning
* [Pull request #263](https://github.com/ignitionrobotics/ign-physics/pull/263)

1. Integrate Bullet engine
* [Pull request #208](https://github.com/ignitionrobotics/ign-physics/pull/208)

1. Remove `tools/code_check` and update codecov
* [Pull request #257](https://github.com/ignitionrobotics/ign-physics/pull/257)

1. [Citadel] Update tutorials
* [Pull request #204](https://github.com/ignitionrobotics/ign-physics/pull/204)

### Ignition Physics 3.2.0 (2021-04-28)

1. Infrastructure
Expand Down
74 changes: 74 additions & 0 deletions bullet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# This component expresses custom features of the bullet plugin, which can
# expose native bullet data types.
ign_add_component(bullet INTERFACE
DEPENDS_ON_COMPONENTS sdf mesh
GET_TARGET_NAME features)

link_directories(${BULLET_LIBRARY_DIRS})
target_link_libraries(${features} INTERFACE IgnBullet::IgnBullet)

ign_get_libsources_and_unittests(sources test_sources)

# TODO(MXG): Think about an ign_add_plugin(~) macro for ign-cmake
set(engine_name bullet-plugin)
ign_add_component(${engine_name}
SOURCES ${sources}
DEPENDS_ON_COMPONENTS bullet
GET_TARGET_NAME bullet_plugin)

target_link_libraries(${bullet_plugin}
PUBLIC
${features}
${PROJECT_LIBRARY_TARGET_NAME}-sdf
${PROJECT_LIBRARY_TARGET_NAME}-mesh
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
ignition-math${IGN_MATH_VER}::eigen3)

# Note that plugins are currently being installed in 2 places: /lib and the engine-plugins dir
install(TARGETS ${bullet_plugin} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR})

# The library created by `ign_add_component` includes the ign-physics version
# (i.e. libignition-physics1-name-plugin.so), but for portability,
# we also install an unversioned symlink into the same versioned folder.
set(versioned ${CMAKE_SHARED_LIBRARY_PREFIX}${bullet_plugin}${CMAKE_SHARED_LIBRARY_SUFFIX})
set(unversioned ${CMAKE_SHARED_LIBRARY_PREFIX}${PROJECT_NAME_NO_VERSION_LOWER}-${engine_name}${CMAKE_SHARED_LIBRARY_SUFFIX})
if (WIN32)
# disable MSVC inherit via dominance warning
target_compile_options(${dartsim_plugin} PUBLIC "/wd4250")
INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E copy
${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${versioned}
${IGNITION_PHYSICS_ENGINE_INSTALL_DIR}\/${unversioned})")
else()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR})
endif()
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E create_symlink ${versioned} ${unversioned})
INSTALL(FILES ${PROJECT_BINARY_DIR}/${unversioned} DESTINATION ${IGNITION_PHYSICS_ENGINE_INSTALL_DIR})

# Testing
ign_build_tests(
TYPE UNIT_bullet
SOURCES ${test_sources}
LIB_DEPS
${features}
ignition-plugin${IGN_PLUGIN_VER}::loader
ignition-common${IGN_COMMON_VER}::ignition-common${IGN_COMMON_VER}
${PROJECT_LIBRARY_TARGET_NAME}-sdf
${PROJECT_LIBRARY_TARGET_NAME}-mesh
TEST_LIST tests)

foreach(test ${tests})

target_compile_definitions(${test} PRIVATE
"bullet_plugin_LIB=\"$<TARGET_FILE:${bullet_plugin}>\""
"TEST_WORLD_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}/worlds/\""
"IGNITION_PHYSICS_RESOURCE_DIR=\"${IGNITION_PHYSICS_RESOURCE_DIR}\"")

endforeach()

if(TARGET UNIT_FindFeatures_TEST)

target_compile_definitions(UNIT_FindFeatures_TEST PRIVATE
"bullet_plugin_LIB=\"$<TARGET_FILE:${bullet_plugin}>\"")

endif()
Loading

0 comments on commit edcb1c8

Please sign in to comment.