diff --git a/README.md b/README.md index d09e0d7..bea0c89 100644 --- a/README.md +++ b/README.md @@ -41,4 +41,4 @@ ros2 launch go2_description unitree_guide.launch.py source ~/ros2_ws/install/setup.bash ros2 run keyboard_input keyboard_input ``` -For more details, please refer to the [unitree guide controller](controllers/unitree_guide_controller/) and [go2 description](descriptions/go2_description/). \ No newline at end of file +For more details, please refer to the [unitree guide controller](controllers/unitree_guide_controller/) and [go2 description](descriptions/unitree/go2_description/). \ No newline at end of file diff --git a/controllers/unitree_guide_controller/README.md b/controllers/unitree_guide_controller/README.md index 05aac0a..a1c1566 100644 --- a/controllers/unitree_guide_controller/README.md +++ b/controllers/unitree_guide_controller/README.md @@ -38,5 +38,5 @@ colcon build --packages-up-to unitree_guide_controller ``` ## 3. Run -* [Go2 in mujoco simulation](../../descriptions/go2_description) +* [Go2 in mujoco simulation](../../descriptions/unitree/go2_description) * [Go1/A1 in gazebo simulation](../../descriptions/quadruped_gazebo) \ No newline at end of file diff --git a/descriptions/README.md b/descriptions/README.md new file mode 100644 index 0000000..9989330 --- /dev/null +++ b/descriptions/README.md @@ -0,0 +1,25 @@ +# Robot Descriptions + +This folder contains the URDF and SRDF files for the quadruped robot. + +* Unitree + * [Go1](unitree/go1_description/) + * [Go2](unitree/go2_description/) + * [Aliengo](unitree/aliengo_description/) + * [B2](unitree/b2_description/) +* Xiaomi + * [Cyberdog](xiaomi/cyberdog_description/) + + +## Steps to transfer urdf to Mujoco model +* Install [Mujoco](https://github.com/google-deepmind/mujoco) +* Transfer the mesh files to mujoco supported format, like stl. +* Adjust the urdf tile to match the mesh file. Transfer the mesh file from .dae to .stl may change the scale size of the mesh file. +* use `xacro` to generate the urdf file. + ``` + xacro robot.xacro > ../urdf/robot.urdf + ``` +* use mujoco to convert the urdf file to mujoco model. + ``` + compile robot.urdf robot.xml + ``` \ No newline at end of file diff --git a/descriptions/cyberdog_description/config/robot_control.yaml b/descriptions/cyberdog_description/config/robot_control.yaml deleted file mode 100644 index 8807c0f..0000000 --- a/descriptions/cyberdog_description/config/robot_control.yaml +++ /dev/null @@ -1,95 +0,0 @@ -# Controller Manager configuration -controller_manager: - ros__parameters: - update_rate: 500 # Hz - - # Define the available controllers - joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - imu_sensor_broadcaster: - type: imu_sensor_broadcaster/IMUSensorBroadcaster - - leg_pd_controller: - type: leg_pd_controller/LegPdController - - unitree_guide_controller: - type: unitree_guide_controller/UnitreeGuideController - -imu_sensor_broadcaster: - ros__parameters: - sensor_name: "imu_sensor" - frame_id: "imu_link" - -leg_pd_controller: - ros__parameters: - joints: - - FR_abad_joint - - FR_hip_joint - - FR_knee_joint - - FL_abad_joint - - FL_hip_joint - - FL_knee_joint - - RR_abad_joint - - RR_hip_joint - - RR_knee_joint - - RL_abad_joint - - RL_hip_joint - - RL_knee_joint - - command_interfaces: - - effort - - state_interfaces: - - position - - velocity - -unitree_guide_controller: - ros__parameters: - command_prefix: "leg_pd_controller" - joints: - - FR_abad_joint - - FR_hip_joint - - FR_knee_joint - - FL_abad_joint - - FL_hip_joint - - FL_knee_joint - - RR_abad_joint - - RR_hip_joint - - RR_knee_joint - - RL_abad_joint - - RL_hip_joint - - RL_knee_joint - - command_interfaces: - - effort - - position - - velocity - - kp - - kd - - state_interfaces: - - effort - - position - - velocity - - feet_names: - - FR_foot - - FL_foot - - RR_foot - - RL_foot - - imu_name: "imu_sensor" - base_name: "base_link" - - imu_interfaces: - - orientation.w - - orientation.x - - orientation.y - - orientation.z - - angular_velocity.x - - angular_velocity.y - - angular_velocity.z - - linear_acceleration.x - - linear_acceleration.y - - linear_acceleration.z \ No newline at end of file diff --git a/descriptions/cyberdog_description/xacro/const.xacro b/descriptions/cyberdog_description/xacro/const.xacro deleted file mode 100644 index 87abb83..0000000 --- a/descriptions/cyberdog_description/xacro/const.xacro +++ /dev/null @@ -1,125 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/descriptions/cyberdog_description/xacro/gazebo.xacro b/descriptions/cyberdog_description/xacro/gazebo.xacro deleted file mode 100644 index 9f2653c..0000000 --- a/descriptions/cyberdog_description/xacro/gazebo.xacro +++ /dev/null @@ -1,154 +0,0 @@ - - - - - - - - - - - - - 1 - 500 - true - imu - - - - - 0.0 - 2e-4 - 0.0000075 - 0.0000008 - - - - - 0.0 - 2e-4 - 0.0000075 - 0.0000008 - - - - - 0.0 - 2e-4 - 0.0000075 - 0.0000008 - - - - - - - 0.0 - 1.7e-2 - 0.1 - 0.001 - - - - - 0.0 - 1.7e-2 - 0.1 - 0.001 - - - - - 0.0 - 1.7e-2 - 0.1 - 0.001 - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/descriptions/cyberdog_description/xacro/leg.xacro b/descriptions/cyberdog_description/xacro/leg.xacro deleted file mode 100644 index c732c33..0000000 --- a/descriptions/cyberdog_description/xacro/leg.xacro +++ /dev/null @@ -1,295 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.00001 - 0.0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0.001 - 0.0 - - - - - - - - - - 0.2 - 0.2 - - - .5 .5 .5 1.0 - .5 .5 .5 1.0 - .5 .5 .5 1.0 - - - - - 0.2 - 0.2 - 1 - - - .05 .05 .05 1.0 - .05 .05 .05 1.0 - .05 .05 .05 1.0 - - - - - 0.7 - 0.7 - 1 - - - .5 .5 .5 1.0 - .5 .5 .5 1.0 - .5 .5 .5 1.0 - - - - - 0.7 - 0.7 - 1 - - - .5 .5 .5 1.0 - .5 .5 .5 1.0 - .5 .5 .5 1.0 - - - - - - \ No newline at end of file diff --git a/descriptions/cyberdog_description/xacro/robot.xacro b/descriptions/cyberdog_description/xacro/robot.xacro deleted file mode 100644 index 8c194a1..0000000 --- a/descriptions/cyberdog_description/xacro/robot.xacro +++ /dev/null @@ -1,212 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - .1 .1 .1 1.0 - .1 .1 .1 1.0 - .1 .1 .1 1.0 - - - - - \ No newline at end of file diff --git a/descriptions/cyberdog_description/xacro/ros2_control.xacro b/descriptions/cyberdog_description/xacro/ros2_control.xacro deleted file mode 100644 index 78f4c47..0000000 --- a/descriptions/cyberdog_description/xacro/ros2_control.xacro +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - gz_ros2_control/GazeboSimSystem - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - LF_FOOT - - - - - - RF_FOOT - - - - - - LH_FOOT - - - - - - LH_FOOT - - - - - - - $(find cyberdog_description)/config/robot_control.yaml - - - - - - - - - - \ No newline at end of file diff --git a/descriptions/cyberdog_description/xacro/transmission.xacro b/descriptions/cyberdog_description/xacro/transmission.xacro deleted file mode 100644 index 18f60be..0000000 --- a/descriptions/cyberdog_description/xacro/transmission.xacro +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - transmission_interface/SimpleTransmission - - hardware_interface/EffortJointInterface - - - hardware_interface/EffortJointInterface - "${abadGearRatio}" - - - - - transmission_interface/SimpleTransmission - - hardware_interface/EffortJointInterface - - - hardware_interface/EffortJointInterface - "${abadGearRatio}" - - - - - transmission_interface/SimpleTransmission - - hardware_interface/EffortJointInterface - - - hardware_interface/EffortJointInterface - "${kneeGearRatio}" - - - - - - diff --git a/descriptions/aliengo_description/CMakeLists.txt b/descriptions/unitree/aliengo_description/CMakeLists.txt similarity index 100% rename from descriptions/aliengo_description/CMakeLists.txt rename to descriptions/unitree/aliengo_description/CMakeLists.txt diff --git a/descriptions/aliengo_description/README.md b/descriptions/unitree/aliengo_description/README.md similarity index 94% rename from descriptions/aliengo_description/README.md rename to descriptions/unitree/aliengo_description/README.md index f76b874..3fc4140 100644 --- a/descriptions/aliengo_description/README.md +++ b/descriptions/unitree/aliengo_description/README.md @@ -1,7 +1,7 @@ # Unitree AlienGo Description This repository contains the urdf model of Aliengo. -![Aliengo](../../.images/aliengo.png) +![Aliengo](../../../.images/aliengo.png) Tested environment: * Ubuntu 24.04 diff --git a/descriptions/aliengo_description/config/ocs2/gait.info b/descriptions/unitree/aliengo_description/config/ocs2/gait.info similarity index 100% rename from descriptions/aliengo_description/config/ocs2/gait.info rename to descriptions/unitree/aliengo_description/config/ocs2/gait.info diff --git a/descriptions/aliengo_description/config/ocs2/reference.info b/descriptions/unitree/aliengo_description/config/ocs2/reference.info similarity index 100% rename from descriptions/aliengo_description/config/ocs2/reference.info rename to descriptions/unitree/aliengo_description/config/ocs2/reference.info diff --git a/descriptions/aliengo_description/config/ocs2/task.info b/descriptions/unitree/aliengo_description/config/ocs2/task.info similarity index 99% rename from descriptions/aliengo_description/config/ocs2/task.info rename to descriptions/unitree/aliengo_description/config/ocs2/task.info index 4a67c83..22ba39d 100644 --- a/descriptions/aliengo_description/config/ocs2/task.info +++ b/descriptions/unitree/aliengo_description/config/ocs2/task.info @@ -283,9 +283,9 @@ selfCollision ; Whole body control torqueLimitsTask { - (0,0) 35.278 ; HAA - (1,0) 35.278 ; HFE - (2,0) 44.4 ; KFE + (0,0) 12.0 ; HAA + (1,0) 12.0 ; HFE + (2,0) 12.0 ; KFE } frictionConeTask diff --git a/descriptions/aliengo_description/config/robot_control.yaml b/descriptions/unitree/aliengo_description/config/robot_control.yaml similarity index 100% rename from descriptions/aliengo_description/config/robot_control.yaml rename to descriptions/unitree/aliengo_description/config/robot_control.yaml diff --git a/descriptions/aliengo_description/config/visualize_urdf.rviz b/descriptions/unitree/aliengo_description/config/visualize_urdf.rviz similarity index 100% rename from descriptions/aliengo_description/config/visualize_urdf.rviz rename to descriptions/unitree/aliengo_description/config/visualize_urdf.rviz diff --git a/descriptions/aliengo_description/launch/ocs2_control.launch.py b/descriptions/unitree/aliengo_description/launch/ocs2_control.launch.py similarity index 100% rename from descriptions/aliengo_description/launch/ocs2_control.launch.py rename to descriptions/unitree/aliengo_description/launch/ocs2_control.launch.py diff --git a/descriptions/aliengo_description/launch/unitree_guide.launch.py b/descriptions/unitree/aliengo_description/launch/unitree_guide.launch.py similarity index 100% rename from descriptions/aliengo_description/launch/unitree_guide.launch.py rename to descriptions/unitree/aliengo_description/launch/unitree_guide.launch.py diff --git a/descriptions/aliengo_description/launch/visualize.launch.py b/descriptions/unitree/aliengo_description/launch/visualize.launch.py similarity index 100% rename from descriptions/aliengo_description/launch/visualize.launch.py rename to descriptions/unitree/aliengo_description/launch/visualize.launch.py diff --git a/descriptions/aliengo_description/meshes/calf.dae b/descriptions/unitree/aliengo_description/meshes/calf.dae similarity index 100% rename from descriptions/aliengo_description/meshes/calf.dae rename to descriptions/unitree/aliengo_description/meshes/calf.dae diff --git a/descriptions/aliengo_description/meshes/hip.dae b/descriptions/unitree/aliengo_description/meshes/hip.dae similarity index 100% rename from descriptions/aliengo_description/meshes/hip.dae rename to descriptions/unitree/aliengo_description/meshes/hip.dae diff --git a/descriptions/aliengo_description/meshes/thigh.dae b/descriptions/unitree/aliengo_description/meshes/thigh.dae similarity index 100% rename from descriptions/aliengo_description/meshes/thigh.dae rename to descriptions/unitree/aliengo_description/meshes/thigh.dae diff --git a/descriptions/aliengo_description/meshes/thigh_mirror.dae b/descriptions/unitree/aliengo_description/meshes/thigh_mirror.dae similarity index 100% rename from descriptions/aliengo_description/meshes/thigh_mirror.dae rename to descriptions/unitree/aliengo_description/meshes/thigh_mirror.dae diff --git a/descriptions/aliengo_description/meshes/trunk.dae b/descriptions/unitree/aliengo_description/meshes/trunk.dae similarity index 100% rename from descriptions/aliengo_description/meshes/trunk.dae rename to descriptions/unitree/aliengo_description/meshes/trunk.dae diff --git a/descriptions/aliengo_description/meshes/trunk_uv_base_final.png b/descriptions/unitree/aliengo_description/meshes/trunk_uv_base_final.png similarity index 100% rename from descriptions/aliengo_description/meshes/trunk_uv_base_final.png rename to descriptions/unitree/aliengo_description/meshes/trunk_uv_base_final.png diff --git a/descriptions/aliengo_description/package.xml b/descriptions/unitree/aliengo_description/package.xml similarity index 100% rename from descriptions/aliengo_description/package.xml rename to descriptions/unitree/aliengo_description/package.xml diff --git a/descriptions/aliengo_description/urdf/robot.urdf b/descriptions/unitree/aliengo_description/urdf/robot.urdf similarity index 100% rename from descriptions/aliengo_description/urdf/robot.urdf rename to descriptions/unitree/aliengo_description/urdf/robot.urdf diff --git a/descriptions/aliengo_description/xacro/const.xacro b/descriptions/unitree/aliengo_description/xacro/const.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/const.xacro rename to descriptions/unitree/aliengo_description/xacro/const.xacro diff --git a/descriptions/aliengo_description/xacro/gazebo.xacro b/descriptions/unitree/aliengo_description/xacro/gazebo.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/gazebo.xacro rename to descriptions/unitree/aliengo_description/xacro/gazebo.xacro diff --git a/descriptions/aliengo_description/xacro/leg.xacro b/descriptions/unitree/aliengo_description/xacro/leg.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/leg.xacro rename to descriptions/unitree/aliengo_description/xacro/leg.xacro diff --git a/descriptions/aliengo_description/xacro/materials.xacro b/descriptions/unitree/aliengo_description/xacro/materials.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/materials.xacro rename to descriptions/unitree/aliengo_description/xacro/materials.xacro diff --git a/descriptions/aliengo_description/xacro/robot.xacro b/descriptions/unitree/aliengo_description/xacro/robot.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/robot.xacro rename to descriptions/unitree/aliengo_description/xacro/robot.xacro diff --git a/descriptions/aliengo_description/xacro/ros2_control.xacro b/descriptions/unitree/aliengo_description/xacro/ros2_control.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/ros2_control.xacro rename to descriptions/unitree/aliengo_description/xacro/ros2_control.xacro diff --git a/descriptions/aliengo_description/xacro/stairs.xacro b/descriptions/unitree/aliengo_description/xacro/stairs.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/stairs.xacro rename to descriptions/unitree/aliengo_description/xacro/stairs.xacro diff --git a/descriptions/aliengo_description/xacro/transmission.xacro b/descriptions/unitree/aliengo_description/xacro/transmission.xacro similarity index 100% rename from descriptions/aliengo_description/xacro/transmission.xacro rename to descriptions/unitree/aliengo_description/xacro/transmission.xacro diff --git a/descriptions/b2_description/CMakeLists.txt b/descriptions/unitree/b2_description/CMakeLists.txt similarity index 94% rename from descriptions/b2_description/CMakeLists.txt rename to descriptions/unitree/b2_description/CMakeLists.txt index 0df7242..82a74d9 100644 --- a/descriptions/b2_description/CMakeLists.txt +++ b/descriptions/unitree/b2_description/CMakeLists.txt @@ -1,12 +1,12 @@ -cmake_minimum_required(VERSION 3.8) - -project(b2_description) - -find_package(ament_cmake REQUIRED) - -install( - DIRECTORY meshes xacro launch config urdf - DESTINATION share/${PROJECT_NAME}/ -) - -ament_package() +cmake_minimum_required(VERSION 3.8) + +project(b2_description) + +find_package(ament_cmake REQUIRED) + +install( + DIRECTORY meshes xacro launch config urdf + DESTINATION share/${PROJECT_NAME}/ +) + +ament_package() diff --git a/descriptions/b2_description/README.md b/descriptions/unitree/b2_description/README.md similarity index 95% rename from descriptions/b2_description/README.md rename to descriptions/unitree/b2_description/README.md index f2ff9fd..eb7c900 100644 --- a/descriptions/b2_description/README.md +++ b/descriptions/unitree/b2_description/README.md @@ -1,7 +1,7 @@ # Unitree B2 Description This repository contains the urdf model of b2. -![B2](../../.images/b2.png) +![B2](../../../.images/b2.png) ## Build ```bash diff --git a/descriptions/b2_description/config/ocs2/gait.info b/descriptions/unitree/b2_description/config/ocs2/gait.info similarity index 100% rename from descriptions/b2_description/config/ocs2/gait.info rename to descriptions/unitree/b2_description/config/ocs2/gait.info diff --git a/descriptions/b2_description/config/ocs2/reference.info b/descriptions/unitree/b2_description/config/ocs2/reference.info similarity index 100% rename from descriptions/b2_description/config/ocs2/reference.info rename to descriptions/unitree/b2_description/config/ocs2/reference.info diff --git a/descriptions/b2_description/config/ocs2/task.info b/descriptions/unitree/b2_description/config/ocs2/task.info similarity index 100% rename from descriptions/b2_description/config/ocs2/task.info rename to descriptions/unitree/b2_description/config/ocs2/task.info diff --git a/descriptions/b2_description/config/robot_control.yaml b/descriptions/unitree/b2_description/config/robot_control.yaml similarity index 100% rename from descriptions/b2_description/config/robot_control.yaml rename to descriptions/unitree/b2_description/config/robot_control.yaml diff --git a/descriptions/b2_description/config/visualize_urdf.rviz b/descriptions/unitree/b2_description/config/visualize_urdf.rviz similarity index 100% rename from descriptions/b2_description/config/visualize_urdf.rviz rename to descriptions/unitree/b2_description/config/visualize_urdf.rviz diff --git a/descriptions/b2_description/launch/ocs2_control.launch.py b/descriptions/unitree/b2_description/launch/ocs2_control.launch.py similarity index 100% rename from descriptions/b2_description/launch/ocs2_control.launch.py rename to descriptions/unitree/b2_description/launch/ocs2_control.launch.py diff --git a/descriptions/b2_description/launch/unitree_guide.launch.py b/descriptions/unitree/b2_description/launch/unitree_guide.launch.py similarity index 100% rename from descriptions/b2_description/launch/unitree_guide.launch.py rename to descriptions/unitree/b2_description/launch/unitree_guide.launch.py diff --git a/descriptions/b2_description/launch/visualize.launch.py b/descriptions/unitree/b2_description/launch/visualize.launch.py similarity index 100% rename from descriptions/b2_description/launch/visualize.launch.py rename to descriptions/unitree/b2_description/launch/visualize.launch.py diff --git a/descriptions/b2_description/meshes/FL_calf.dae b/descriptions/unitree/b2_description/meshes/FL_calf.dae similarity index 100% rename from descriptions/b2_description/meshes/FL_calf.dae rename to descriptions/unitree/b2_description/meshes/FL_calf.dae diff --git a/descriptions/b2_description/meshes/FL_foot.dae b/descriptions/unitree/b2_description/meshes/FL_foot.dae similarity index 100% rename from descriptions/b2_description/meshes/FL_foot.dae rename to descriptions/unitree/b2_description/meshes/FL_foot.dae diff --git a/descriptions/b2_description/meshes/FL_hip.dae b/descriptions/unitree/b2_description/meshes/FL_hip.dae similarity index 100% rename from descriptions/b2_description/meshes/FL_hip.dae rename to descriptions/unitree/b2_description/meshes/FL_hip.dae diff --git a/descriptions/b2_description/meshes/FL_thigh.dae b/descriptions/unitree/b2_description/meshes/FL_thigh.dae similarity index 100% rename from descriptions/b2_description/meshes/FL_thigh.dae rename to descriptions/unitree/b2_description/meshes/FL_thigh.dae diff --git a/descriptions/b2_description/meshes/FR_calf.dae b/descriptions/unitree/b2_description/meshes/FR_calf.dae similarity index 100% rename from descriptions/b2_description/meshes/FR_calf.dae rename to descriptions/unitree/b2_description/meshes/FR_calf.dae diff --git a/descriptions/b2_description/meshes/FR_hip.dae b/descriptions/unitree/b2_description/meshes/FR_hip.dae similarity index 100% rename from descriptions/b2_description/meshes/FR_hip.dae rename to descriptions/unitree/b2_description/meshes/FR_hip.dae diff --git a/descriptions/b2_description/meshes/FR_thigh.dae b/descriptions/unitree/b2_description/meshes/FR_thigh.dae similarity index 100% rename from descriptions/b2_description/meshes/FR_thigh.dae rename to descriptions/unitree/b2_description/meshes/FR_thigh.dae diff --git a/descriptions/b2_description/meshes/RL_calf.dae b/descriptions/unitree/b2_description/meshes/RL_calf.dae similarity index 100% rename from descriptions/b2_description/meshes/RL_calf.dae rename to descriptions/unitree/b2_description/meshes/RL_calf.dae diff --git a/descriptions/b2_description/meshes/RL_hip.dae b/descriptions/unitree/b2_description/meshes/RL_hip.dae similarity index 100% rename from descriptions/b2_description/meshes/RL_hip.dae rename to descriptions/unitree/b2_description/meshes/RL_hip.dae diff --git a/descriptions/b2_description/meshes/RL_thigh.dae b/descriptions/unitree/b2_description/meshes/RL_thigh.dae similarity index 100% rename from descriptions/b2_description/meshes/RL_thigh.dae rename to descriptions/unitree/b2_description/meshes/RL_thigh.dae diff --git a/descriptions/b2_description/meshes/RR_calf.dae b/descriptions/unitree/b2_description/meshes/RR_calf.dae similarity index 100% rename from descriptions/b2_description/meshes/RR_calf.dae rename to descriptions/unitree/b2_description/meshes/RR_calf.dae diff --git a/descriptions/b2_description/meshes/RR_hip.dae b/descriptions/unitree/b2_description/meshes/RR_hip.dae similarity index 100% rename from descriptions/b2_description/meshes/RR_hip.dae rename to descriptions/unitree/b2_description/meshes/RR_hip.dae diff --git a/descriptions/b2_description/meshes/RR_thigh.dae b/descriptions/unitree/b2_description/meshes/RR_thigh.dae similarity index 100% rename from descriptions/b2_description/meshes/RR_thigh.dae rename to descriptions/unitree/b2_description/meshes/RR_thigh.dae diff --git a/descriptions/b2_description/meshes/base_link.dae b/descriptions/unitree/b2_description/meshes/base_link.dae similarity index 100% rename from descriptions/b2_description/meshes/base_link.dae rename to descriptions/unitree/b2_description/meshes/base_link.dae diff --git a/descriptions/b2_description/meshes/calf.dae b/descriptions/unitree/b2_description/meshes/calf.dae similarity index 100% rename from descriptions/b2_description/meshes/calf.dae rename to descriptions/unitree/b2_description/meshes/calf.dae diff --git a/descriptions/b2_description/meshes/hip.dae b/descriptions/unitree/b2_description/meshes/hip.dae similarity index 100% rename from descriptions/b2_description/meshes/hip.dae rename to descriptions/unitree/b2_description/meshes/hip.dae diff --git a/descriptions/b2_description/meshes/thigh.dae b/descriptions/unitree/b2_description/meshes/thigh.dae similarity index 100% rename from descriptions/b2_description/meshes/thigh.dae rename to descriptions/unitree/b2_description/meshes/thigh.dae diff --git a/descriptions/b2_description/meshes/thigh_mirror.dae b/descriptions/unitree/b2_description/meshes/thigh_mirror.dae similarity index 100% rename from descriptions/b2_description/meshes/thigh_mirror.dae rename to descriptions/unitree/b2_description/meshes/thigh_mirror.dae diff --git a/descriptions/b2_description/meshes/trunk.dae b/descriptions/unitree/b2_description/meshes/trunk.dae similarity index 100% rename from descriptions/b2_description/meshes/trunk.dae rename to descriptions/unitree/b2_description/meshes/trunk.dae diff --git a/descriptions/b2_description/meshes/trunk1.dae b/descriptions/unitree/b2_description/meshes/trunk1.dae similarity index 100% rename from descriptions/b2_description/meshes/trunk1.dae rename to descriptions/unitree/b2_description/meshes/trunk1.dae diff --git a/descriptions/b2_description/meshes/trunk2.dae b/descriptions/unitree/b2_description/meshes/trunk2.dae similarity index 100% rename from descriptions/b2_description/meshes/trunk2.dae rename to descriptions/unitree/b2_description/meshes/trunk2.dae diff --git a/descriptions/b2_description/package.xml b/descriptions/unitree/b2_description/package.xml similarity index 95% rename from descriptions/b2_description/package.xml rename to descriptions/unitree/b2_description/package.xml index 5b24d38..ed64635 100644 --- a/descriptions/b2_description/package.xml +++ b/descriptions/unitree/b2_description/package.xml @@ -1,20 +1,20 @@ - - b2_description - 1.0.0 - -

URDF Description package for b2_description

-

This package contains configuration data, 3D models and launch files -for b2_description robot

-
- Unitree Robotics - - BSD - - xacro - joint_state_publisher - robot_state_publisher - imu_sensor_broadcaster - - ament_cmake - + + b2_description + 1.0.0 + +

URDF Description package for b2_description

+

This package contains configuration data, 3D models and launch files +for b2_description robot

+
+ Unitree Robotics + + BSD + + xacro + joint_state_publisher + robot_state_publisher + imu_sensor_broadcaster + + ament_cmake +
\ No newline at end of file diff --git a/descriptions/b2_description/urdf/robot.urdf b/descriptions/unitree/b2_description/urdf/robot.urdf similarity index 95% rename from descriptions/b2_description/urdf/robot.urdf rename to descriptions/unitree/b2_description/urdf/robot.urdf index 70bd841..0e6759e 100644 --- a/descriptions/b2_description/urdf/robot.urdf +++ b/descriptions/unitree/b2_description/urdf/robot.urdf @@ -1,1533 +1,1533 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/descriptions/b2_description/xacro/const.xacro b/descriptions/unitree/b2_description/xacro/const.xacro similarity index 100% rename from descriptions/b2_description/xacro/const.xacro rename to descriptions/unitree/b2_description/xacro/const.xacro diff --git a/descriptions/b2_description/xacro/gazebo.xacro b/descriptions/unitree/b2_description/xacro/gazebo.xacro similarity index 100% rename from descriptions/b2_description/xacro/gazebo.xacro rename to descriptions/unitree/b2_description/xacro/gazebo.xacro diff --git a/descriptions/b2_description/xacro/leg.xacro b/descriptions/unitree/b2_description/xacro/leg.xacro similarity index 100% rename from descriptions/b2_description/xacro/leg.xacro rename to descriptions/unitree/b2_description/xacro/leg.xacro diff --git a/descriptions/b2_description/xacro/materials.xacro b/descriptions/unitree/b2_description/xacro/materials.xacro similarity index 100% rename from descriptions/b2_description/xacro/materials.xacro rename to descriptions/unitree/b2_description/xacro/materials.xacro diff --git a/descriptions/b2_description/xacro/robot.xacro b/descriptions/unitree/b2_description/xacro/robot.xacro similarity index 100% rename from descriptions/b2_description/xacro/robot.xacro rename to descriptions/unitree/b2_description/xacro/robot.xacro diff --git a/descriptions/b2_description/xacro/ros2_control.xacro b/descriptions/unitree/b2_description/xacro/ros2_control.xacro similarity index 100% rename from descriptions/b2_description/xacro/ros2_control.xacro rename to descriptions/unitree/b2_description/xacro/ros2_control.xacro diff --git a/descriptions/b2_description/xacro/stairs.xacro b/descriptions/unitree/b2_description/xacro/stairs.xacro similarity index 100% rename from descriptions/b2_description/xacro/stairs.xacro rename to descriptions/unitree/b2_description/xacro/stairs.xacro diff --git a/descriptions/b2_description/xacro/transmission.xacro b/descriptions/unitree/b2_description/xacro/transmission.xacro similarity index 100% rename from descriptions/b2_description/xacro/transmission.xacro rename to descriptions/unitree/b2_description/xacro/transmission.xacro diff --git a/descriptions/go1_description/CMakeLists.txt b/descriptions/unitree/go1_description/CMakeLists.txt similarity index 100% rename from descriptions/go1_description/CMakeLists.txt rename to descriptions/unitree/go1_description/CMakeLists.txt diff --git a/descriptions/go1_description/README.md b/descriptions/unitree/go1_description/README.md similarity index 95% rename from descriptions/go1_description/README.md rename to descriptions/unitree/go1_description/README.md index c2435cc..67308e8 100644 --- a/descriptions/go1_description/README.md +++ b/descriptions/unitree/go1_description/README.md @@ -1,7 +1,7 @@ # Unitree Go1 Description This repository contains the urdf model of go1. -![go1](../../.images/go1.png) +![go1](../../../.images/go1.png) ## Build ```bash diff --git a/descriptions/go1_description/config/ocs2/gait.info b/descriptions/unitree/go1_description/config/ocs2/gait.info similarity index 100% rename from descriptions/go1_description/config/ocs2/gait.info rename to descriptions/unitree/go1_description/config/ocs2/gait.info diff --git a/descriptions/go1_description/config/ocs2/reference.info b/descriptions/unitree/go1_description/config/ocs2/reference.info similarity index 60% rename from descriptions/go1_description/config/ocs2/reference.info rename to descriptions/unitree/go1_description/config/ocs2/reference.info index 36aa1eb..accc9bf 100644 --- a/descriptions/go1_description/config/ocs2/reference.info +++ b/descriptions/unitree/go1_description/config/ocs2/reference.info @@ -1,21 +1,21 @@ targetDisplacementVelocity 0.5; targetRotationVelocity 1.57; -comHeight 0.3 +comHeight 0.307 defaultJointState { - (0,0) -0.10 ; FL_hip_joint - (1,0) 0.72 ; FL_thigh_joint + (0,0) -0.20 ; FL_hip_joint + (1,0) 0.7 ; FL_thigh_joint (2,0) -1.44 ; FL_calf_joint - (3,0) 0.10 ; FR_hip_joint - (4,0) 0.72 ; FR_thigh_joint + (3,0) 0.20 ; FR_hip_joint + (4,0) 0.7 ; FR_thigh_joint (5,0) -1.44 ; FR_calf_joint - (6,0) -0.10 ; RL_hip_joint - (7,0) 0.72 ; RL_thigh_joint + (6,0) -0.20 ; RL_hip_joint + (7,0) 0.7 ; RL_thigh_joint (8,0) -1.44 ; RL_calf_joint - (9,0) 0.10 ; RR_hip_joint - (10,0) 0.72 ; RR_thigh_joint + (9,0) 0.20 ; RR_hip_joint + (10,0) 0.7 ; RR_thigh_joint (11,0) -1.44 ; RR_calf_joint } diff --git a/descriptions/go1_description/config/ocs2/task.info b/descriptions/unitree/go1_description/config/ocs2/task.info similarity index 100% rename from descriptions/go1_description/config/ocs2/task.info rename to descriptions/unitree/go1_description/config/ocs2/task.info diff --git a/descriptions/go1_description/config/robot_control.yaml b/descriptions/unitree/go1_description/config/robot_control.yaml similarity index 100% rename from descriptions/go1_description/config/robot_control.yaml rename to descriptions/unitree/go1_description/config/robot_control.yaml diff --git a/descriptions/go1_description/config/visualize_urdf.rviz b/descriptions/unitree/go1_description/config/visualize_urdf.rviz similarity index 100% rename from descriptions/go1_description/config/visualize_urdf.rviz rename to descriptions/unitree/go1_description/config/visualize_urdf.rviz diff --git a/descriptions/go1_description/launch/ocs2_control.launch.py b/descriptions/unitree/go1_description/launch/ocs2_control.launch.py similarity index 100% rename from descriptions/go1_description/launch/ocs2_control.launch.py rename to descriptions/unitree/go1_description/launch/ocs2_control.launch.py diff --git a/descriptions/go1_description/launch/unitree_guide.launch.py b/descriptions/unitree/go1_description/launch/unitree_guide.launch.py similarity index 100% rename from descriptions/go1_description/launch/unitree_guide.launch.py rename to descriptions/unitree/go1_description/launch/unitree_guide.launch.py diff --git a/descriptions/go1_description/launch/visualize.launch.py b/descriptions/unitree/go1_description/launch/visualize.launch.py similarity index 100% rename from descriptions/go1_description/launch/visualize.launch.py rename to descriptions/unitree/go1_description/launch/visualize.launch.py diff --git a/descriptions/go1_description/meshes/calf.dae b/descriptions/unitree/go1_description/meshes/calf.dae similarity index 100% rename from descriptions/go1_description/meshes/calf.dae rename to descriptions/unitree/go1_description/meshes/calf.dae diff --git a/descriptions/go1_description/meshes/depthCamera.dae b/descriptions/unitree/go1_description/meshes/depthCamera.dae similarity index 100% rename from descriptions/go1_description/meshes/depthCamera.dae rename to descriptions/unitree/go1_description/meshes/depthCamera.dae diff --git a/descriptions/go1_description/meshes/hip.dae b/descriptions/unitree/go1_description/meshes/hip.dae similarity index 100% rename from descriptions/go1_description/meshes/hip.dae rename to descriptions/unitree/go1_description/meshes/hip.dae diff --git a/descriptions/go1_description/meshes/thigh.dae b/descriptions/unitree/go1_description/meshes/thigh.dae similarity index 100% rename from descriptions/go1_description/meshes/thigh.dae rename to descriptions/unitree/go1_description/meshes/thigh.dae diff --git a/descriptions/go1_description/meshes/thigh_mirror.dae b/descriptions/unitree/go1_description/meshes/thigh_mirror.dae similarity index 100% rename from descriptions/go1_description/meshes/thigh_mirror.dae rename to descriptions/unitree/go1_description/meshes/thigh_mirror.dae diff --git a/descriptions/go1_description/meshes/trunk.dae b/descriptions/unitree/go1_description/meshes/trunk.dae similarity index 100% rename from descriptions/go1_description/meshes/trunk.dae rename to descriptions/unitree/go1_description/meshes/trunk.dae diff --git a/descriptions/go1_description/meshes/ultraSound.dae b/descriptions/unitree/go1_description/meshes/ultraSound.dae similarity index 100% rename from descriptions/go1_description/meshes/ultraSound.dae rename to descriptions/unitree/go1_description/meshes/ultraSound.dae diff --git a/descriptions/go1_description/package.xml b/descriptions/unitree/go1_description/package.xml similarity index 100% rename from descriptions/go1_description/package.xml rename to descriptions/unitree/go1_description/package.xml diff --git a/descriptions/go1_description/urdf/robot.urdf b/descriptions/unitree/go1_description/urdf/robot.urdf similarity index 100% rename from descriptions/go1_description/urdf/robot.urdf rename to descriptions/unitree/go1_description/urdf/robot.urdf diff --git a/descriptions/go1_description/xacro/const.xacro b/descriptions/unitree/go1_description/xacro/const.xacro similarity index 100% rename from descriptions/go1_description/xacro/const.xacro rename to descriptions/unitree/go1_description/xacro/const.xacro diff --git a/descriptions/go1_description/xacro/depthCamera.xacro b/descriptions/unitree/go1_description/xacro/depthCamera.xacro similarity index 100% rename from descriptions/go1_description/xacro/depthCamera.xacro rename to descriptions/unitree/go1_description/xacro/depthCamera.xacro diff --git a/descriptions/go1_description/xacro/gazebo.xacro b/descriptions/unitree/go1_description/xacro/gazebo.xacro similarity index 100% rename from descriptions/go1_description/xacro/gazebo.xacro rename to descriptions/unitree/go1_description/xacro/gazebo.xacro diff --git a/descriptions/go1_description/xacro/leg.xacro b/descriptions/unitree/go1_description/xacro/leg.xacro similarity index 100% rename from descriptions/go1_description/xacro/leg.xacro rename to descriptions/unitree/go1_description/xacro/leg.xacro diff --git a/descriptions/go1_description/xacro/materials.xacro b/descriptions/unitree/go1_description/xacro/materials.xacro similarity index 100% rename from descriptions/go1_description/xacro/materials.xacro rename to descriptions/unitree/go1_description/xacro/materials.xacro diff --git a/descriptions/go1_description/xacro/robot.xacro b/descriptions/unitree/go1_description/xacro/robot.xacro similarity index 100% rename from descriptions/go1_description/xacro/robot.xacro rename to descriptions/unitree/go1_description/xacro/robot.xacro diff --git a/descriptions/go1_description/xacro/ros2_control.xacro b/descriptions/unitree/go1_description/xacro/ros2_control.xacro similarity index 100% rename from descriptions/go1_description/xacro/ros2_control.xacro rename to descriptions/unitree/go1_description/xacro/ros2_control.xacro diff --git a/descriptions/go1_description/xacro/transmission.xacro b/descriptions/unitree/go1_description/xacro/transmission.xacro similarity index 100% rename from descriptions/go1_description/xacro/transmission.xacro rename to descriptions/unitree/go1_description/xacro/transmission.xacro diff --git a/descriptions/go1_description/xacro/ultraSound.xacro b/descriptions/unitree/go1_description/xacro/ultraSound.xacro similarity index 100% rename from descriptions/go1_description/xacro/ultraSound.xacro rename to descriptions/unitree/go1_description/xacro/ultraSound.xacro diff --git a/descriptions/go2_description/CMakeLists.txt b/descriptions/unitree/go2_description/CMakeLists.txt similarity index 100% rename from descriptions/go2_description/CMakeLists.txt rename to descriptions/unitree/go2_description/CMakeLists.txt diff --git a/descriptions/go2_description/README.md b/descriptions/unitree/go2_description/README.md similarity index 97% rename from descriptions/go2_description/README.md rename to descriptions/unitree/go2_description/README.md index 42a11de..10e2bb3 100644 --- a/descriptions/go2_description/README.md +++ b/descriptions/unitree/go2_description/README.md @@ -1,7 +1,7 @@ # Unitree Go2 Description This repository contains the urdf model of go2. -![go2](../../.images/go2.png) +![go2](../../../.images/go2.png) Tested environment: * Ubuntu 24.04 diff --git a/descriptions/go2_description/config/ocs2/gait.info b/descriptions/unitree/go2_description/config/ocs2/gait.info similarity index 100% rename from descriptions/go2_description/config/ocs2/gait.info rename to descriptions/unitree/go2_description/config/ocs2/gait.info diff --git a/descriptions/go2_description/config/ocs2/reference.info b/descriptions/unitree/go2_description/config/ocs2/reference.info similarity index 100% rename from descriptions/go2_description/config/ocs2/reference.info rename to descriptions/unitree/go2_description/config/ocs2/reference.info diff --git a/descriptions/go2_description/config/ocs2/task.info b/descriptions/unitree/go2_description/config/ocs2/task.info similarity index 100% rename from descriptions/go2_description/config/ocs2/task.info rename to descriptions/unitree/go2_description/config/ocs2/task.info diff --git a/descriptions/go2_description/config/robot_control.yaml b/descriptions/unitree/go2_description/config/robot_control.yaml similarity index 100% rename from descriptions/go2_description/config/robot_control.yaml rename to descriptions/unitree/go2_description/config/robot_control.yaml diff --git a/descriptions/go2_description/config/visualize_urdf.rviz b/descriptions/unitree/go2_description/config/visualize_urdf.rviz similarity index 100% rename from descriptions/go2_description/config/visualize_urdf.rviz rename to descriptions/unitree/go2_description/config/visualize_urdf.rviz diff --git a/descriptions/go2_description/launch/ocs2_control.launch.py b/descriptions/unitree/go2_description/launch/ocs2_control.launch.py similarity index 100% rename from descriptions/go2_description/launch/ocs2_control.launch.py rename to descriptions/unitree/go2_description/launch/ocs2_control.launch.py diff --git a/descriptions/go2_description/launch/unitree_guide.launch.py b/descriptions/unitree/go2_description/launch/unitree_guide.launch.py similarity index 100% rename from descriptions/go2_description/launch/unitree_guide.launch.py rename to descriptions/unitree/go2_description/launch/unitree_guide.launch.py diff --git a/descriptions/go2_description/launch/visualize.launch.py b/descriptions/unitree/go2_description/launch/visualize.launch.py similarity index 100% rename from descriptions/go2_description/launch/visualize.launch.py rename to descriptions/unitree/go2_description/launch/visualize.launch.py diff --git a/descriptions/go2_description/meshes/calf.dae b/descriptions/unitree/go2_description/meshes/calf.dae similarity index 100% rename from descriptions/go2_description/meshes/calf.dae rename to descriptions/unitree/go2_description/meshes/calf.dae diff --git a/descriptions/go2_description/meshes/calf_mirror.dae b/descriptions/unitree/go2_description/meshes/calf_mirror.dae similarity index 100% rename from descriptions/go2_description/meshes/calf_mirror.dae rename to descriptions/unitree/go2_description/meshes/calf_mirror.dae diff --git a/descriptions/go2_description/meshes/foot.dae b/descriptions/unitree/go2_description/meshes/foot.dae similarity index 100% rename from descriptions/go2_description/meshes/foot.dae rename to descriptions/unitree/go2_description/meshes/foot.dae diff --git a/descriptions/go2_description/meshes/hip.dae b/descriptions/unitree/go2_description/meshes/hip.dae similarity index 100% rename from descriptions/go2_description/meshes/hip.dae rename to descriptions/unitree/go2_description/meshes/hip.dae diff --git a/descriptions/go2_description/meshes/thigh.dae b/descriptions/unitree/go2_description/meshes/thigh.dae similarity index 100% rename from descriptions/go2_description/meshes/thigh.dae rename to descriptions/unitree/go2_description/meshes/thigh.dae diff --git a/descriptions/go2_description/meshes/thigh_mirror.dae b/descriptions/unitree/go2_description/meshes/thigh_mirror.dae similarity index 100% rename from descriptions/go2_description/meshes/thigh_mirror.dae rename to descriptions/unitree/go2_description/meshes/thigh_mirror.dae diff --git a/descriptions/go2_description/meshes/trunk.dae b/descriptions/unitree/go2_description/meshes/trunk.dae similarity index 100% rename from descriptions/go2_description/meshes/trunk.dae rename to descriptions/unitree/go2_description/meshes/trunk.dae diff --git a/descriptions/go2_description/package.xml b/descriptions/unitree/go2_description/package.xml similarity index 100% rename from descriptions/go2_description/package.xml rename to descriptions/unitree/go2_description/package.xml diff --git a/descriptions/go2_description/urdf/robot.urdf b/descriptions/unitree/go2_description/urdf/robot.urdf similarity index 100% rename from descriptions/go2_description/urdf/robot.urdf rename to descriptions/unitree/go2_description/urdf/robot.urdf diff --git a/descriptions/go2_description/xacro/const.xacro b/descriptions/unitree/go2_description/xacro/const.xacro similarity index 100% rename from descriptions/go2_description/xacro/const.xacro rename to descriptions/unitree/go2_description/xacro/const.xacro diff --git a/descriptions/go2_description/xacro/gazebo.xacro b/descriptions/unitree/go2_description/xacro/gazebo.xacro similarity index 100% rename from descriptions/go2_description/xacro/gazebo.xacro rename to descriptions/unitree/go2_description/xacro/gazebo.xacro diff --git a/descriptions/go2_description/xacro/leg.xacro b/descriptions/unitree/go2_description/xacro/leg.xacro similarity index 100% rename from descriptions/go2_description/xacro/leg.xacro rename to descriptions/unitree/go2_description/xacro/leg.xacro diff --git a/descriptions/go2_description/xacro/materials.xacro b/descriptions/unitree/go2_description/xacro/materials.xacro similarity index 100% rename from descriptions/go2_description/xacro/materials.xacro rename to descriptions/unitree/go2_description/xacro/materials.xacro diff --git a/descriptions/go2_description/xacro/robot.xacro b/descriptions/unitree/go2_description/xacro/robot.xacro similarity index 100% rename from descriptions/go2_description/xacro/robot.xacro rename to descriptions/unitree/go2_description/xacro/robot.xacro diff --git a/descriptions/go2_description/xacro/ros2_control.xacro b/descriptions/unitree/go2_description/xacro/ros2_control.xacro similarity index 100% rename from descriptions/go2_description/xacro/ros2_control.xacro rename to descriptions/unitree/go2_description/xacro/ros2_control.xacro diff --git a/descriptions/go2_description/xacro/transmission.xacro b/descriptions/unitree/go2_description/xacro/transmission.xacro similarity index 100% rename from descriptions/go2_description/xacro/transmission.xacro rename to descriptions/unitree/go2_description/xacro/transmission.xacro diff --git a/descriptions/cyberdog_description/CMakeLists.txt b/descriptions/xiaomi/cyberdog_description/CMakeLists.txt similarity index 77% rename from descriptions/cyberdog_description/CMakeLists.txt rename to descriptions/xiaomi/cyberdog_description/CMakeLists.txt index 063155c..1091ea9 100644 --- a/descriptions/cyberdog_description/CMakeLists.txt +++ b/descriptions/xiaomi/cyberdog_description/CMakeLists.txt @@ -4,7 +4,7 @@ project(cyberdog_description) find_package(ament_cmake REQUIRED) install( - DIRECTORY meshes xacro launch config + DIRECTORY meshes xacro launch config urdf DESTINATION share/${PROJECT_NAME}/ ) diff --git a/descriptions/cyberdog_description/README.md b/descriptions/xiaomi/cyberdog_description/README.md similarity index 66% rename from descriptions/cyberdog_description/README.md rename to descriptions/xiaomi/cyberdog_description/README.md index da80b9d..a49d3eb 100644 --- a/descriptions/cyberdog_description/README.md +++ b/descriptions/xiaomi/cyberdog_description/README.md @@ -19,4 +19,16 @@ ros2 launch cyberdog_description visualize.launch.py ```bash source ~/ros2_ws/install/setup.bash ros2 launch cyberdog_description gazebo.launch.py -``` \ No newline at end of file +``` + +## Launch ROS2 Control +* Unitree Guide Controller + ```bash + source ~/ros2_ws/install/setup.bash + ros2 launch cyberdog_description unitree_guide.launch.py + ``` +* OCS2 Quadruped Controller + ```bash + source ~/ros2_ws/install/setup.bash + ros2 launch cyberdog_description ocs2_control.launch.py + ``` diff --git a/descriptions/cyberdog_description/config/cyberdog.rviz b/descriptions/xiaomi/cyberdog_description/config/cyberdog.rviz similarity index 100% rename from descriptions/cyberdog_description/config/cyberdog.rviz rename to descriptions/xiaomi/cyberdog_description/config/cyberdog.rviz diff --git a/descriptions/xiaomi/cyberdog_description/config/ocs2/gait.info b/descriptions/xiaomi/cyberdog_description/config/ocs2/gait.info new file mode 100644 index 0000000..6ea163b --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/config/ocs2/gait.info @@ -0,0 +1,255 @@ +list +{ + [0] stance + [1] trot + [2] standing_trot + [3] flying_trot + [4] pace + [5] standing_pace + [6] dynamic_walk + [7] static_walk + [8] amble + [9] lindyhop + [10] skipping + [11] pawup +} + +stance + { + modeSequence + { + [0] STANCE + } + switchingTimes + { + [0] 0.0 + [1] 0.5 + } +} + +trot + { + modeSequence + { + [0] LF_RH + [1] RF_LH + } + switchingTimes + { + [0] 0.0 + [1] 0.3 + [2] 0.6 + } +} + +standing_trot +{ + modeSequence + { + [0] LF_RH + [1] STANCE + [2] RF_LH + [3] STANCE + } + switchingTimes + { + [0] 0.00 + [1] 0.25 + [2] 0.3 + [3] 0.55 + [4] 0.6 + } +} + +flying_trot +{ + modeSequence + { + [0] LF_RH + [1] FLY + [2] RF_LH + [3] FLY + } + switchingTimes + { + [0] 0.00 + [1] 0.15 + [2] 0.2 + [3] 0.35 + [4] 0.4 + } +} + +pace +{ + modeSequence + { + [0] LF_LH + [1] FLY + [2] RF_RH + [3] FLY + } + switchingTimes + { + [0] 0.0 + [1] 0.28 + [2] 0.30 + [3] 0.58 + [4] 0.60 + } +} + +standing_pace +{ + modeSequence + { + [0] LF_LH + [1] STANCE + [2] RF_RH + [3] STANCE + } + switchingTimes + { + [0] 0.0 + [1] 0.30 + [2] 0.35 + [3] 0.65 + [4] 0.70 + } +} + +dynamic_walk +{ + modeSequence + { + [0] LF_RF_RH + [1] RF_RH + [2] RF_LH_RH + [3] LF_RF_LH + [4] LF_LH + [5] LF_LH_RH + } + switchingTimes + { + [0] 0.0 + [1] 0.2 + [2] 0.3 + [3] 0.5 + [4] 0.7 + [5] 0.8 + [6] 1.0 + } +} + +static_walk +{ + modeSequence + { + [0] LF_RF_RH + [1] RF_LH_RH + [2] LF_RF_LH + [3] LF_LH_RH + } + switchingTimes + { + [0] 0.0 + [1] 0.3 + [2] 0.6 + [3] 0.9 + [4] 1.2 + } +} + +amble +{ + modeSequence + { + [0] RF_LH + [1] LF_LH + [2] LF_RH + [3] RF_RH + } + switchingTimes + { + [0] 0.0 + [1] 0.15 + [2] 0.40 + [3] 0.55 + [4] 0.80 + } +} + +lindyhop +{ + modeSequence + { + [0] LF_RH + [1] STANCE + [2] RF_LH + [3] STANCE + [4] LF_LH + [5] RF_RH + [6] LF_LH + [7] STANCE + [8] RF_RH + [9] LF_LH + [10] RF_RH + [11] STANCE + } + switchingTimes + { + [0] 0.00 ; Step 1 + [1] 0.35 ; Stance + [2] 0.45 ; Step 2 + [3] 0.80 ; Stance + [4] 0.90 ; Tripple step + [5] 1.125 ; + [6] 1.35 ; + [7] 1.70 ; Stance + [8] 1.80 ; Tripple step + [9] 2.025 ; + [10] 2.25 ; + [11] 2.60 ; Stance + [12] 2.70 ; + } +} + +skipping +{ + modeSequence + { + [0] LF_RH + [1] FLY + [2] LF_RH + [3] FLY + [4] RF_LH + [5] FLY + [6] RF_LH + [7] FLY + } + switchingTimes + { + [0] 0.00 + [1] 0.27 + [2] 0.30 + [3] 0.57 + [4] 0.60 + [5] 0.87 + [6] 0.90 + [7] 1.17 + [8] 1.20 + } +} + +pawup +{ + modeSequence + { + [0] RF_LH_RH + } + switchingTimes + { + [0] 0.0 + [1] 2.0 + } +} diff --git a/descriptions/xiaomi/cyberdog_description/config/ocs2/reference.info b/descriptions/xiaomi/cyberdog_description/config/ocs2/reference.info new file mode 100644 index 0000000..47047e2 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/config/ocs2/reference.info @@ -0,0 +1,46 @@ +targetDisplacementVelocity 0.4; +targetRotationVelocity 1.57; + +comHeight 0.3 + +defaultJointState +{ + (0,0) -0.10 ; FL_hip_joint + (1,0) 0.72 ; FL_thigh_joint + (2,0) -1.44 ; FL_calf_joint + (3,0) 0.10 ; FR_hip_joint + (4,0) 0.72 ; FR_thigh_joint + (5,0) -1.44 ; FR_calf_joint + (6,0) -0.10 ; RL_hip_joint + (7,0) 0.72 ; RL_thigh_joint + (8,0) -1.44 ; RL_calf_joint + (9,0) 0.10 ; RR_hip_joint + (10,0) 0.72 ; RR_thigh_joint + (11,0) -1.44 ; RR_calf_joint +} + +initialModeSchedule +{ + modeSequence + { + [0] STANCE + [1] STANCE + } + eventTimes + { + [0] 0.5 + } +} + +defaultModeSequenceTemplate +{ + modeSequence + { + [0] STANCE + } + switchingTimes + { + [0] 0.0 + [1] 1.0 + } +} diff --git a/descriptions/xiaomi/cyberdog_description/config/ocs2/task.info b/descriptions/xiaomi/cyberdog_description/config/ocs2/task.info new file mode 100644 index 0000000..d18089c --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/config/ocs2/task.info @@ -0,0 +1,319 @@ +centroidalModelType 0 // 0: FullCentroidalDynamics, 1: Single Rigid Body Dynamics + +legged_robot_interface +{ + verbose false // show the loaded parameters +} + +model_settings +{ + positionErrorGain 0.0 + phaseTransitionStanceTime 0.1 + + verboseCppAd true + recompileLibrariesCppAd false + modelFolderCppAd /tmp/ocs2_quadruped_controller/cyberdog +} + +swing_trajectory_config +{ + liftOffVelocity 0.05 + touchDownVelocity -0.1 + swingHeight 0.1 + swingTimeScale 0.15 +} + +; DDP settings +ddp +{ + algorithm SLQ + + nThreads 3 + threadPriority 50 + + maxNumIterations 1 + minRelCost 1e-1 + constraintTolerance 5e-3 + + displayInfo false + displayShortSummary false + checkNumericalStability false + debugPrintRollout false + debugCaching false + + AbsTolODE 1e-5 + RelTolODE 1e-3 + maxNumStepsPerSecond 10000 + timeStep 0.015 + backwardPassIntegratorType ODE45 + + constraintPenaltyInitialValue 20.0 + constraintPenaltyIncreaseRate 2.0 + + preComputeRiccatiTerms true + + useFeedbackPolicy false + + strategy LINE_SEARCH + lineSearch + { + minStepLength 1e-2 + maxStepLength 1.0 + hessianCorrectionStrategy DIAGONAL_SHIFT + hessianCorrectionMultiple 1e-5 + } +} + + +; Multiple_Shooting SQP settings +sqp +{ + nThreads 3 + dt 0.015 + sqpIteration 1 + deltaTol 1e-4 + g_max 1e-2 + g_min 1e-6 + inequalityConstraintMu 0.1 + inequalityConstraintDelta 5.0 + projectStateInputEqualityConstraints true + printSolverStatistics true + printSolverStatus false + printLinesearch false + useFeedbackPolicy false + integratorType RK2 + threadPriority 50 +} + +; Multiple_Shooting IPM settings +ipm +{ + nThreads 3 + dt 0.015 + ipmIteration 1 + deltaTol 1e-4 + g_max 10.0 + g_min 1e-6 + computeLagrangeMultipliers true + printSolverStatistics true + printSolverStatus false + printLinesearch false + useFeedbackPolicy false + integratorType RK2 + threadPriority 50 + + initialBarrierParameter 1e-4 + targetBarrierParameter 1e-4 + barrierLinearDecreaseFactor 0.2 + barrierSuperlinearDecreasePower 1.5 + barrierReductionCostTol 1e-3 + barrierReductionConstraintTol 1e-3 + + fractionToBoundaryMargin 0.995 + usePrimalStepSizeForDual false + + initialSlackLowerBound 1e-4 + initialDualLowerBound 1e-4 + initialSlackMarginRate 1e-2 + initialDualMarginRate 1e-2 +} + +; Rollout settings +rollout +{ + AbsTolODE 1e-5 + RelTolODE 1e-3 + timeStep 0.015 + integratorType ODE45 + maxNumStepsPerSecond 10000 + checkNumericalStability false +} + +mpc +{ + timeHorizon 1.0 ; [s] + solutionTimeWindow -1 ; maximum [s] + coldStart false + + debugPrint false + + mpcDesiredFrequency 100 ; [Hz] + mrtDesiredFrequency 1000 ; [Hz] Useless +} + +initialState +{ + ;; Normalized Centroidal Momentum: [linear, angular] ;; + (0,0) 0.0 ; vcom_x + (1,0) 0.0 ; vcom_y + (2,0) 0.0 ; vcom_z + (3,0) 0.0 ; L_x / robotMass + (4,0) 0.0 ; L_y / robotMass + (5,0) 0.0 ; L_z / robotMass + + ;; Base Pose: [position, orientation] ;; + (6,0) 0.0 ; p_base_x + (7,0) 0.0 ; p_base_y + (8,0) 0.3 ; p_base_z + (9,0) 0.0 ; theta_base_z + (10,0) 0.0 ; theta_base_y + (11,0) 0.0 ; theta_base_x + + ;; Leg Joint Positions: [FL, RL, FR, RR] ;; + (12,0) -0.20 ; FL_hip_joint + (13,0) 0.72 ; FL_thigh_joint + (14,0) -1.44 ; FL_calf_joint + (15,0) -0.20 ; RL_hip_joint + (16,0) 0.72 ; RL_thigh_joint + (17,0) -1.44 ; RL_calf_joint + (18,0) 0.20 ; FR_hip_joint + (19,0) 0.72 ; FR_thigh_joint + (20,0) -1.44 ; FR_calf_joint + (21,0) 0.20 ; RR_hip_joint + (22,0) 0.72 ; RR_thigh_joint + (23,0) -1.44 ; RR_calf_joint +} + +; standard state weight matrix +Q +{ + scaling 1e+0 + + ;; Normalized Centroidal Momentum: [linear, angular] ;; + (0,0) 15.0 ; vcom_x + (1,1) 15.0 ; vcom_y + (2,2) 100.0 ; vcom_z + (3,3) 10.0 ; L_x / robotMass + (4,4) 30.0 ; L_y / robotMass + (5,5) 30.0 ; L_z / robotMass + + ;; Base Pose: [position, orientation] ;; + (6,6) 1000.0 ; p_base_x + (7,7) 1000.0 ; p_base_y + (8,8) 1500.0 ; p_base_z + (9,9) 100.0 ; theta_base_z + (10,10) 300.0 ; theta_base_y + (11,11) 300.0 ; theta_base_x + + ;; Leg Joint Positions: [FL, RL, FR, RR] ;; + (12,12) 5.0 ; FL_hip_joint + (13,13) 5.0 ; FL_thigh_joint + (14,14) 2.5 ; FL_calf_joint + (15,15) 5.0 ; RL_hip_joint + (16,16) 5.0 ; RL_thigh_joint + (17,17) 2.5 ; RL_calf_joint + (18,18) 5.0 ; FR_hip_joint + (19,19) 5.0 ; FR_thigh_joint + (20,20) 2.5 ; FR_calf_joint + (21,21) 5.0 ; RR_hip_joint + (22,22) 5.0 ; RR_thigh_joint + (23,23) 2.5 ; RR_calf_joint +} + +; control weight matrix +R +{ + scaling 1e-3 + + ;; Feet Contact Forces: [FL, FR, RL, RR] ;; + (0,0) 1.0 ; front_left_force + (1,1) 1.0 ; front_left_force + (2,2) 1.0 ; front_left_force + (3,3) 1.0 ; front_right_force + (4,4) 1.0 ; front_right_force + (5,5) 1.0 ; front_right_force + (6,6) 1.0 ; rear_left_force + (7,7) 1.0 ; rear_left_force + (8,8) 1.0 ; rear_left_force + (9,9) 1.0 ; rear_right_force + (10,10) 1.0 ; rear_right_force + (11,11) 1.0 ; rear_right_force + + ;; foot velocity relative to base: [FL, RL, FR, RR] (uses the Jacobian at nominal configuration) ;; + (12,12) 5000.0 ; x + (13,13) 5000.0 ; y + (14,14) 5000.0 ; z + (15,15) 5000.0 ; x + (16,16) 5000.0 ; y + (17,17) 5000.0 ; z + (18,18) 5000.0 ; x + (19,19) 5000.0 ; y + (20,20) 5000.0 ; z + (21,21) 5000.0 ; x + (22,22) 5000.0 ; y + (23,23) 5000.0 ; z +} + +frictionConeSoftConstraint +{ + frictionCoefficient 0.3 + + ; relaxed log barrier parameters + mu 0.1 + delta 5.0 +} + +selfCollision +{ + ; Self Collision raw object pairs + collisionObjectPairs + { + } + + ; Self Collision pairs + collisionLinkPairs + { + [0] "FL_calf, FR_calf" + [1] "RL_calf, RR_calf" + [2] "FL_calf, RL_calf" + [3] "FR_calf, RR_calf" + [4] "FL_foot, FR_foot" + [5] "RL_foot, RR_foot" + [6] "FL_foot, RL_foot" + [7] "FR_foot, RR_foot" + } + + minimumDistance 0.05 + + ; relaxed log barrier parameters + mu 1e-2 + delta 1e-3 +} + +; Whole body control +torqueLimitsTask +{ + (0,0) 33.5 ; HAA + (1,0) 33.5 ; HFE + (2,0) 33.5 ; KFE +} + +frictionConeTask +{ + frictionCoefficient 0.3 +} + +swingLegTask +{ + kp 350 + kd 37 +} + +weight +{ + swingLeg 100 + baseAccel 1 + contactForce 0.01 +} + +; State Estimation +kalmanFilter +{ + footRadius 0.02 + imuProcessNoisePosition 0.02 + imuProcessNoiseVelocity 0.02 + footProcessNoisePosition 0.002 + footSensorNoisePosition 0.005 + footSensorNoiseVelocity 0.1 + footHeightSensorNoise 0.01 +} diff --git a/descriptions/xiaomi/cyberdog_description/config/robot_control.yaml b/descriptions/xiaomi/cyberdog_description/config/robot_control.yaml new file mode 100644 index 0000000..ab6782a --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/config/robot_control.yaml @@ -0,0 +1,159 @@ +# Controller Manager configuration +controller_manager: + ros__parameters: + update_rate: 500 # Hz + + # Define the available controllers + joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + imu_sensor_broadcaster: + type: imu_sensor_broadcaster/IMUSensorBroadcaster + +# leg_pd_controller: +# type: leg_pd_controller/LegPdController +# +# unitree_guide_controller: +# type: unitree_guide_controller/UnitreeGuideController + + ocs2_quadruped_controller: + type: ocs2_quadruped_controller/Ocs2QuadrupedController + +imu_sensor_broadcaster: + ros__parameters: + sensor_name: "imu_sensor" + frame_id: "imu_link" + +#leg_pd_controller: +# ros__parameters: +# joints: +# - FR_abad_joint +# - FR_hip_joint +# - FR_knee_joint +# - FL_abad_joint +# - FL_hip_joint +# - FL_knee_joint +# - RR_abad_joint +# - RR_hip_joint +# - RR_knee_joint +# - RL_abad_joint +# - RL_hip_joint +# - RL_knee_joint +# +# command_interfaces: +# - effort +# +# state_interfaces: +# - position +# - velocity +# +#unitree_guide_controller: +# ros__parameters: +# command_prefix: "leg_pd_controller" +# joints: +# - FR_abad_joint +# - FR_hip_joint +# - FR_knee_joint +# - FL_abad_joint +# - FL_hip_joint +# - FL_knee_joint +# - RR_abad_joint +# - RR_hip_joint +# - RR_knee_joint +# - RL_abad_joint +# - RL_hip_joint +# - RL_knee_joint +# +# command_interfaces: +# - effort +# - position +# - velocity +# - kp +# - kd +# +# state_interfaces: +# - effort +# - position +# - velocity +# +# feet_names: +# - FR_foot +# - FL_foot +# - RR_foot +# - RL_foot +# +# imu_name: "imu_sensor" +# base_name: "base_link" +# +# imu_interfaces: +# - orientation.w +# - orientation.x +# - orientation.y +# - orientation.z +# - angular_velocity.x +# - angular_velocity.y +# - angular_velocity.z +# - linear_acceleration.x +# - linear_acceleration.y +# - linear_acceleration.z + + +ocs2_quadruped_controller: + ros__parameters: + update_rate: 500 # Hz + default_kd: 1.0 + + joints: + - FL_hip_joint + - FL_thigh_joint + - FL_calf_joint + - FR_hip_joint + - FR_thigh_joint + - FR_calf_joint + - RL_hip_joint + - RL_thigh_joint + - RL_calf_joint + - RR_hip_joint + - RR_thigh_joint + - RR_calf_joint + + command_interfaces: + - effort + - position + - velocity + - kp + - kd + + state_interfaces: + - effort + - position + - velocity + + feet_names: + - FL_foot + - FR_foot + - RL_foot + - RR_foot + + + imu_name: "imu_sensor" + base_name: "base" + + imu_interfaces: + - orientation.w + - orientation.x + - orientation.y + - orientation.z + - angular_velocity.x + - angular_velocity.y + - angular_velocity.z + - linear_acceleration.x + - linear_acceleration.y + - linear_acceleration.z + + foot_force_name: "foot_force" + foot_force_interfaces: + - FL + - RL + - FR + - RR \ No newline at end of file diff --git a/descriptions/cyberdog_description/launch/gazebo.launch.py b/descriptions/xiaomi/cyberdog_description/launch/gazebo.launch.py similarity index 100% rename from descriptions/cyberdog_description/launch/gazebo.launch.py rename to descriptions/xiaomi/cyberdog_description/launch/gazebo.launch.py diff --git a/descriptions/xiaomi/cyberdog_description/launch/ocs2_control.launch.py b/descriptions/xiaomi/cyberdog_description/launch/ocs2_control.launch.py new file mode 100644 index 0000000..b35e736 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/launch/ocs2_control.launch.py @@ -0,0 +1,122 @@ +import os + +import xacro +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, OpaqueFunction, IncludeLaunchDescription, RegisterEventHandler +from launch.event_handlers import OnProcessExit +from launch.substitutions import PathJoinSubstitution +from launch_ros.actions import Node +from launch_ros.substitutions import FindPackageShare +from sympy.physics.vector.printing import params + +package_description = "cyberdog_description" +package_controller = "ocs2_quadruped_controller" + +def process_xacro(context): + robot_type_value = context.launch_configurations['robot_type'] + pkg_path = os.path.join(get_package_share_directory(package_description)) + xacro_file = os.path.join(pkg_path, 'xacro', 'robot.xacro') + robot_description_config = xacro.process_file(xacro_file, mappings={'robot_type': robot_type_value}) + return (robot_description_config.toxml(), robot_type_value) + + +def launch_setup(context, *args, **kwargs): + (robot_description, robot_type) = process_xacro(context) + robot_controllers = PathJoinSubstitution( + [ + FindPackageShare(package_description), + "config", + "robot_control.yaml", + ] + ) + + robot_state_publisher = Node( + package='robot_state_publisher', + executable='robot_state_publisher', + name='robot_state_publisher', + parameters=[ + { + 'publish_frequency': 20.0, + 'use_tf_static': True, + 'robot_description': robot_description, + 'ignore_timestamp': True + } + ], + ) + + controller_manager = Node( + package="controller_manager", + executable="ros2_control_node", + parameters=[robot_controllers, + { + 'urdf_file': os.path.join(get_package_share_directory(package_description), 'urdf', 'robot.urdf'), + 'task_file': os.path.join(get_package_share_directory(package_description), 'config', 'ocs2', + 'task.info'), + 'reference_file': os.path.join(get_package_share_directory(package_description), 'config', + 'ocs2', 'reference.info'), + 'gait_file': os.path.join(get_package_share_directory(package_description), 'config', + 'ocs2', 'gait.info') + }], + output="both", + ) + + joint_state_publisher = Node( + package="controller_manager", + executable="spawner", + arguments=["joint_state_broadcaster", + "--controller-manager", "/controller_manager"], + ) + + imu_sensor_broadcaster = Node( + package="controller_manager", + executable="spawner", + arguments=["imu_sensor_broadcaster", + "--controller-manager", "/controller_manager"], + ) + + ocs2_controller = Node( + package="controller_manager", + executable="spawner", + arguments=["ocs2_quadruped_controller", "--controller-manager", "/controller_manager"] + ) + + return [ + robot_state_publisher, + controller_manager, + joint_state_publisher, + RegisterEventHandler( + event_handler=OnProcessExit( + target_action=joint_state_publisher, + on_exit=[imu_sensor_broadcaster], + ) + ), + RegisterEventHandler( + event_handler=OnProcessExit( + target_action=imu_sensor_broadcaster, + on_exit=[ocs2_controller], + ) + ), + ] + + +def generate_launch_description(): + robot_type_arg = DeclareLaunchArgument( + 'robot_type', + default_value='go1', + description='Type of the robot' + ) + + rviz_config_file = os.path.join(get_package_share_directory(package_controller), "config", "visualize_ocs2.rviz") + + return LaunchDescription([ + robot_type_arg, + OpaqueFunction(function=launch_setup), + Node( + package='rviz2', + executable='rviz2', + name='rviz_ocs2', + output='screen', + arguments=["-d", rviz_config_file] + ) + ]) diff --git a/descriptions/cyberdog_description/launch/visualize.launch.py b/descriptions/xiaomi/cyberdog_description/launch/visualize.launch.py similarity index 100% rename from descriptions/cyberdog_description/launch/visualize.launch.py rename to descriptions/xiaomi/cyberdog_description/launch/visualize.launch.py diff --git a/descriptions/cyberdog_description/meshes/abad.dae b/descriptions/xiaomi/cyberdog_description/meshes/abad.dae similarity index 100% rename from descriptions/cyberdog_description/meshes/abad.dae rename to descriptions/xiaomi/cyberdog_description/meshes/abad.dae diff --git a/descriptions/cyberdog_description/meshes/body.dae b/descriptions/xiaomi/cyberdog_description/meshes/body.dae similarity index 100% rename from descriptions/cyberdog_description/meshes/body.dae rename to descriptions/xiaomi/cyberdog_description/meshes/body.dae diff --git a/descriptions/cyberdog_description/meshes/hip.dae b/descriptions/xiaomi/cyberdog_description/meshes/hip.dae similarity index 100% rename from descriptions/cyberdog_description/meshes/hip.dae rename to descriptions/xiaomi/cyberdog_description/meshes/hip.dae diff --git a/descriptions/cyberdog_description/meshes/hip_mirror.dae b/descriptions/xiaomi/cyberdog_description/meshes/hip_mirror.dae similarity index 100% rename from descriptions/cyberdog_description/meshes/hip_mirror.dae rename to descriptions/xiaomi/cyberdog_description/meshes/hip_mirror.dae diff --git a/descriptions/cyberdog_description/meshes/knee.dae b/descriptions/xiaomi/cyberdog_description/meshes/knee.dae similarity index 100% rename from descriptions/cyberdog_description/meshes/knee.dae rename to descriptions/xiaomi/cyberdog_description/meshes/knee.dae diff --git a/descriptions/cyberdog_description/package.xml b/descriptions/xiaomi/cyberdog_description/package.xml similarity index 100% rename from descriptions/cyberdog_description/package.xml rename to descriptions/xiaomi/cyberdog_description/package.xml diff --git a/descriptions/xiaomi/cyberdog_description/xacro/const.xacro b/descriptions/xiaomi/cyberdog_description/xacro/const.xacro new file mode 100644 index 0000000..54eca40 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/xacro/const.xacro @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/descriptions/xiaomi/cyberdog_description/xacro/gazebo.xacro b/descriptions/xiaomi/cyberdog_description/xacro/gazebo.xacro new file mode 100644 index 0000000..84d65e8 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/xacro/gazebo.xacro @@ -0,0 +1,214 @@ + + + + + + gz_ros2_control/GazeboSimSystem + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + LF_FOOT + + + + + + RF_FOOT + + + + + + LH_FOOT + + + + + + LH_FOOT + + + + + + + $(find cyberdog_description)/config/robot_control.yaml + + + + + + + + + + + + 1 + 500 + true + imu + + + + + 0.0 + 2e-4 + 0.0000075 + 0.0000008 + + + + + 0.0 + 2e-4 + 0.0000075 + 0.0000008 + + + + + 0.0 + 2e-4 + 0.0000075 + 0.0000008 + + + + + + + 0.0 + 1.7e-2 + 0.1 + 0.001 + + + + + 0.0 + 1.7e-2 + 0.1 + 0.001 + + + + + 0.0 + 1.7e-2 + 0.1 + 0.001 + + + + + + + + true + + + \ No newline at end of file diff --git a/descriptions/xiaomi/cyberdog_description/xacro/leg.xacro b/descriptions/xiaomi/cyberdog_description/xacro/leg.xacro new file mode 100644 index 0000000..be3b49d --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/xacro/leg.xacro @@ -0,0 +1,295 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.00001 + 0.0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0.001 + 0.0 + + + + + + + + + + 0.2 + 0.2 + + + .5 .5 .5 1.0 + .5 .5 .5 1.0 + .5 .5 .5 1.0 + + + + + 0.2 + 0.2 + 1 + + + .05 .05 .05 1.0 + .05 .05 .05 1.0 + .05 .05 .05 1.0 + + + + + 0.7 + 0.7 + 1 + + + .5 .5 .5 1.0 + .5 .5 .5 1.0 + .5 .5 .5 1.0 + + + + + 0.7 + 0.7 + 1 + + + .5 .5 .5 1.0 + .5 .5 .5 1.0 + .5 .5 .5 1.0 + + + + + + \ No newline at end of file diff --git a/descriptions/xiaomi/cyberdog_description/xacro/robot.xacro b/descriptions/xiaomi/cyberdog_description/xacro/robot.xacro new file mode 100644 index 0000000..ae91257 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/xacro/robot.xacro @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + .1 .1 .1 1.0 + .1 .1 .1 1.0 + .1 .1 .1 1.0 + + + + + \ No newline at end of file diff --git a/descriptions/xiaomi/cyberdog_description/xacro/ros2_control.xacro b/descriptions/xiaomi/cyberdog_description/xacro/ros2_control.xacro new file mode 100644 index 0000000..0f47197 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/xacro/ros2_control.xacro @@ -0,0 +1,176 @@ + + + + + + + hardware_unitree_mujoco/HardwareUnitree + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/descriptions/xiaomi/cyberdog_description/xacro/transmission.xacro b/descriptions/xiaomi/cyberdog_description/xacro/transmission.xacro new file mode 100644 index 0000000..f016209 --- /dev/null +++ b/descriptions/xiaomi/cyberdog_description/xacro/transmission.xacro @@ -0,0 +1,41 @@ + + + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + "${abadGearRatio}" + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + "${abadGearRatio}" + + + + + transmission_interface/SimpleTransmission + + hardware_interface/EffortJointInterface + + + hardware_interface/EffortJointInterface + "${kneeGearRatio}" + + + + + +