support for arm64
This commit is contained in:
parent
155b0473d3
commit
63c06067ca
|
@ -0,0 +1,2 @@
|
|||
.vscode
|
||||
build
|
|
@ -13,14 +13,14 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/../lib)
|
|||
link_directories(lib)
|
||||
|
||||
add_executable(highcmd_basic examples/highcmd_basic.cpp )
|
||||
target_link_libraries(highcmd_basic Z1_SDK_Linux64)
|
||||
target_link_libraries(highcmd_basic Z1_SDK_${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(highcmd_development examples/highcmd_development.cpp )
|
||||
target_link_libraries(highcmd_development Z1_SDK_Linux64)
|
||||
target_link_libraries(highcmd_development Z1_SDK_${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(lowcmd_development examples/lowcmd_development.cpp )
|
||||
target_link_libraries(lowcmd_development Z1_SDK_Linux64)
|
||||
target_link_libraries(lowcmd_development Z1_SDK_${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
add_executable(lowcmd_multirobots examples/lowcmd_multirobots.cpp )
|
||||
target_link_libraries(lowcmd_multirobots Z1_SDK_Linux64)
|
||||
target_link_libraries(lowcmd_multirobots Z1_SDK_${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
|
||||
add_subdirectory(pybind11)
|
||||
pybind11_add_module(unitree_arm_interface examples_py/arm_python_interface.cpp)
|
||||
target_link_libraries(unitree_arm_interface PRIVATE Z1_SDK_Linux64)
|
||||
target_link_libraries(unitree_arm_interface PRIVATE Z1_SDK_${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
|
|
|
@ -21,16 +21,16 @@ void Z1ARM::armCtrlByFSM() {
|
|||
|
||||
std::cout << "[MOVEJ]" << std::endl;
|
||||
posture[0]<<0.5,0.1,0.1,0.5,-0.2,0.5;
|
||||
MoveJ(posture[0], 0, 1.0);
|
||||
MoveJ(posture[0], 0, 2.0);
|
||||
|
||||
std::cout << "[MOVEL]" << std::endl;
|
||||
posture[0] << 0,0,0,0.45,-0.2,0.2;
|
||||
MoveL(posture[0], 0, 0.3);
|
||||
MoveL(posture[0], 0, 0.5);
|
||||
|
||||
std::cout << "[MOVEC]" << std::endl;
|
||||
posture[0] << 0,0,0,0.45,0,0.4;
|
||||
posture[1] << 0,0,0,0.45,0.2,0.2;
|
||||
MoveC(posture[0], posture[1], 0, 0.3);
|
||||
MoveC(posture[0], posture[1], 0, 0.5);
|
||||
}
|
||||
|
||||
void Z1ARM::armCtrlInJointCtrl(){
|
||||
|
@ -39,7 +39,7 @@ void Z1ARM::armCtrlInJointCtrl(){
|
|||
|
||||
for(int i(0); i<1000;i++){
|
||||
directions<< 0, 0, 0, -1, 0, 0, -1;
|
||||
jointCtrlCmd(directions, 0.5);
|
||||
jointCtrlCmd(directions, 1.0);
|
||||
usleep(_ctrlComp->dt*1000000);
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ void Z1ARM::armCtrlInCartesian(){
|
|||
|
||||
for(int i(0); i<2000;i++){
|
||||
directions<< 0, 0, 0, 0, 0, -1, -1;
|
||||
cartesianCtrlCmd(directions, 0.3, 0.1);
|
||||
cartesianCtrlCmd(directions, 0.3, 0.2);
|
||||
usleep(_ctrlComp->dt*1000000);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -15,20 +15,20 @@ arm.loopOn()
|
|||
arm.labelRun("forward")
|
||||
arm.startTrack(armState.JOINTCTRL)
|
||||
for i in range(0, 1000):
|
||||
arm.jointCtrlCmd(np.array([0,0,0,-1,0,0,-1]), 0.5)
|
||||
arm.jointCtrlCmd(np.array([0,0,0,-1,0,0,-1]), 1.0)
|
||||
time.sleep(arm._ctrlComp.dt)
|
||||
|
||||
# 2. highcmd_basic : armCtrlByFSM
|
||||
arm.labelRun("forward")
|
||||
arm.MoveJ(np.array([0.5,0.1,0.1,0.5,-0.2,0.5]), 0.0, 1.0)
|
||||
arm.MoveL(np.array([0,0,0,0.45,-0.2,0.2]), -1.0, 0.3)
|
||||
arm.MoveC(np.array([0,0,0,0.45,0,0.4]), np.array([0,0,0,0.45,0.2,0.2]), 0.0, 0.3)
|
||||
arm.MoveJ(np.array([0.5,0.1,0.1,0.5,-0.2,0.5]), 0.0, 2.0)
|
||||
arm.MoveL(np.array([0,0,0,0.45,-0.2,0.2]), -1.0, 0.5)
|
||||
arm.MoveC(np.array([0,0,0,0.45,0,0.4]), np.array([0,0,0,0.45,0.2,0.2]), 0.0, 0.5)
|
||||
|
||||
# 3. highcmd_basic : armCtrlInCartesian
|
||||
arm.labelRun("forward")
|
||||
arm.startTrack(armState.CARTESIAN)
|
||||
for i in range(0, 1000):
|
||||
arm.cartesianCtrlCmd(np.array([0,0,0,0,0,-1,-1]), 0.3, 0.1)
|
||||
arm.cartesianCtrlCmd(np.array([0,0,0,0,0,-1,-1]), 0.3, 0.2)
|
||||
time.sleep(arm._ctrlComp.dt)
|
||||
|
||||
arm.backToStart()
|
||||
|
|
0
include/unitree_arm_sdk/thirdparty/quadProgpp/QuadProg++.hh
vendored
Normal file → Executable file
0
include/unitree_arm_sdk/thirdparty/quadProgpp/QuadProg++.hh
vendored
Normal file → Executable file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue