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

gz-physics: Implement a custom feature #1424

Closed
azeey-test opened this issue Aug 29, 2024 · 4 comments
Closed

gz-physics: Implement a custom feature #1424

azeey-test opened this issue Aug 29, 2024 · 4 comments

Comments

@azeey-test
Copy link
Collaborator

Configuration

  • os: Ubuntu Noble

Links

Process

Step 1 - Instructions work

Step 2 - Images (if there are any) match the result

@shameekganguly
Copy link

I'd like to test this one!

@Combuster54
Copy link

Folder structure of the plugins

image

dartsim folder doesn't have include folder, everything is inside src
image

Plugin and feature requirements

FindFreeGroupFeature doesn't have a link, is this correct?

image

Implement the custom feature

CustomFeatures.hh and cc has the same sintax as the tutorial.

is it a way to test it?

@Combuster54
Copy link

In order to follow the structure of the first photo. I change this line in CMakeLists.txt

target_include_directories(${features} SYSTEM INTERFACE ${DART_INCLUDE_DIRS})

to

target_include_directories(${features} SYSTEM INTERFACE
  ${DART_INCLUDE_DIRS}
  ${CMAKE_CURRENT_SOURCE_DIR}/include/gz/physics/dartsim
)

then I move all the headers into the correct folder
image

Finally, I need to change includes to follow the new path

example:

#include "CustomFeatures.hh"

to

#include "gz/physics/dartsim/CustomFeatures.hh"

results

combuster@combuster54:~/test/gz-physics/build$ cmake ..
-- gz-physics8 version 8.0.0~pre2
-- Operating system is Linux
-- Found CPack generators: DEB
-- 

-- ====== Finding Dependencies ======
-- Looking for gz-common6 -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Searching for dependencies of gz-utils3
-- Searching for <gz-utils3> component [log]
-- Looking for gz-utils3-log -- found version 3.0.0~pre3
-- Searching for dependencies of gz-utils3-log
-- Checking for module 'uuid'
--   Found uuid, version 2.39.3
-- Searching for <gz-common6> component [geospatial]
-- Looking for gz-common6-geospatial -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6-geospatial
-- Looking for gz-math8 -- found version 8.0.0~pre1
-- Searching for dependencies of gz-math8
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Looking for gz-common6 -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Searching for <gz-common6> component [graphics]
-- Looking for gz-common6-graphics -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6-graphics
-- Looking for gz-math8 -- found version 8.0.0~pre1
-- Searching for <gz-common6> component [graphics]
-- Searching for <gz-common6> component [profiler]
-- Looking for gz-common6-profiler -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6-profiler
-- Looking for gz-common6 - found

-- Looking for gz-common6 -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Searching for <gz-common6> component [testing]
-- Looking for gz-common6-testing -- found version 6.0.0~pre2
-- Searching for dependencies of gz-common6-testing
-- Looking for gz-common6 - found

-- Looking for gz-math8 -- found version 8.0.0~pre1
-- Searching for dependencies of gz-math8
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Searching for <gz-math8> component [eigen3]
-- Looking for gz-math8-eigen3 -- found version 8.0.0~pre1
-- Searching for dependencies of gz-math8-eigen3
-- Looking for gz-math8 - found

-- Looking for gz-plugin3 -- found version 3.0.0~pre1
-- Searching for dependencies of gz-plugin3
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Searching for dependencies of gz-utils3
-- Searching for <gz-utils3> component [cli]
-- Looking for gz-utils3-cli -- found version 3.0.0~pre3
-- Searching for dependencies of gz-utils3-cli
-- Searching for <gz-plugin3> component [all]
-- Looking for all libraries of gz-plugin3 -- found version 3.0.0~pre1
-- Looking for gz-plugin3 -- found version 3.0.0~pre1
-- Looking for gz-plugin3-loader -- found version 3.0.0~pre1
-- Searching for dependencies of gz-plugin3-loader
-- Looking for gz-plugin3-register -- found version 3.0.0~pre1
-- Searching for dependencies of gz-plugin3-register
-- Looking for gz-plugin3 - found

-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Looking for gz-utils3 - found

-- Looking for EIGEN3 - found

-- Looking for sdformat15 -- found version 15.0.0~pre2
-- Searching for dependencies of sdformat15
-- Checking for module 'tinyxml2'
--   Found tinyxml2, version 10.0.0
-- Looking for gz-math8 -- found version 8.0.0~pre1
-- Looking for gz-utils3 -- found version 3.0.0~pre3
-- Looking for sdformat15 - found

-- Could NOT find DART (missing: DART_DIR)
-- Looking for DART - not found

-- Looking for GzBullet - found

-- -------------------------------------------

CMake Warning at /usr/share/cmake/gz-cmake4/cmake4/GzConfigureBuild.cmake:59 (message):
   CONFIGURATION WARNINGS:
   -- Skipping component [dartsim]: Missing dependency [DART] (Components: collision-bullet, collision-ode, utils, utils-urdf).
      ^~~~~ Set SKIP_dartsim=true in cmake to suppress this warning.
   
Call Stack (most recent call first):
  CMakeLists.txt:107 (gz_configure_build)


-- 
-- Searching for host SSE information
-- SSE2 found
-- SSE3 found
-- SSE4.1 found
-- SSE4.2 found
-- Configuring library: gz-physics8
-- Adding 7 UNIT tests
CMake Warning at /usr/share/cmake/gz-cmake4/cmake4/GzBenchmark.cmake:69 (find_package):
  By not providing "Findbenchmark.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "benchmark", but CMake did not find one.

  Could not find a package configuration file provided by "benchmark" with
  any of the following names:

    benchmarkConfig.cmake
    benchmark-config.cmake

  Add the installation prefix of "benchmark" to CMAKE_PREFIX_PATH or set
  "benchmark_DIR" to a directory containing one of the above files.  If
  "benchmark" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  test/benchmark/CMakeLists.txt:7 (gz_add_benchmarks)


CMake Warning at /usr/share/cmake/gz-cmake4/cmake4/GzBenchmark.cmake:71 (message):
  Unable to find google benchmark (libbenchmark-dev).  Disabling benchmarks.
Call Stack (most recent call first):
  test/benchmark/CMakeLists.txt:7 (gz_add_benchmarks)


-- Checking for module 'bullet'
--   Found bullet, version 3.24
-- Adding 12 INTEGRATION tests
-- Adding 2 PERFORMANCE tests
-- No tests have been specified for REGRESSION
-- Configuring library: gz-physics8-sdf
-- Configuring library: gz-physics8-heightmap
-- Configuring library: gz-physics8-mesh
-- Skipping the component [dartsim] because the following packages are missing: DART
-- Configuring library: gz-physics8-tpelib
-- Adding 9 UNIT_tpelib tests
-- Configuring library: gz-physics8-tpe
-- Configuring library: gz-physics8-tpe-plugin
-- Adding 4 UNIT_tpe tests
-- Configuring library: gz-physics8-bullet
-- Configuring library: gz-physics8-bullet-plugin
-- Configuring library: gz-physics8-bullet-featherstone
-- Configuring library: gz-physics8-bullet-featherstone-plugin
-- The program [cppcheck] was not found! Skipping codecheck setup
-- Build configuration successful
-- Build type: RelWithDebInfo
-- Install prefix: /usr/local
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done (1.1s)
-- Generating done (0.1s)
-- Build files have been written to: /home/combuster/test/gz-physics/build
combuster@combuster54:~/test/gz-physics/build$ make
[  5%] Built target gz-physics8
[  6%] Built target gtest
[  7%] Built target gtest_main
[  8%] Built target UNIT_Cloneable_TEST
[  9%] Built target UNIT_CompositeData_TEST
[ 10%] Built target UNIT_FeatureList_TEST
[ 11%] Built target UNIT_Feature_TEST
[ 12%] Built target UNIT_FilterTuple_TEST
[ 14%] Built target UNIT_FindFeatures_TEST
[ 15%] Built target UNIT_SpecifyData_TEST
[ 16%] Built target COMMON_TEST_added_mass
[ 17%] Built target COMMON_TEST_addexternalforcetorque
[ 18%] Built target COMMON_TEST_basic_test
[ 19%] Built target COMMON_TEST_collisions
[ 20%] Built target COMMON_TEST_construct_empty_world
[ 21%] Built target COMMON_TEST_detachable_joint
[ 23%] Built target COMMON_TEST_free_joint_features
[ 25%] Built target COMMON_TEST_joint_features
[ 26%] Built target COMMON_TEST_joint_mimic_features
[ 27%] Built target COMMON_TEST_joint_transmitted_wrench_features
[ 28%] Built target COMMON_TEST_kinematic_features
[ 29%] Built target COMMON_TEST_link_features
[ 31%] Built target COMMON_TEST_shape_features
[ 32%] Built target COMMON_TEST_simulation_features
[ 33%] Built target COMMON_TEST_world_features
[ 34%] Built target MockEntities
[ 35%] Built target MockFrames
[ 36%] Built target MockJoints
[ 37%] Built target INTEGRATION_CanReadWrite
[ 41%] Built target FAKE_INSTALL
[ 42%] Built target INTEGRATION_ExamplesBuild_TEST
[ 43%] Built target INTEGRATION_FeatureSystem
[ 45%] Built target INTEGRATION_FrameSemantics2d
[ 46%] Built target INTEGRATION_FrameSemantics2f
[ 47%] Built target INTEGRATION_FrameSemantics3d
[ 48%] Built target INTEGRATION_FrameSemantics3f
[ 50%] Built target INTEGRATION_JointTypes2d
[ 51%] Built target INTEGRATION_JointTypes2f
[ 52%] Built target INTEGRATION_JointTypes3d
[ 54%] Built target INTEGRATION_JointTypes3f
[ 55%] Built target INTEGRATION_RequestFeatures
[ 56%] Built target PERFORMANCE_ExpectData
[ 58%] Built target PERFORMANCE_symbol_names
[ 65%] Built target gz-physics8-tpelib
[ 66%] Built target UNIT_tpelib_AABBTree_TEST
[ 68%] Built target UNIT_tpelib_CollisionDetector_TEST
[ 69%] Built target UNIT_tpelib_Collision_TEST
[ 70%] Built target UNIT_tpelib_Engine_TEST
[ 71%] Built target UNIT_tpelib_Link_TEST
[ 72%] Built target UNIT_tpelib_Model_TEST
[ 73%] Built target UNIT_tpelib_Shape_TEST
[ 76%] Built target UNIT_tpelib_Utils_TEST
[ 77%] Built target UNIT_tpelib_World_TEST
[ 83%] Built target gz-physics8-tpe-plugin
[ 84%] Built target UNIT_tpe_Base_TEST
[ 85%] Built target UNIT_tpe_EntityManagement_TEST
[ 86%] Built target UNIT_tpe_SDFFeatures_TEST
[ 87%] Built target UNIT_tpe_SimulationFeatures_TEST
[ 92%] Built target gz-physics8-bullet-plugin
[100%] Built target gz-physics8-bullet-featherstone-plugin

is it okay?

@iche033
Copy link

iche033 commented Sep 14, 2024

I think this tutorial is quite outdated. Created gazebosim/gz-physics#685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants