Skip to content

Commit 164c26b

Browse files
rubengrandiafarbod-farshidian
authored andcommitted
Merged in feature/ocs2_anymal_perception (pull request #690)
Feature/ocs2 anymal perception Approved-by: Farbod Farshidian
2 parents 8b64496 + 3c68c05 commit 164c26b

File tree

300 files changed

+38655
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

300 files changed

+38655
-1
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jenkins-pipeline merge-ours

jenkins-pipeline

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ ciPipeline("--ros-distro noetic --publish-doxygen --recipes onnxruntime raisimli
33
--dependencies '[email protected]:leggedrobotics/hpp-fcl.git;master;git'\
44
'[email protected]:leggedrobotics/pinocchio.git;master;git'\
55
'[email protected]:leggedrobotics/ocs2_robotic_assets.git;main;git'\
6+
'[email protected]:leggedrobotics/elevation_mapping_cupy.git;main;git'\
7+
'[email protected]:ANYbotics/grid_map.git;master;git'\
68
--ignore ocs2_doc")
79

810
node {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cmake_minimum_required(VERSION 3.0)
2+
project(ocs2_anymal)
3+
find_package(catkin REQUIRED)
4+
catkin_metapackage()
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?xml version="1.0"?>
2+
<package format="2">
3+
<name>ocs2_anymal</name>
4+
<version>0.0.0</version>
5+
<description>The ocs2_anymal metapackage</description>
6+
7+
<maintainer email="[email protected]">Farbod Farshidian</maintainer>
8+
<maintainer email="[email protected]">Jan Carius</maintainer>
9+
<maintainer email="[email protected]">Ruben Grandia</maintainer>
10+
11+
<license>TODO</license>
12+
13+
<buildtool_depend>catkin</buildtool_depend>
14+
15+
<exec_depend>ocs2_anymal_mpc</exec_depend>
16+
<exec_depend>ocs2_anymal_loopshaping_mpc</exec_depend>
17+
18+
<export>
19+
<metapackage />
20+
</export>
21+
22+
</package>
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
cmake_minimum_required(VERSION 3.0)
2+
project(ocs2_anymal_commands)
3+
4+
find_package(catkin REQUIRED COMPONENTS
5+
roslib
6+
ocs2_ros_interfaces
7+
ocs2_robotic_tools
8+
ocs2_switched_model_interface
9+
grid_map_filters_rsl
10+
)
11+
12+
## Eigen3
13+
find_package(Eigen3 3.3 REQUIRED NO_MODULE)
14+
15+
find_package(Boost REQUIRED COMPONENTS
16+
filesystem
17+
)
18+
19+
# Generate compile_commands.json for clang tools
20+
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
21+
22+
###################################
23+
## catkin specific configuration ##
24+
###################################
25+
catkin_package(
26+
INCLUDE_DIRS
27+
include
28+
${EIGEN3_INCLUDE_DIRS}
29+
LIBRARIES
30+
${PROJECT_NAME}
31+
CATKIN_DEPENDS
32+
ocs2_ros_interfaces
33+
ocs2_robotic_tools
34+
ocs2_switched_model_interface
35+
DEPENDS
36+
Boost
37+
)
38+
39+
###########
40+
## Build ##
41+
###########
42+
43+
include_directories(
44+
include
45+
${EIGEN3_INCLUDE_DIRS}
46+
${catkin_INCLUDE_DIRS}
47+
)
48+
49+
# Declare a C++ library
50+
add_library(${PROJECT_NAME}
51+
src/LoadMotions.cpp
52+
src/ModeSequenceKeyboard.cpp
53+
src/MotionCommandController.cpp
54+
src/MotionCommandDummy.cpp
55+
src/MotionCommandInterface.cpp
56+
src/PoseCommandToCostDesiredRos.cpp
57+
src/ReferenceExtrapolation.cpp
58+
src/TerrainAdaptation.cpp
59+
)
60+
add_dependencies(${PROJECT_NAME}
61+
${${PROJECT_NAME}_EXPORTED_TARGETS}
62+
${catkin_EXPORTED_TARGETS}
63+
)
64+
target_link_libraries(${PROJECT_NAME}
65+
${catkin_LIBRARIES}
66+
)
67+
target_compile_options(${PROJECT_NAME} PUBLIC ${OCS2_CXX_FLAGS})
68+
69+
# Declare a C++ Executable
70+
add_executable(target_command_node
71+
src/AnymalPoseCommandNode.cpp
72+
)
73+
add_dependencies(target_command_node
74+
${${PROJECT_NAME}_EXPORTED_TARGETS}
75+
${catkin_EXPORTED_TARGETS}
76+
)
77+
target_link_libraries(target_command_node
78+
${PROJECT_NAME}
79+
${catkin_LIBRARIES}
80+
)
81+
target_compile_options(target_command_node PRIVATE ${OCS2_CXX_FLAGS})
82+
83+
add_executable(gait_command_node
84+
src/AnymalGaitNode.cpp
85+
)
86+
add_dependencies(gait_command_node
87+
${${PROJECT_NAME}_EXPORTED_TARGETS}
88+
${catkin_EXPORTED_TARGETS}
89+
)
90+
target_link_libraries(gait_command_node
91+
${PROJECT_NAME}
92+
${catkin_LIBRARIES}
93+
)
94+
target_compile_options(gait_command_node PRIVATE ${OCS2_CXX_FLAGS})
95+
96+
add_executable(motion_command_node
97+
src/AnymalMotionCommandNode.cpp
98+
)
99+
add_dependencies(motion_command_node
100+
${${PROJECT_NAME}_EXPORTED_TARGETS}
101+
${catkin_EXPORTED_TARGETS}
102+
)
103+
target_link_libraries(motion_command_node
104+
${PROJECT_NAME}
105+
${catkin_LIBRARIES}
106+
)
107+
target_compile_options(motion_command_node PRIVATE ${OCS2_CXX_FLAGS})
108+
109+
#############
110+
## Install ##
111+
#############
112+
113+
install(DIRECTORY include/${PROJECT_NAME}/
114+
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
115+
)
116+
install(TARGETS ${PROJECT_NAME}
117+
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
118+
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
119+
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
120+
)
121+
install(TARGETS target_command_node gait_command_node motion_command_node
122+
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
123+
)
124+
install(DIRECTORY config
125+
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
126+
)
127+
128+
#############
129+
## Testing ##
130+
#############
131+
132+
catkin_add_gtest(test_${PROJECT_NAME}
133+
test/testLoadMotions.cpp
134+
test/testReferenceExtrapolation.cpp
135+
test/testTerrainAdaptation.cpp
136+
)
137+
target_link_libraries(test_${PROJECT_NAME}
138+
${PROJECT_NAME}
139+
-lstdc++fs
140+
gtest_main
141+
)

0 commit comments

Comments
 (0)