Skip to content

Commit

Permalink
updated to SDK
Browse files Browse the repository at this point in the history
  • Loading branch information
ZKBian committed Feb 15, 2022
1 parent e305ed1 commit 3c0fe3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion unitree_legged_msgs/msg/HighState.msg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions unitree_legged_real/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})

Expand Down
6 changes: 3 additions & 3 deletions unitree_legged_real/include/convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 3c0fe3c

Please sign in to comment.