diff --git a/robots/z1_description/xacro/z1_v2.urdf b/robots/z1_description/xacro/z1_v2.urdf new file mode 100644 index 00000000..09846008 --- /dev/null +++ b/robots/z1_description/xacro/z1_v2.urdf @@ -0,0 +1,346 @@ + + + + + + + + + + /z1_gazebo + gazebo_ros_control/DefaultRobotHWSim + + + + true + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + true + + + true + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + 1 + + + + diff --git a/unitree_controller/CMakeLists.txt b/unitree_controller/CMakeLists.txt index 88a30cc4..055d9be0 100644 --- a/unitree_controller/CMakeLists.txt +++ b/unitree_controller/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.0) project(unitree_controller) find_package(catkin REQUIRED COMPONENTS @@ -29,6 +29,8 @@ include_directories( ) link_directories(${GAZEBO_LIBRARY_DIRS}) +set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}") # Declare a C++ library @@ -55,4 +57,4 @@ add_executable(unitree_servo src/servo.cpp) target_link_libraries(unitree_servo ${PROJECT_NAME} ${catkin_LIBRARIES}) add_executable(unitree_move_kinetic src/move_publisher.cpp) -target_link_libraries(unitree_move_kinetic ${catkin_LIBRARIES}) \ No newline at end of file +target_link_libraries(unitree_move_kinetic ${catkin_LIBRARIES}) diff --git a/unitree_gazebo/launch/z1_empty.launch b/unitree_gazebo/launch/z1_empty.launch new file mode 100755 index 00000000..51cf9604 --- /dev/null +++ b/unitree_gazebo/launch/z1_empty.launch @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unitree_gazebo/launch/z1_spawn.launch b/unitree_gazebo/launch/z1_spawn.launch new file mode 100755 index 00000000..d5f96285 --- /dev/null +++ b/unitree_gazebo/launch/z1_spawn.launch @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/unitree_legged_control/CMakeLists.txt b/unitree_legged_control/CMakeLists.txt index 917bb913..477f2cfb 100644 --- a/unitree_legged_control/CMakeLists.txt +++ b/unitree_legged_control/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8.3) +cmake_minimum_required(VERSION 3.0.1) project(unitree_legged_control) find_package(catkin REQUIRED COMPONENTS @@ -8,6 +8,7 @@ find_package(catkin REQUIRED COMPONENTS roscpp realtime_tools unitree_legged_msgs + urdf ) catkin_package( @@ -17,16 +18,19 @@ catkin_package( hardware_interface pluginlib roscpp + urdf INCLUDE_DIRS include LIBRARIES ${PROJECT_NAME} ) +set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") include_directories(include ${catkin_INCLUDE_DIRS} ${Boost_INCLUDE_DIR}) -link_directories($(catkin_LIB_DIRS) lib) +link_directories(${catkin_LIB_DIRS} lib) add_library( unitree_legged_control src/joint_controller.cpp ) add_dependencies(${PROJECT_NAME} unitree_legged_msgs_gencpp) -target_link_libraries(unitree_legged_control ${catkin_LIBRARIES} unitree_joint_control_tool) +# target_link_libraries(unitree_legged_control ${catkin_LIBRARIES} unitree_joint_control_tool_arm64) +target_link_libraries(unitree_legged_control ${catkin_LIBRARIES} unitree_joint_control_tool_${CMAKE_HOST_SYSTEM_PROCESSOR}) diff --git a/unitree_legged_control/lib/libunitree_joint_control_tool_aarch64.so b/unitree_legged_control/lib/libunitree_joint_control_tool_aarch64.so new file mode 100644 index 00000000..80c787c5 Binary files /dev/null and b/unitree_legged_control/lib/libunitree_joint_control_tool_aarch64.so differ diff --git a/unitree_legged_control/lib/libunitree_joint_control_tool_x86_64.so b/unitree_legged_control/lib/libunitree_joint_control_tool_x86_64.so new file mode 100644 index 00000000..26d67a20 Binary files /dev/null and b/unitree_legged_control/lib/libunitree_joint_control_tool_x86_64.so differ diff --git a/unitree_legged_control/package.xml b/unitree_legged_control/package.xml index 16358dc8..7650c210 100644 --- a/unitree_legged_control/package.xml +++ b/unitree_legged_control/package.xml @@ -10,6 +10,7 @@ hardware_interface pluginlib roscpp + urdf controller_interface hardware_interface pluginlib @@ -18,6 +19,7 @@ hardware_interface pluginlib roscpp + urdf unitree_legged_msgs diff --git a/z1_controller/CMakeLists.txt b/z1_controller/CMakeLists.txt index 875d1689..1d0e392a 100644 --- a/z1_controller/CMakeLists.txt +++ b/z1_controller/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.0.2) project(z1_controller) - +#set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE INTERNAL "" FORCE) find_package(gazebo REQUIRED) find_package(catkin REQUIRED COMPONENTS controller_manager @@ -26,6 +26,8 @@ include_directories( ) link_directories(${GAZEBO_LIBRARY_DIRS}) +set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}") add_library(${PROJECT_NAME} @@ -39,4 +41,4 @@ target_link_libraries(${PROJECT_NAME} ) add_executable(unitree_move_z1 src/basic.cpp) -target_link_libraries(unitree_move_z1 ${PROJECT_NAME} ${catkin_LIBRARIES}) \ No newline at end of file +target_link_libraries(unitree_move_z1 ${PROJECT_NAME} ${catkin_LIBRARIES})