@@ -71,9 +71,6 @@ target_compile_features(g1_loco_client_example PRIVATE cxx_std_20)
7171add_executable (g1_ankle_swing_example src/g1/lowlevel/g1_ankle_swing_example.cpp src/common/motor_crc_hg.cpp)
7272target_compile_features (g1_ankle_swing_example PRIVATE cxx_std_20)
7373
74- add_executable (g1_dual_arm_example src/g1/lowlevel/g1_dual_arm_example.cpp src/common/motor_crc_hg.cpp)
75- target_compile_features (g1_dual_arm_example PRIVATE cxx_std_20)
76-
7774add_executable (g1_audio_client_example src/g1/audio_client/g1_audio_client_example.cpp)
7875target_compile_features (g1_audio_client_example PRIVATE cxx_std_20)
7976
@@ -109,7 +106,7 @@ ament_target_dependencies(g1_dex3_example ${DEPENDENCY_LIST})
109106target_include_directories (g1_dex3_example PRIVATE ${EIGEN3_INCLUDE_DIR} )
110107ament_target_dependencies(g1_loco_client_example ${DEPENDENCY_LIST} )
111108ament_target_dependencies(g1_ankle_swing_example ${DEPENDENCY_LIST} )
112- ament_target_dependencies(g1_dual_arm_example ${DEPENDENCY_LIST} )
109+
113110ament_target_dependencies(g1_audio_client_example ${DEPENDENCY_LIST} )
114111
115112ament_target_dependencies(b2w_sport_client ${DEPENDENCY_LIST} )
@@ -118,6 +115,17 @@ ament_target_dependencies(b2w_stand_example ${DEPENDENCY_LIST})
118115ament_target_dependencies(b2_sport_client ${DEPENDENCY_LIST} )
119116ament_target_dependencies(b2_stand_example ${DEPENDENCY_LIST} )
120117
118+ find_package (yaml-cpp QUIET )
119+ if (yaml-cpp_FOUND)
120+ if (${yaml-cpp_VERSION} VERSION_GREATER_EQUAL "0.6" )
121+ message (STATUS "Found yaml-cpp version ${yaml-cpp_VERSION}" )
122+ add_executable (g1_dual_arm_example src/g1/lowlevel/g1_dual_arm_example.cpp src/common/motor_crc_hg.cpp)
123+ target_compile_features (g1_dual_arm_example PRIVATE cxx_std_20)
124+ ament_target_dependencies(g1_dual_arm_example yaml-cpp ${DEPENDENCY_LIST} )
125+ else ()
126+ message (STATUS "yaml-cpp version ${yaml-cpp_VERSION} is too old, skipping build of g1_dual_arm_example." )
127+ endif ()
128+ endif ()
121129
122130install (TARGETS
123131 low_level_ctrl
@@ -138,7 +146,13 @@ install(TARGETS g1_arm_action_example)
138146install (TARGETS g1_dex3_example)
139147install (TARGETS g1_loco_client_example)
140148install (TARGETS g1_ankle_swing_example)
141- install (TARGETS g1_dual_arm_example)
149+
150+ if (yaml-cpp_FOUND)
151+ if (${yaml-cpp_VERSION} VERSION_GREATER_EQUAL "0.6" )
152+ install (TARGETS g1_dual_arm_example)
153+ endif ()
154+ endif ()
155+
142156install (TARGETS g1_audio_client_example)
143157
144158
0 commit comments