Skip to content

Commit

Permalink
Merged in feature/ocs2_anymal_perception (pull request #690)
Browse files Browse the repository at this point in the history
Feature/ocs2 anymal perception

Approved-by: Farbod Farshidian
  • Loading branch information
rubengrandia authored and farbod-farshidian committed Oct 2, 2023
2 parents 8b64496 + 3c68c05 commit 164c26b
Show file tree
Hide file tree
Showing 300 changed files with 38,655 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
jenkins-pipeline merge-ours
2 changes: 2 additions & 0 deletions jenkins-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ ciPipeline("--ros-distro noetic --publish-doxygen --recipes onnxruntime raisimli
--dependencies 'git@github.com:leggedrobotics/hpp-fcl.git;master;git'\
'git@github.com:leggedrobotics/pinocchio.git;master;git'\
'git@github.com:leggedrobotics/ocs2_robotic_assets.git;main;git'\
'git@github.com:leggedrobotics/elevation_mapping_cupy.git;main;git'\
'git@github.com:ANYbotics/grid_map.git;master;git'\
--ignore ocs2_doc")

node {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cmake_minimum_required(VERSION 3.0)
project(ocs2_anymal)
find_package(catkin REQUIRED)
catkin_metapackage()
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0"?>
<package format="2">
<name>ocs2_anymal</name>
<version>0.0.0</version>
<description>The ocs2_anymal metapackage</description>

<maintainer email="farbod.farshidian@gmail.com">Farbod Farshidian</maintainer>
<maintainer email="jcarius@ethz.ch">Jan Carius</maintainer>
<maintainer email="rgrandia@ethz.ch">Ruben Grandia</maintainer>

<license>TODO</license>

<buildtool_depend>catkin</buildtool_depend>

<exec_depend>ocs2_anymal_mpc</exec_depend>
<exec_depend>ocs2_anymal_loopshaping_mpc</exec_depend>

<export>
<metapackage />
</export>

</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
cmake_minimum_required(VERSION 3.0)
project(ocs2_anymal_commands)

find_package(catkin REQUIRED COMPONENTS
roslib
ocs2_ros_interfaces
ocs2_robotic_tools
ocs2_switched_model_interface
grid_map_filters_rsl
)

## Eigen3
find_package(Eigen3 3.3 REQUIRED NO_MODULE)

find_package(Boost REQUIRED COMPONENTS
filesystem
)

# Generate compile_commands.json for clang tools
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

###################################
## catkin specific configuration ##
###################################
catkin_package(
INCLUDE_DIRS
include
${EIGEN3_INCLUDE_DIRS}
LIBRARIES
${PROJECT_NAME}
CATKIN_DEPENDS
ocs2_ros_interfaces
ocs2_robotic_tools
ocs2_switched_model_interface
DEPENDS
Boost
)

###########
## Build ##
###########

include_directories(
include
${EIGEN3_INCLUDE_DIRS}
${catkin_INCLUDE_DIRS}
)

# Declare a C++ library
add_library(${PROJECT_NAME}
src/LoadMotions.cpp
src/ModeSequenceKeyboard.cpp
src/MotionCommandController.cpp
src/MotionCommandDummy.cpp
src/MotionCommandInterface.cpp
src/PoseCommandToCostDesiredRos.cpp
src/ReferenceExtrapolation.cpp
src/TerrainAdaptation.cpp
)
add_dependencies(${PROJECT_NAME}
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(${PROJECT_NAME}
${catkin_LIBRARIES}
)
target_compile_options(${PROJECT_NAME} PUBLIC ${OCS2_CXX_FLAGS})

# Declare a C++ Executable
add_executable(target_command_node
src/AnymalPoseCommandNode.cpp
)
add_dependencies(target_command_node
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(target_command_node
${PROJECT_NAME}
${catkin_LIBRARIES}
)
target_compile_options(target_command_node PRIVATE ${OCS2_CXX_FLAGS})

add_executable(gait_command_node
src/AnymalGaitNode.cpp
)
add_dependencies(gait_command_node
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(gait_command_node
${PROJECT_NAME}
${catkin_LIBRARIES}
)
target_compile_options(gait_command_node PRIVATE ${OCS2_CXX_FLAGS})

add_executable(motion_command_node
src/AnymalMotionCommandNode.cpp
)
add_dependencies(motion_command_node
${${PROJECT_NAME}_EXPORTED_TARGETS}
${catkin_EXPORTED_TARGETS}
)
target_link_libraries(motion_command_node
${PROJECT_NAME}
${catkin_LIBRARIES}
)
target_compile_options(motion_command_node PRIVATE ${OCS2_CXX_FLAGS})

#############
## Install ##
#############

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)
install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(TARGETS target_command_node gait_command_node motion_command_node
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
install(DIRECTORY config
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
)

#############
## Testing ##
#############

catkin_add_gtest(test_${PROJECT_NAME}
test/testLoadMotions.cpp
test/testReferenceExtrapolation.cpp
test/testTerrainAdaptation.cpp
)
target_link_libraries(test_${PROJECT_NAME}
${PROJECT_NAME}
-lstdc++fs
gtest_main
)
Loading

0 comments on commit 164c26b

Please sign in to comment.