From 594778fcc1f0dac11ba2055cafa40d27dddb2a0e Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 29 Apr 2024 17:40:13 -0400 Subject: [PATCH 1/4] Add xacro macro for Z1 --- robots/z1_description/xacro/robot.xacro | 304 +---------------------- robots/z1_description/xacro/z1.xacro | 309 ++++++++++++++++++++++++ 2 files changed, 313 insertions(+), 300 deletions(-) create mode 100644 robots/z1_description/xacro/z1.xacro diff --git a/robots/z1_description/xacro/robot.xacro b/robots/z1_description/xacro/robot.xacro index 7f57a05a..184d6244 100644 --- a/robots/z1_description/xacro/robot.xacro +++ b/robots/z1_description/xacro/robot.xacro @@ -2,12 +2,11 @@ - - - - + + + @@ -16,301 +15,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - true - - - - - - - - - + diff --git a/robots/z1_description/xacro/z1.xacro b/robots/z1_description/xacro/z1.xacro new file mode 100644 index 00000000..2497df6f --- /dev/null +++ b/robots/z1_description/xacro/z1.xacro @@ -0,0 +1,309 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + true + + + + + + + + + + + + + From 3435263d52a8b09bebaad48f4f097dce8e1315f0 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 29 Apr 2024 17:41:11 -0400 Subject: [PATCH 2/4] Add xacro macro for B1 --- robots/b1_description/xacro/b1.xacro | 93 +++++++++++++++++++++++++ robots/b1_description/xacro/robot.xacro | 88 ++--------------------- 2 files changed, 98 insertions(+), 83 deletions(-) create mode 100644 robots/b1_description/xacro/b1.xacro diff --git a/robots/b1_description/xacro/b1.xacro b/robots/b1_description/xacro/b1.xacro new file mode 100644 index 00000000..5540992d --- /dev/null +++ b/robots/b1_description/xacro/b1.xacro @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/robots/b1_description/xacro/robot.xacro b/robots/b1_description/xacro/robot.xacro index 30b6127e..70f2aadc 100644 --- a/robots/b1_description/xacro/robot.xacro +++ b/robots/b1_description/xacro/robot.xacro @@ -2,13 +2,10 @@ - - - - + - - + + @@ -18,84 +15,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - - - + From 9f3e0710db1bfbc40edd8920b8254ac5775e5e15 Mon Sep 17 00:00:00 2001 From: Paul Date: Mon, 29 Apr 2024 17:42:46 -0400 Subject: [PATCH 3/4] Add b1z1_description package --- robots/b1z1_description/CMakeLists.txt | 4 + .../config/robot_control.yaml | 105 +++++++ .../launch/b1z1_gazebo.launch | 73 +++++ .../b1z1_description/launch/b1z1_rviz.launch | 18 ++ robots/b1z1_description/package.xml | 12 + robots/b1z1_description/xacro/const.xacro | 17 ++ robots/b1z1_description/xacro/gazebo.xacro | 279 ++++++++++++++++++ robots/b1z1_description/xacro/robot.xacro | 42 +++ 8 files changed, 550 insertions(+) create mode 100644 robots/b1z1_description/CMakeLists.txt create mode 100644 robots/b1z1_description/config/robot_control.yaml create mode 100644 robots/b1z1_description/launch/b1z1_gazebo.launch create mode 100644 robots/b1z1_description/launch/b1z1_rviz.launch create mode 100644 robots/b1z1_description/package.xml create mode 100644 robots/b1z1_description/xacro/const.xacro create mode 100644 robots/b1z1_description/xacro/gazebo.xacro create mode 100644 robots/b1z1_description/xacro/robot.xacro diff --git a/robots/b1z1_description/CMakeLists.txt b/robots/b1z1_description/CMakeLists.txt new file mode 100644 index 00000000..143bb632 --- /dev/null +++ b/robots/b1z1_description/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.0.2) +project(b1z1_description) + +find_package(catkin REQUIRED) diff --git a/robots/b1z1_description/config/robot_control.yaml b/robots/b1z1_description/config/robot_control.yaml new file mode 100644 index 00000000..26075320 --- /dev/null +++ b/robots/b1z1_description/config/robot_control.yaml @@ -0,0 +1,105 @@ +b1z1_gazebo: + # Publish all joint states ----------------------------------- + joint_state_controller: + type: joint_state_controller/JointStateController + publish_rate: 1000 + + # FL Controllers --------------------------------------- + FL_hip_controller: + type: unitree_legged_control/UnitreeJointController + joint: FL_hip_joint + pid: {p: 100.0, i: 0.0, d: 5.0} + + FL_thigh_controller: + type: unitree_legged_control/UnitreeJointController + joint: FL_thigh_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + FL_calf_controller: + type: unitree_legged_control/UnitreeJointController + joint: FL_calf_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + # FR Controllers --------------------------------------- + FR_hip_controller: + type: unitree_legged_control/UnitreeJointController + joint: FR_hip_joint + pid: {p: 100.0, i: 0.0, d: 5.0} + + FR_thigh_controller: + type: unitree_legged_control/UnitreeJointController + joint: FR_thigh_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + FR_calf_controller: + type: unitree_legged_control/UnitreeJointController + joint: FR_calf_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + # RL Controllers --------------------------------------- + RL_hip_controller: + type: unitree_legged_control/UnitreeJointController + joint: RL_hip_joint + pid: {p: 100.0, i: 0.0, d: 5.0} + + RL_thigh_controller: + type: unitree_legged_control/UnitreeJointController + joint: RL_thigh_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + RL_calf_controller: + type: unitree_legged_control/UnitreeJointController + joint: RL_calf_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + # RR Controllers --------------------------------------- + RR_hip_controller: + type: unitree_legged_control/UnitreeJointController + joint: RR_hip_joint + pid: {p: 100.0, i: 0.0, d: 5.0} + + RR_thigh_controller: + type: unitree_legged_control/UnitreeJointController + joint: RR_thigh_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + RR_calf_controller: + type: unitree_legged_control/UnitreeJointController + joint: RR_calf_joint + pid: {p: 300.0, i: 0.0, d: 8.0} + + # Z1 Controllers --------------------------------------- + Joint01_controller: + type: unitree_legged_control/UnitreeJointController + joint: joint1 + pid: {p: 300.0, i: 0.0, d: 5.0} + + Joint02_controller: + type: unitree_legged_control/UnitreeJointController + joint: joint2 + pid: {p: 300.0, i: 0.0, d: 5.0} + + Joint03_controller: + type: unitree_legged_control/UnitreeJointController + joint: joint3 + pid: {p: 300.0, i: 0.0, d: 5.0} + + Joint04_controller: + type: unitree_legged_control/UnitreeJointController + joint: joint4 + pid: {p: 300.0, i: 0.0, d: 5.0} + + Joint05_controller: + type: unitree_legged_control/UnitreeJointController + joint: joint5 + pid: {p: 300.0, i: 0.0, d: 5.0} + + Joint06_controller: + type: unitree_legged_control/UnitreeJointController + joint: joint6 + pid: {p: 300.0, i: 0.0, d: 5.0} + + gripper_controller: + type: unitree_legged_control/UnitreeJointController + joint: jointGripper + pid: {p: 300.0, i: 0.0, d: 5.0} diff --git a/robots/b1z1_description/launch/b1z1_gazebo.launch b/robots/b1z1_description/launch/b1z1_gazebo.launch new file mode 100644 index 00000000..66071a37 --- /dev/null +++ b/robots/b1z1_description/launch/b1z1_gazebo.launch @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/robots/b1z1_description/launch/b1z1_rviz.launch b/robots/b1z1_description/launch/b1z1_rviz.launch new file mode 100644 index 00000000..98ae5da3 --- /dev/null +++ b/robots/b1z1_description/launch/b1z1_rviz.launch @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + diff --git a/robots/b1z1_description/package.xml b/robots/b1z1_description/package.xml new file mode 100644 index 00000000..183ac87c --- /dev/null +++ b/robots/b1z1_description/package.xml @@ -0,0 +1,12 @@ + + + b1z1_description + 0.0.0 + The b1z1_description package + + unitree + TODO + + catkin + + diff --git a/robots/b1z1_description/xacro/const.xacro b/robots/b1z1_description/xacro/const.xacro new file mode 100644 index 00000000..b064cd4c --- /dev/null +++ b/robots/b1z1_description/xacro/const.xacro @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/robots/b1z1_description/xacro/gazebo.xacro b/robots/b1z1_description/xacro/gazebo.xacro new file mode 100644 index 00000000..dc9b2ad8 --- /dev/null +++ b/robots/b1z1_description/xacro/gazebo.xacro @@ -0,0 +1,279 @@ + + + + + + /b1z1_gazebo + gazebo_ros_control/DefaultRobotHWSim + + + + + + + 10 + + base + 0 0 0 0 0 0 + Gazebo/Yellow + + + + + + + + + + trunk + /apply_force/trunk + + + + + true + + true + 1000 + true + __default_topic__ + + trunk_imu + imu_link + 1000.0 + 0.0 + 0 0 0 + 0 0 0 + imu_link + + 0 0 0 0 0 0 + + + + + + + 100 + + + FR_calf_fixed_joint_lump__FR_foot_collision_1 + + + + + + 100 + + + FL_calf_fixed_joint_lump__FL_foot_collision_1 + + + + + + 100 + + + RR_calf_fixed_joint_lump__RR_foot_collision_1 + + + + + + 100 + + + RL_calf_fixed_joint_lump__RL_foot_collision_1 + + + + + + + + + FR_foot_contact + + + + + + + FL_foot_contact + + + + + + + RR_foot_contact + + + + + + + RL_foot_contact + + + + + + Gazebo/Green + false + + + + 0.2 + 0.2 + + + + + + 0.2 + 0.2 + Gazebo/White + + + + 0.2 + 0.2 + Gazebo/Red + + + + + 0.2 + 0.2 + Gazebo/DarkGrey + + + 0.2 + 0.2 + 1 + Gazebo/DarkGrey + + + + + 0.2 + 0.2 + 1 + + + 0.6 + 0.6 + 1 + Gazebo/DarkGrey + + + + + + + 0.2 + 0.2 + Gazebo/DarkGrey + + + 0.2 + 0.2 + 1 + Gazebo/DarkGrey + + + + + 0.2 + 0.2 + 1 + + + 0.6 + 0.6 + 1 + Gazebo/DarkGrey + + + + + + + 0.2 + 0.2 + Gazebo/DarkGrey + + + 0.2 + 0.2 + 1 + Gazebo/DarkGrey + + + + + 0.2 + 0.2 + 1 + + + 0.6 + 0.6 + 1 + Gazebo/DarkGrey + + + + + + + 0.2 + 0.2 + Gazebo/DarkGrey + + + 0.2 + 0.2 + 1 + Gazebo/DarkGrey + + + + + 0.2 + 0.2 + 1 + + + 0.6 + 0.6 + 1 + Gazebo/DarkGrey + + + + + + + true + + + + true + + + + true + + + diff --git a/robots/b1z1_description/xacro/robot.xacro b/robots/b1z1_description/xacro/robot.xacro new file mode 100644 index 00000000..6055ec02 --- /dev/null +++ b/robots/b1z1_description/xacro/robot.xacro @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 7e00616182aa2e921def3f4e0460968efc94f9a7 Mon Sep 17 00:00:00 2001 From: Paul Blum Date: Thu, 2 May 2024 13:29:08 -0400 Subject: [PATCH 4/4] add documentation --- robots/b1_description/xacro/b1.xacro | 1 + robots/b1_description/xacro/robot.xacro | 15 +++++++++------ robots/b1z1_description/xacro/gazebo.xacro | 5 ++++- robots/b1z1_description/xacro/robot.xacro | 7 ++++--- robots/z1_description/xacro/robot.xacro | 14 ++++++++++---- robots/z1_description/xacro/z1.xacro | 1 + 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/robots/b1_description/xacro/b1.xacro b/robots/b1_description/xacro/b1.xacro index 5540992d..d7daaa56 100644 --- a/robots/b1_description/xacro/b1.xacro +++ b/robots/b1_description/xacro/b1.xacro @@ -2,6 +2,7 @@ + diff --git a/robots/b1_description/xacro/robot.xacro b/robots/b1_description/xacro/robot.xacro index 70f2aadc..7b2be0bb 100644 --- a/robots/b1_description/xacro/robot.xacro +++ b/robots/b1_description/xacro/robot.xacro @@ -1,14 +1,21 @@ + - + + + - + + + + + @@ -17,8 +24,4 @@ - - - - diff --git a/robots/b1z1_description/xacro/gazebo.xacro b/robots/b1z1_description/xacro/gazebo.xacro index dc9b2ad8..4c18e01c 100644 --- a/robots/b1z1_description/xacro/gazebo.xacro +++ b/robots/b1z1_description/xacro/gazebo.xacro @@ -1,6 +1,9 @@ + + - + + /b1z1_gazebo diff --git a/robots/b1z1_description/xacro/robot.xacro b/robots/b1z1_description/xacro/robot.xacro index 6055ec02..b42f95b3 100644 --- a/robots/b1z1_description/xacro/robot.xacro +++ b/robots/b1z1_description/xacro/robot.xacro @@ -13,7 +13,7 @@ - + @@ -22,7 +22,8 @@ - + @@ -30,7 +31,7 @@ - + diff --git a/robots/z1_description/xacro/robot.xacro b/robots/z1_description/xacro/robot.xacro index 184d6244..ac18d224 100644 --- a/robots/z1_description/xacro/robot.xacro +++ b/robots/z1_description/xacro/robot.xacro @@ -1,20 +1,26 @@ + - + + + - + + + + + + - - diff --git a/robots/z1_description/xacro/z1.xacro b/robots/z1_description/xacro/z1.xacro index 2497df6f..7b61b880 100644 --- a/robots/z1_description/xacro/z1.xacro +++ b/robots/z1_description/xacro/z1.xacro @@ -2,6 +2,7 @@ +