add submodule unitree_legged_sdk

This commit is contained in:
Agnel Wang 2023-06-27 21:06:59 +08:00
parent 817d60c4d9
commit f352667991
4 changed files with 15 additions and 20 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "unitree_legged_sdk"]
path = unitree_legged_sdk
url = https://github.com/unitreerobotics/unitree_legged_sdk.git

View File

@ -1,12 +1,13 @@
cmake_minimum_required(VERSION 2.8.3) cmake_minimum_required(VERSION 2.8.3)
project(unitree_legged_real) project(unitree_legged_real)
add_compile_options(-std=c++11) set(CMAKE_CXX_FLAGS "-O3 -fPIC -std=c++11")
find_package(catkin REQUIRED COMPONENTS find_package(catkin REQUIRED COMPONENTS
roscpp roscpp
geometry_msgs geometry_msgs
unitree_legged_msgs unitree_legged_msgs
unitree_legged_sdk
) )
catkin_package() catkin_package()
@ -18,32 +19,21 @@ else()
set(ARCH arm64) set(ARCH arm64)
endif() endif()
link_directories(${CMAKE_SOURCE_DIR}/unitree_legged_sdk/lib/cpp/${ARCH}) set(EXTRA_LIBS -pthread ${unitree_legged_sdk_LIBRARIES})
set(EXTRA_LIBS -pthread libunitree_legged_sdk.so)
set(CMAKE_CXX_FLAGS "-O3 -fPIC")
include_directories( include_directories(
include include
${catkin_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/unitree_legged_sdk/include ${unitree_legged_sdk_INCLUDE_DIRS}
) )
add_executable(ros_example_walk src/exe/example_walk.cpp)
target_link_libraries(ros_example_walk ${EXTRA_LIBS} ${catkin_LIBRARIES})
add_dependencies(ros_example_walk ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(ros_example_position src/exe/example_position.cpp)
target_link_libraries(ros_example_position ${EXTRA_LIBS} ${catkin_LIBRARIES})
add_dependencies(ros_example_position ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(example_walk src/exe/example_walk.cpp)
target_link_libraries(example_walk ${EXTRA_LIBS} ${catkin_LIBRARIES})
add_dependencies(example_walk ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(example_position src/exe/example_position.cpp)
target_link_libraries(example_position ${EXTRA_LIBS} ${catkin_LIBRARIES})
add_dependencies(example_position ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
add_executable(state_sub src/exe/state_sub.cpp) add_executable(state_sub src/exe/state_sub.cpp)
target_link_libraries(state_sub ${EXTRA_LIBS} ${catkin_LIBRARIES}) target_link_libraries(state_sub ${EXTRA_LIBS} ${catkin_LIBRARIES})

View File

@ -15,6 +15,7 @@
<exec_depend>roscpp</exec_depend> <exec_depend>roscpp</exec_depend>
<exec_depend>std_msgs</exec_depend> <exec_depend>std_msgs</exec_depend>
<depend>unitree_legged_msgs</depend> <depend>unitree_legged_msgs</depend>
<depend>unitree_legged_sdk</depend>
<depend>eigen</depend> <depend>eigen</depend>
</package> </package>

1
unitree_legged_sdk Submodule

@ -0,0 +1 @@
Subproject commit b3f3f4236709722b3719b5da4bdf2449b277bf86