From 3c0fe3c97d048464869074c90719997731333841 Mon Sep 17 00:00:00 2001 From: ZKBian Date: Tue, 15 Feb 2022 15:14:35 +0800 Subject: [PATCH] updated to SDK --- unitree_legged_msgs/msg/HighState.msg | 2 +- unitree_legged_real/CMakeLists.txt | 8 ++++---- unitree_legged_real/include/convert.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/unitree_legged_msgs/msg/HighState.msg b/unitree_legged_msgs/msg/HighState.msg index f2cf8e1..bec7813 100644 --- a/unitree_legged_msgs/msg/HighState.msg +++ b/unitree_legged_msgs/msg/HighState.msg @@ -14,7 +14,7 @@ float32[3] velocity # (unit: m/s), forwardSpeed, sideSpeed, rota float32 yawSpeed # (unit: rad/s), rotateSpeed in body frame Cartesian[4] footPosition2Body # foot position relative to body Cartesian[4] footSpeed2Body # foot speed relative to body -int8[20] temperature +#int8[20] temperature BmsState bms int16[4] footForce # Old version Aliengo is different int16[4] footForceEst # Old version Aliengo does not have diff --git a/unitree_legged_real/CMakeLists.txt b/unitree_legged_real/CMakeLists.txt index 64dd880..43dee3c 100755 --- a/unitree_legged_real/CMakeLists.txt +++ b/unitree_legged_real/CMakeLists.txt @@ -19,12 +19,12 @@ include_directories( set(CMAKE_CXX_FLAGS "-O3") -include_directories(/home/bian/Robot_SDK/unitree_legged_sdk/include) -link_directories(/home/bian/Robot_SDK/unitree_legged_sdk/lib) -string(CONCAT LEGGED_SDK_NAME libunitree_legged_sdk.so) +include_directories(/home/$ENV{USER}/Robot_SDK/unitree_legged_sdk/include) +link_directories(/home/$ENV{USER}/Robot_SDK/unitree_legged_sdk/lib) +string(CONCAT LEGGED_SDK_NAME libunitree_legged_sdk_amd64.so) set(EXTRA_LIBS ${LEGGED_SDK_NAME} lcm) -add_executable(lcm_server /home/bian/Robot_SDK/unitree_legged_sdk/examples/lcm_server.cpp) +add_executable(lcm_server /home/$ENV{USER}/Robot_SDK/unitree_legged_sdk/examples/lcm_server.cpp) target_link_libraries(lcm_server ${EXTRA_LIBS} ${catkin_LIBRARIES}) add_dependencies(lcm_server ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) diff --git a/unitree_legged_real/include/convert.h b/unitree_legged_real/include/convert.h index 9abd480..f51cce5 100755 --- a/unitree_legged_real/include/convert.h +++ b/unitree_legged_real/include/convert.h @@ -178,9 +178,9 @@ unitree_legged_msgs::HighState ToRos(UNITREE_LEGGED_SDK::HighState& lcm) ros.footForceEst[i] = lcm.footForceEst[i]; } - for(int i(0); i<20; ++i){ - ros.temperature[i] = lcm.temperature[i]; - } + // for(int i(0); i<20; ++i){ + // ros.temperature[i] = lcm.temperature[i]; + // } for(int i(0); i<40; ++i){ ros.wirelessRemote[i] = lcm.wirelessRemote[i];