From daaf141bb811ebc0c62532eeda01bb96ed784a1c Mon Sep 17 00:00:00 2001
From: xiaoliangstd <2303335747@qq.com>
Date: Thu, 27 Jun 2024 21:30:52 +0800
Subject: [PATCH] update g1 xacro files
---
.../g1_description/config/robot_control.yaml | 125 ++++++++
robots/g1_description/launch/gazebo.launch | 82 +++++
robots/g1_description/xacro/arm.xacro | 188 ++++++++++++
.../xacro/arm_transmission.xacro | 63 ++++
robots/g1_description/xacro/const.xacro | 282 +++++++++++++++++
robots/g1_description/xacro/gazebo.xacro | 40 +++
robots/g1_description/xacro/leg.xacro | 252 ++++++++++++++++
.../xacro/leg_transmission.xacro | 75 +++++
robots/g1_description/xacro/robot.xacro | 285 ++++++++++++++++++
9 files changed, 1392 insertions(+)
create mode 100755 robots/g1_description/config/robot_control.yaml
create mode 100755 robots/g1_description/launch/gazebo.launch
create mode 100644 robots/g1_description/xacro/arm.xacro
create mode 100644 robots/g1_description/xacro/arm_transmission.xacro
create mode 100644 robots/g1_description/xacro/const.xacro
create mode 100644 robots/g1_description/xacro/gazebo.xacro
create mode 100644 robots/g1_description/xacro/leg.xacro
create mode 100644 robots/g1_description/xacro/leg_transmission.xacro
create mode 100755 robots/g1_description/xacro/robot.xacro
diff --git a/robots/g1_description/config/robot_control.yaml b/robots/g1_description/config/robot_control.yaml
new file mode 100755
index 0000000..102e999
--- /dev/null
+++ b/robots/g1_description/config/robot_control.yaml
@@ -0,0 +1,125 @@
+g1_gazebo:
+ # Publish all joint states -----------------------------------
+ joint_state_controller:
+ type: joint_state_controller/JointStateController
+ publish_rate: 1000
+
+ torso_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: torso_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ # left leg Controllers ---------------------------------------
+ left_hip_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_hip_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_hip_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_hip_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_hip_yaw_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_hip_yaw_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_knee_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_knee_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_ankle_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_ankle_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_ankle_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_ankle_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ # right leg Controllers ---------------------------------------
+ right_hip_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_hip_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_hip_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_hip_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_hip_yaw_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_hip_yaw_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_knee_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_knee_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_ankle_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_ankle_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_ankle_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_ankle_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+
+ # left arm Controllers ---------------------------------------
+ left_shoulder_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_shoulder_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_shoulder_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_shoulder_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_shoulder_yaw_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_shoulder_yaw_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_elbow_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_elbow_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ left_elbow_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: left_elbow_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ # right arm Controllers ---------------------------------------
+ right_shoulder_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_shoulder_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_shoulder_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_shoulder_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_shoulder_yaw_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_shoulder_yaw_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_elbow_pitch_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_elbow_pitch_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
+
+ right_elbow_roll_controller:
+ type: unitree_legged_control/UnitreeJointController
+ joint: right_elbow_roll_joint
+ pid: {p: 100.0, i: 0.0, d: 5.0}
\ No newline at end of file
diff --git a/robots/g1_description/launch/gazebo.launch b/robots/g1_description/launch/gazebo.launch
new file mode 100755
index 0000000..1885fa5
--- /dev/null
+++ b/robots/g1_description/launch/gazebo.launch
@@ -0,0 +1,82 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/robots/g1_description/xacro/arm.xacro b/robots/g1_description/xacro/arm.xacro
new file mode 100644
index 0000000..ea22ec1
--- /dev/null
+++ b/robots/g1_description/xacro/arm.xacro
@@ -0,0 +1,188 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/robots/g1_description/xacro/arm_transmission.xacro b/robots/g1_description/xacro/arm_transmission.xacro
new file mode 100644
index 0000000..01a2e92
--- /dev/null
+++ b/robots/g1_description/xacro/arm_transmission.xacro
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+ 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/robots/g1_description/xacro/const.xacro b/robots/g1_description/xacro/const.xacro
new file mode 100644
index 0000000..041e60e
--- /dev/null
+++ b/robots/g1_description/xacro/const.xacro
@@ -0,0 +1,282 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/robots/g1_description/xacro/gazebo.xacro b/robots/g1_description/xacro/gazebo.xacro
new file mode 100644
index 0000000..0a312e5
--- /dev/null
+++ b/robots/g1_description/xacro/gazebo.xacro
@@ -0,0 +1,40 @@
+
+
+
+
+
+ /g1_gazebo
+ gazebo_ros_control/DefaultRobotHWSim
+
+
+
+
+ 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
+
+
+
+
+ false
+
+
+
+ 0.2
+ 0.2
+
+
+
diff --git a/robots/g1_description/xacro/leg.xacro b/robots/g1_description/xacro/leg.xacro
new file mode 100644
index 0000000..67c15b9
--- /dev/null
+++ b/robots/g1_description/xacro/leg.xacro
@@ -0,0 +1,252 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/robots/g1_description/xacro/leg_transmission.xacro b/robots/g1_description/xacro/leg_transmission.xacro
new file mode 100644
index 0000000..631a27f
--- /dev/null
+++ b/robots/g1_description/xacro/leg_transmission.xacro
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+ 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/robots/g1_description/xacro/robot.xacro b/robots/g1_description/xacro/robot.xacro
new file mode 100755
index 0000000..0d75b42
--- /dev/null
+++ b/robots/g1_description/xacro/robot.xacro
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ transmission_interface/SimpleTransmission
+
+ hardware_interface/EffortJointInterface
+
+
+ hardware_interface/EffortJointInterface
+ 1
+
+
+
+