modification for sdk v3.5.1
This commit is contained in:
parent
c54489e721
commit
ad91c9fdda
|
@ -1,4 +1,4 @@
|
|||
Packages Version: v3.8.0
|
||||
Packages Version: v3.5.1
|
||||
|
||||
# Introduction
|
||||
This package can send control command to real robot from ROS. You can do low-level control(namely control all joints on robot) and high-level control(namely control the walking direction and speed of robot).
|
||||
|
@ -15,11 +15,10 @@ The interface between ROS and real robot: `unitree_legged_real`
|
|||
We recommand users to run this package in Ubuntu 18.04 and ROS melodic environment
|
||||
|
||||
## Dependencies
|
||||
* [unitree_legged_sdk](https://github.com/unitreerobotics/unitree_legged_sdk/releases)
|
||||
* [unitree_legged_sdk](https://github.com/unitreerobotics/unitree_legged_sdk/releases/tag/v3.5.1)
|
||||
### Notice
|
||||
The newest release [v3.8.0](https://github.com/unitreerobotics/unitree_legged_sdk/releases/tag/3.8.0) only supports for robot: Go1.
|
||||
|
||||
Check release [v3.3.4](https://github.com/unitreerobotics/unitree_legged_sdk/releases/tag/3.3.4) for A1 support.
|
||||
The release [v3.5.1](https://github.com/unitreerobotics/unitree_legged_sdk/releases/tag/v3.5.1) only supports for robot: Go1.
|
||||
There is a typo on line 189 at "\unitree_legged_sdk-3.5.1\include\unitree_legged_sdk\comm.h". Change "postion" to "position" will work.
|
||||
|
||||
# Configuration
|
||||
Before compiling this package, please download the corresponding unitree_legged_sdk as noted above, and put it to your own workspace's source folder(e.g. `~/catkin_ws/src`). Be careful with the sdk folder name. It should be "unitree_legged_sdk" without version tag.
|
||||
|
|
|
@ -17,13 +17,15 @@ if("${CMAKE_SYSTEM_PROCESSOR}" MATCHES "x86_64.*")
|
|||
else()
|
||||
set(ARCH arm64)
|
||||
endif()
|
||||
set(LEGGED_SDK_NAME -pthread libunitree_legged_sdk_${ARCH}.so lcm)
|
||||
|
||||
link_directories(${CMAKE_SOURCE_DIR}/unitree_legged_sdk/lib/cpp/${ARCH})
|
||||
set(EXTRA_LIBS ${LEGGED_SDK_NAME} lcm)
|
||||
|
||||
set(EXTRA_LIBS -pthread libunitree_legged_sdk.so)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-O3 -fPIC")
|
||||
|
||||
|
||||
|
||||
include_directories(
|
||||
include
|
||||
${catkin_INCLUDE_DIRS}
|
||||
|
@ -32,7 +34,7 @@ include_directories(
|
|||
|
||||
|
||||
|
||||
|
||||
link_directories(${CMAKE_SOURCE_DIR}/unitree_legged_sdk/lib)
|
||||
|
||||
|
||||
|
||||
|
@ -60,4 +62,3 @@ add_dependencies(control_via_keyboard ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catk
|
|||
add_executable(twist_sub src/exe/twist_sub.cpp)
|
||||
target_link_libraries(twist_sub ${EXTRA_LIBS} ${catkin_LIBRARIES})
|
||||
add_dependencies(twist_sub ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS})
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
sudo ifconfig lo multicast
|
||||
sudo route add -net 224.0.0.0 netmask 240.0.0.0 dev lo
|
||||
|
||||
sudo ifconfig enx000ec6612921 down
|
||||
sudo ifconfig enx000ec6612921 up 192.168.123.162 netmask 255.255.255.0
|
||||
|
|
@ -24,10 +24,8 @@ public:
|
|||
|
||||
public:
|
||||
Custom()
|
||||
:
|
||||
// low_udp(LOWLEVEL),
|
||||
low_udp(LOWLEVEL, 8091, "192.168.123.10", 8007),
|
||||
high_udp(8090, "192.168.123.161", 8082, sizeof(HighCmd), sizeof(HighState))
|
||||
: low_udp(LOWLEVEL),
|
||||
high_udp(8090, "192.168.123.161", 8082, sizeof(HighCmd), sizeof(HighState))
|
||||
{
|
||||
high_udp.InitCmdData(high_cmd);
|
||||
low_udp.InitCmdData(low_cmd);
|
||||
|
|
|
@ -24,10 +24,8 @@ public:
|
|||
|
||||
public:
|
||||
Custom()
|
||||
:
|
||||
// low_udp(LOWLEVEL),
|
||||
low_udp(LOWLEVEL, 8091, "192.168.123.10", 8007),
|
||||
high_udp(8090, "192.168.123.161", 8082, sizeof(HighCmd), sizeof(HighState))
|
||||
: low_udp(LOWLEVEL),
|
||||
high_udp(8090, "192.168.123.161", 8082, sizeof(HighCmd), sizeof(HighState))
|
||||
{
|
||||
high_udp.InitCmdData(high_cmd);
|
||||
low_udp.InitCmdData(low_cmd);
|
||||
|
@ -109,4 +107,4 @@ int main(int argc, char **argv)
|
|||
ros::spin();
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue