modified folder structure

This commit is contained in:
Huang Zhenbiao 2024-10-01 13:48:49 +08:00
parent 618742ac44
commit b2f9f0e685
153 changed files with 3585 additions and 2655 deletions

View File

@ -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/).
For more details, please refer to the [unitree guide controller](controllers/unitree_guide_controller/) and [go2 description](descriptions/unitree/go2_description/).

View File

@ -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)

25
descriptions/README.md Normal file
View File

@ -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
```

View File

@ -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

View File

@ -1,125 +0,0 @@
<?xml version="1.0"?>
<robot name="cyberdog" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="PI" value="3.1415926535897931" />
<!-- dimension -->
<!-- body -->
<xacro:property name="body_width" value="0.190" />
<xacro:property name="body_length" value="0.236" />
<xacro:property name="body_height" value="0.109" />
<!-- abad -->
<xacro:property name="abad_radius" value="0.039" />
<xacro:property name="abad_length" value="0.035" />
<xacro:property name="abad_offset_x" value="0.164" />
<xacro:property name="abad_offset_y" value="0.042" />
<xacro:property name="abad_rotor_offset" value="0.0642303" />
<xacro:property name="abad_max" value="39" />
<xacro:property name="abad_min" value="-39" />
<!-- hip -->
<xacro:property name="hip_shoulder_radius" value="0.039" />
<xacro:property name="hip_shoulder_length" value="0.035" />
<xacro:property name="hip_width" value="0.0250" />
<xacro:property name="hip_height" value="0.034" />
<xacro:property name="hip_offset" value="0.094" />
<xacro:property name="hip_length" value="0.12" />
<xacro:property name="hip_rotor_offset" value="-0.07577" />
<xacro:property name="hip_f_max" value="160" />
<xacro:property name="hip_f_min" value="-76" />
<xacro:property name="hip_h_max" value="180" />
<xacro:property name="hip_h_min" value="-56" />
<!-- knee -->
<xacro:property name="knee_width" value="0.016" />
<xacro:property name="knee_height" value="0.016" />
<xacro:property name="knee_length" value="0.18341" />
<xacro:property name="knee_rotor_offset" value="-0.0342303" />
<xacro:property name="knee_max" value="-30" />
<xacro:property name="knee_min" value="-145" />
<xacro:property name="knee_rubber" value="0.02" />
<!-- foot -->
<xacro:property name="foot_radius" value="0.019" />
<!-- acuator atribute -->
<xacro:property name="abadGearRatio" value="7.75" />
<xacro:property name="hipGearRatio" value="7.75" />
<xacro:property name="kneeGearRatio" value="7.75" />
<xacro:property name="abad_motorTauMax" value="1.5484" />
<xacro:property name="hip_motorTauMax" value="1.5484" />
<xacro:property name="knee_motorTauMax" value="1.5484" />
<xacro:property name="abad_motorVelMax" value="30.9971" />
<xacro:property name="hip_motorVelMax" value="30.9971" />
<xacro:property name="knee_motorVelMax" value="30.9971" />
<xacro:property name="abad_damping" value="0.01" />
<xacro:property name="hip_damping" value="0.01" />
<xacro:property name="knee_damping" value="0.01" />
<xacro:property name="abad_friction" value="0.1" />
<xacro:property name="hip_friction" value="0.1" />
<xacro:property name="knee_friction" value="0.1" />
<!-- inertial&mass value -->
<!-- body -->
<xacro:property name="body_mass" value="4.030000000" />
<xacro:property name="body_com_x" value="0.027300000" />
<xacro:property name="body_com_y" value="-0.000242000" />
<xacro:property name="body_com_z" value="0.014300000" />
<xacro:property name="body_ixx" value="0.018500000" />
<xacro:property name="body_ixy" value="-0.000173000" />
<xacro:property name="body_ixz" value="-0.010200000" />
<xacro:property name="body_iyy" value="0.051700000" />
<xacro:property name="body_iyz" value="-0.000028300" />
<xacro:property name="body_izz" value="0.048300000" />
<!-- abad -->
<xacro:property name="abad_mass" value="0.354000000" />
<xacro:property name="abad_com_x" value="-0.003920000" />
<xacro:property name="abad_com_y" value="0.015000000" />
<xacro:property name="abad_com_z" value="-0.000306000" />
<xacro:property name="abad_ixx" value="0.000190000" />
<xacro:property name="abad_ixy" value="-0.000027000" />
<xacro:property name="abad_ixz" value="-0.000000344" />
<xacro:property name="abad_iyy" value="0.000276000" />
<xacro:property name="abad_iyz" value="0.000001950" />
<xacro:property name="abad_izz" value="0.000233000" />
<!-- hip -->
<xacro:property name="hip_mass" value="0.482000000" />
<xacro:property name="hip_com_x" value="-0.002120000" />
<xacro:property name="hip_com_y" value="-0.021200000" />
<xacro:property name="hip_com_z" value="-0.018400000" />
<xacro:property name="hip_ixx" value="0.001010000" />
<xacro:property name="hip_ixy" value="0.000022300" />
<xacro:property name="hip_ixz" value="-0.000038500" />
<xacro:property name="hip_iyy" value="0.000983000" />
<xacro:property name="hip_iyz" value="0.000199000" />
<xacro:property name="hip_izz" value="0.000347000" />
<!-- knee -->
<xacro:property name="knee_mass" value="0.116000000" />
<xacro:property name="knee_com_x" value="0.000600000" />
<xacro:property name="knee_com_y" value="-0.000047200" />
<xacro:property name="knee_com_z" value="-0.089300000" />
<xacro:property name="knee_ixx" value="0.000668000" />
<xacro:property name="knee_ixy" value="0.000000003" />
<xacro:property name="knee_ixz" value="0.000023700" />
<xacro:property name="knee_iyy" value="0.000674000" />
<xacro:property name="knee_iyz" value="0.000000603" />
<xacro:property name="knee_izz" value="0.000015400" />
<!-- rotor -->
<xacro:property name="rotor_mass" value="0.056700000" />
<xacro:property name="rotor_com_x" value="0" />
<xacro:property name="rotor_com_y" value="0" />
<xacro:property name="rotor_com_z" value="0" />
<xacro:property name="rotor_ixx" value="0.000025300" />
<xacro:property name="rotor_ixy" value="0" />
<xacro:property name="rotor_ixz" value="0" />
<xacro:property name="rotor_iyy" value="0.000047800" />
<xacro:property name="rotor_iyz" value="0" />
<xacro:property name="rotor_izz" value="0.000025300" />
</robot>

View File

@ -1,154 +0,0 @@
<?xml version="1.0"?>
<robot name="cyber_dog" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- <gazebo>-->
<!-- <plugin name="gazebo_rt_control" filename="liblegged_plugin.so">-->
<!-- </plugin>-->
<!-- <plugin name="gazebo_rt_control" filename="libreal_time_control.so">-->
<!-- <robotName>$(arg ROBOT)</robotName>-->
<!-- </plugin>-->
<!-- </gazebo>-->
<gazebo reference="imu_link">
<sensor name="imu_sensor" type="imu">
<always_on>1</always_on>
<update_rate>500</update_rate>
<visualize>true</visualize>
<topic>imu</topic>
<imu>
<angular_velocity>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
<bias_mean>0.0000075</bias_mean>
<bias_stddev>0.0000008</bias_stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
<bias_mean>0.0000075</bias_mean>
<bias_stddev>0.0000008</bias_stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>2e-4</stddev>
<bias_mean>0.0000075</bias_mean>
<bias_stddev>0.0000008</bias_stddev>
</noise>
</z>
</angular_velocity>
<linear_acceleration>
<x>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
<bias_mean>0.1</bias_mean>
<bias_stddev>0.001</bias_stddev>
</noise>
</x>
<y>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
<bias_mean>0.1</bias_mean>
<bias_stddev>0.001</bias_stddev>
</noise>
</y>
<z>
<noise type="gaussian">
<mean>0.0</mean>
<stddev>1.7e-2</stddev>
<bias_mean>0.1</bias_mean>
<bias_stddev>0.001</bias_stddev>
</noise>
</z>
</linear_acceleration>
</imu>
</sensor>
</gazebo>
<gazebo reference="imu_joint">
<disableFixedJointLumping>true</disableFixedJointLumping>
</gazebo>
<!-- <xacro:if value="$(arg USE_LIDAR)">-->
<!-- <gazebo reference="lidar_link">-->
<!-- <sensor name="realsense" type="ray">-->
<!-- <always_on>true</always_on>-->
<!-- <visualize>true</visualize>-->
<!-- <pose>0.0 0 0.0 0 0 0</pose>-->
<!-- <update_rate>5</update_rate>-->
<!-- <ray>-->
<!-- <scan>-->
<!-- <horizontal>-->
<!-- <samples>180</samples>-->
<!-- <resolution>1.000000</resolution>-->
<!-- <min_angle>-1.5700</min_angle>-->
<!-- <max_angle>1.5700</max_angle>-->
<!-- </horizontal>-->
<!-- </scan>-->
<!-- <range>-->
<!-- <min>0.01</min>-->
<!-- <max>12.00</max>-->
<!-- <resolution>0.015000</resolution>-->
<!-- </range>-->
<!-- <noise>-->
<!-- <type>gaussian</type>-->
<!-- <mean>0.0</mean>-->
<!-- <stddev>0.01</stddev>-->
<!-- </noise>-->
<!-- </ray>-->
<!-- <plugin name="cyberdog_laserscan" filename="libgazebo_ros_ray_sensor.so">-->
<!-- <ros>-->
<!-- <remapping>~/out:=scan</remapping>-->
<!-- </ros>-->
<!-- <output_type>sensor_msgs/LaserScan</output_type>-->
<!-- <frame_name>lidar_link</frame_name>-->
<!-- </plugin>-->
<!-- </sensor>-->
<!-- </gazebo>-->
<!-- </xacro:if>-->
<!-- &lt;!&ndash; Foot contacts. &ndash;&gt;-->
<!-- <gazebo reference="FR_knee">-->
<!-- <sensor name="FR_foot_contact" type="contact">-->
<!-- <update_rate>100</update_rate>-->
<!-- <plugin name="contactPlugin" filename="libfoot_contact_plugin.so"/>-->
<!-- <contact>-->
<!-- <collision>FR_knee_fixed_joint_lump__FR_foot_collision_2</collision>-->
<!-- </contact>-->
<!-- </sensor>-->
<!-- </gazebo>-->
<!-- <gazebo reference="FL_knee">-->
<!-- <sensor name="FL_foot_contact" type="contact">-->
<!-- <update_rate>100</update_rate>-->
<!-- <plugin name="contactPlugin" filename="libfoot_contact_plugin.so"/>-->
<!-- <contact>-->
<!-- <collision>FL_knee_fixed_joint_lump__FL_foot_collision_2</collision>-->
<!-- </contact>-->
<!-- </sensor>-->
<!-- </gazebo>-->
<!-- <gazebo reference="RR_knee">-->
<!-- <sensor name="RR_foot_contact" type="contact">-->
<!-- <update_rate>100</update_rate>-->
<!-- <plugin name="contactPlugin" filename="libfoot_contact_plugin.so"/>-->
<!-- <contact>-->
<!-- <collision>RR_knee_fixed_joint_lump__RR_foot_collision_2</collision>-->
<!-- </contact>-->
<!-- </sensor>-->
<!-- </gazebo>-->
<!-- <gazebo reference="RL_knee">-->
<!-- <sensor name="RL_foot_contact" type="contact">-->
<!-- <update_rate>100</update_rate>-->
<!-- <plugin name="contactPlugin" filename="libfoot_contact_plugin.so"/>-->
<!-- <contact>-->
<!-- <collision>RL_knee_fixed_joint_lump__RL_foot_collision_2</collision>-->
<!-- </contact>-->
<!-- </sensor>-->
<!-- </gazebo>-->
</robot>

View File

@ -1,295 +0,0 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:include filename="$(find cyberdog_description)/xacro/transmission.xacro"/>
<xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae *origin">
<joint name="${name}_abad_joint" type="revolute">
<xacro:insert_block name="origin"/>
<parent link="body"/>
<child link="${name}_abad"/>
<axis xyz="1 0 0"/>
<dynamics damping="${abad_damping}" friction="${abad_friction}"/>
<xacro:if value="${(mirror_dae == True)}">
<limit effort="${abad_motorTauMax*abadGearRatio}"
velocity="${abad_motorVelMax}" lower="${abad_min*PI/180.0}"
upper="${abad_max*PI/180.0}"/>
</xacro:if>
<xacro:if value="${(mirror_dae == False)}">
<limit effort="${abad_motorTauMax*abadGearRatio}"
velocity="${abad_motorVelMax}" lower="${-abad_max*PI/180.0}"
upper="${-abad_min*PI/180.0}"/>
</xacro:if>
</joint>
<link name="${name}_abad">
<visual>
<xacro:if value="${(mirror_dae == True) and (front_hind_dae == True)}">
<origin rpy="0 0 0" xyz="0 0 0"/>
</xacro:if>
<xacro:if value="${(mirror_dae == False) and (front_hind_dae == True)}">
<origin rpy="${PI} 0 0" xyz="0 0 0"/>
</xacro:if>
<xacro:if value="${(mirror_dae == True) and (front_hind_dae == False)}">
<origin rpy="0 ${PI} 0" xyz="0 0 0"/>
</xacro:if>
<xacro:if value="${(mirror_dae == False) and (front_hind_dae == False)}">
<origin rpy="${PI} ${PI} 0" xyz="0 0 0"/>
</xacro:if>
<geometry>
<mesh filename="file://$(find cyberdog_description)/meshes/abad.dae" scale="1 1 1"/>
</geometry>
</visual>
<collision>
<origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="${abad_length}" radius="${abad_radius}"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 0 0"
xyz="${abad_com_x*front_hind} ${abad_com_y*mirror} ${abad_com_z}"/>
<mass value="${abad_mass}"/>
<inertia ixx="${abad_ixx}" ixy="${abad_ixy*mirror*front_hind}"
ixz="${abad_ixz*front_hind}" iyy="${abad_iyy}" iyz="${abad_iyz*mirror}"
izz="${abad_izz}"/>
</inertial>
</link>
<joint name="${name}_abad_rotor_fix" type="fixed">
<origin rpy="0 0 0" xyz="${-abad_rotor_offset*front_hind} 0 0"/>
<parent link="${name}_abad"/>
<child link="${name}_abad_rotor"/>
</joint>
<!-- this link is only for abad rotor inertial -->
<link name="${name}_abad_rotor">
<inertial>
<origin rpy="0 0 0" xyz="${rotor_com_x} ${rotor_com_y} ${rotor_com_z}"/>
<mass value="${rotor_mass}"/>
<inertia ixx="${rotor_ixx}" ixy="${rotor_ixy}" ixz="${rotor_ixz}" iyy="${rotor_iyy}" iyz="${rotor_iyz}"
izz="${rotor_izz}"/>
</inertial>
</link>
<joint name="${name}_abad_fixed" type="fixed">
<origin rpy="0 0 0" xyz="0 ${(hip_offset-hip_shoulder_length)*mirror} 0"/>
<parent link="${name}_abad"/>
<child link="${name}_hip_shoulder"/>
</joint>
<link name="${name}_hip_shoulder">
<collision>
<origin rpy="${PI/2.0} 0 0" xyz="0 0 0"/>
<geometry>
<cylinder length="${hip_shoulder_length}" radius="${hip_shoulder_radius}"/>
</geometry>
</collision>
</link>
<joint name="${name}_hip_joint" type="revolute">
<origin rpy="0 0 0" xyz="0 ${hip_offset*mirror} 0"/>
<parent link="${name}_abad"/>
<child link="${name}_hip"/>
<axis xyz="0 1 0"/>
<dynamics damping="${hip_damping}" friction="${hip_friction}"/>
<xacro:if value="${front_hind_dae == True}">
<limit effort="${hip_motorTauMax*hipGearRatio}"
velocity="${hip_motorVelMax}" lower="${hip_f_min*PI/180.0}"
upper="${hip_f_max*PI/180.0}"/>
</xacro:if>
<xacro:if value="${front_hind_dae == False}">
<limit effort="${hip_motorTauMax*hipGearRatio}"
velocity="${hip_motorVelMax}" lower="${hip_h_min*PI/180.0}"
upper="${hip_h_max*PI/180.0}"/>
</xacro:if>
</joint>
<link name="${name}_hip">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<xacro:if value="${mirror_dae == True}">
<mesh filename="file://$(find cyberdog_description)/meshes/hip.dae"
scale="1 1 1"/>
</xacro:if>
<xacro:if value="${mirror_dae == False}">
<mesh filename="file://$(find cyberdog_description)/meshes/hip_mirror.dae"
scale="1 1 1"/>
</xacro:if>
</geometry>
</visual>
<collision>
<origin rpy="0 ${PI/2.0} 0" xyz="0 0 ${-hip_length/2.0}"/>
<geometry>
<box size="${hip_length} ${hip_width} ${hip_height}"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 0 0" xyz="${hip_com_x} ${hip_com_y*mirror} ${hip_com_z}"/>
<mass value="${hip_mass}"/>
<inertia ixx="${hip_ixx}" ixy="${hip_ixy*mirror}" ixz="${hip_ixz}" iyy="${hip_iyy}"
iyz="${hip_iyz*mirror}" izz="${hip_izz}"/>
</inertial>
</link>
<joint name="${name}_hip_rotor_fix" type="fixed">
<origin rpy="0 0 0" xyz="0 ${hip_rotor_offset*mirror} 0"/>
<parent link="${name}_hip"/>
<child link="${name}_hip_rotor"/>
</joint>
<!-- this link is only for hip rotor inertial -->
<link name="${name}_hip_rotor">
<inertial>
<origin rpy="0 0 0" xyz="${rotor_com_x} ${rotor_com_y} ${rotor_com_z}"/>
<mass value="${rotor_mass}"/>
<inertia ixx="${rotor_ixx}" ixy="${rotor_ixy}" ixz="${rotor_ixz}" iyy="${rotor_iyy}" iyz="${rotor_iyz}"
izz="${rotor_izz}"/>
</inertial>
</link>
<joint name="${name}_knee_rotor_fix" type="fixed">
<origin rpy="0 0 0" xyz="0 ${knee_rotor_offset*mirror} 0"/>
<parent link="${name}_hip"/>
<child link="${name}_knee_rotor"/>
</joint>
<!-- this link is only for knee rotor inertial -->
<link name="${name}_knee_rotor">
<inertial>
<origin rpy="0 0 0" xyz="${rotor_com_x} ${rotor_com_y} ${rotor_com_z}"/>
<mass value="${rotor_mass}"/>
<inertia ixx="${rotor_ixx}" ixy="${rotor_ixy}" ixz="${rotor_ixz}" iyy="${rotor_iyy}" iyz="${rotor_iyz}"
izz="${rotor_izz}"/>
</inertial>
</link>
<joint name="${name}_knee_joint" type="revolute">
<origin rpy="0 0 0" xyz="0 0 ${-hip_length}"/>
<parent link="${name}_hip"/>
<child link="${name}_knee"/>
<axis xyz="0 1 0"/>
<dynamics damping="${hip_damping}" friction="${hip_friction}"/>
<limit effort="${knee_motorTauMax*kneeGearRatio}"
velocity="${knee_motorVelMax}" lower="${knee_min*PI/180.0}"
upper="${knee_max*PI/180.0}"/>
</joint>
<link name="${name}_knee">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="file://$(find cyberdog_description)/meshes/knee.dae" scale="1 1 1"/>
</geometry>
</visual>
<collision>
<origin rpy="0 ${PI} 0" xyz="0 0 ${-knee_length/2.0}"/>
<geometry>
<box size="${knee_height} ${knee_width} ${knee_length}"/>
</geometry>
</collision>
<collision name="${name}_knee_rubber">
<origin rpy="0 ${PI} 0" xyz="${-knee_rubber/2.0} 0 -0.007"/>
<geometry>
<sphere radius="0.016"/>
</geometry>
<surface>
<contact>
<ode>
<max_vel>0.00001</max_vel>
<min_depth>0.0</min_depth>
</ode>
</contact>
</surface>
</collision>
<inertial>
<origin rpy="0 0 0" xyz="${knee_com_x} ${knee_com_y} ${knee_com_z}"/>
<mass value="${knee_mass}"/>
<inertia ixx="${knee_ixx}" ixy="${knee_ixy}" ixz="${knee_ixz}" iyy="${knee_iyy}"
iyz="${knee_iyz}" izz="${knee_izz}"/>
</inertial>
</link>
<joint name="${name}_foot_fixed" type="fixed">
<origin rpy="0 0 0" xyz="0.0055 0 ${-knee_length+foot_radius/2.0}"/>
<parent link="${name}_knee"/>
<child link="${name}_foot"/>
</joint>
<link name="${name}_foot">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="${foot_radius-0.01}"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<sphere radius="${foot_radius}"/>
</geometry>
<surface>
<contact>
<ode>
<max_vel>0.001</max_vel>
<min_depth>0.0</min_depth>
</ode>
</contact>
</surface>
</collision>
</link>
<xacro:leg_transmission name="${name}"/>
<gazebo reference="${name}_abad">
<mu1>0.2</mu1>
<mu2>0.2</mu2>
<visual>
<material>
<ambient>.5 .5 .5 1.0</ambient>
<diffuse>.5 .5 .5 1.0</diffuse>
<specular>.5 .5 .5 1.0</specular>
</material>
</visual>
</gazebo>
<gazebo reference="${name}_hip">
<mu1>0.2</mu1>
<mu2>0.2</mu2>
<self_collide>1</self_collide>
<visual>
<material>
<ambient>.05 .05 .05 1.0</ambient>
<diffuse>.05 .05 .05 1.0</diffuse>
<specular>.05 .05 .05 1.0</specular>
</material>
</visual>
</gazebo>
<gazebo reference="${name}_knee">
<mu1>0.7</mu1>
<mu2>0.7</mu2>
<self_collide>1</self_collide>
<visual>
<material>
<ambient>.5 .5 .5 1.0</ambient>
<diffuse>.5 .5 .5 1.0</diffuse>
<specular>.5 .5 .5 1.0</specular>
</material>
</visual>
</gazebo>
<gazebo reference="${name}_foot">
<mu1>0.7</mu1>
<mu2>0.7</mu2>
<self_collide>1</self_collide>
<visual>
<material>
<ambient>.5 .5 .5 1.0</ambient>
<diffuse>.5 .5 .5 1.0</diffuse>
<specular>.5 .5 .5 1.0</specular>
</material>
</visual>
</gazebo>
</xacro:macro>
</robot>

View File

@ -1,212 +0,0 @@
<?xml version="1.0"?>
<robot name="cyber_dog" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:arg name="ROBOT" default="cyber_dog"/>
<xacro:arg name="USE_LIDAR" default="false"/>
<xacro:include filename="const.xacro"/>
<xacro:include filename="leg.xacro"/>
<xacro:include filename="gazebo.xacro"/>
<xacro:include filename="ros2_control.xacro"/>
<link name="base_link">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
</visual>
</link>
<joint name="floating_base" type="fixed">
<origin rpy="0 0 0" xyz="0 0 0"/>
<parent link="base_link"/>
<child link="body"/>
</joint>
<link name="body">
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<mesh filename="file://$(find cyberdog_description)/meshes/body.dae" scale="1 1 1"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="${body_length} ${body_width} ${body_height}"/>
</geometry>
</collision>
<inertial>
<origin rpy="0 0 0" xyz="${body_com_x} ${body_com_y} ${body_com_z}"/>
<mass value="${body_mass}"/>
<inertia ixx="${body_ixx}" ixy="${body_ixy}" ixz="${body_ixz}" iyy="${body_iyy}" iyz="${body_iyz}"
izz="${body_izz}"/>
</inertial>
</link>
<joint name="imu_joint" type="fixed">
<parent link="body"/>
<child link="imu_link"/>
<origin rpy="0 0 0" xyz="33.4e-3 -17.2765e-3 51.0469e-3"/>
</joint>
<link name="imu_link">
<inertial>
<mass value="0.001"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size=".001 .001 .001"/>
</geometry>
</collision>
</link>
<joint name="scan_joint" type="fixed">
<parent link="body"/>
<child link="lidar_link"/>
<origin rpy="0 0 0" xyz="0.21425 0 0.0908"/>
</joint>
<link name="lidar_link">
<inertial>
<mass value="0.001"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
</inertial>
</link>
<joint name="D435_camera_joint" type="fixed">
<parent link="body"/>
<child link="D435_camera_link"/>
<origin rpy="0 0 0" xyz="271.994e-3 25e-3 114.912e-3"/>
</joint>
<link name="D435_camera_link">
<inertial>
<mass value="0.001"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size=".001 .001 .001"/>
</geometry>
</collision>
</link>
<joint name="RGB_camera_joint" type="fixed">
<parent link="body"/>
<child link="RGB_camera_link"/>
<origin rpy="0 0 0" xyz="275.76e-3 0 125.794e-3"/>
</joint>
<link name="RGB_camera_link">
<inertial>
<mass value="0.001"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size=".001 .001 .001"/>
</geometry>
</collision>
</link>
<joint name="AI_camera_joint" type="fixed">
<parent link="body"/>
<child link="AI_camera_link"/>
<origin rpy="0 0 0" xyz="290.228e-3 0 147.420e-3"/>
</joint>
<link name="AI_camera_link">
<inertial>
<mass value="0.001"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
<inertia ixx="0.0001" ixy="0" ixz="0" iyy="0.0001" iyz="0" izz="0.0001"/>
</inertial>
<visual>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size="0.001 0.001 0.001"/>
</geometry>
</visual>
<collision>
<origin rpy="0 0 0" xyz="0 0 0"/>
<geometry>
<box size=".001 .001 .001"/>
</geometry>
</collision>
</link>
<xacro:leg name="FR" mirror="-1" mirror_dae="False" front_hind="1" front_hind_dae="True">
<origin rpy="0 0 0" xyz="${abad_offset_x} ${-abad_offset_y} 0"/>
</xacro:leg>
<xacro:leg name="FL" mirror="1" mirror_dae="True" front_hind="1" front_hind_dae="True">
<origin rpy="0 0 0" xyz="${abad_offset_x} ${abad_offset_y} 0"/>
</xacro:leg>
<xacro:leg name="RR" mirror="-1" mirror_dae="False" front_hind="-1" front_hind_dae="False">
<origin rpy="0 0 0" xyz="${-abad_offset_x} ${-abad_offset_y} 0"/>
</xacro:leg>
<xacro:leg name="RL" mirror="1" mirror_dae="True" front_hind="-1" front_hind_dae="False">
<origin rpy="0 0 0" xyz="${-abad_offset_x} ${abad_offset_y} 0"/>
</xacro:leg>
<!-- This link is only for head collision -->
<joint name="head_joint" type="fixed">
<parent link="body"/>
<child link="head"/>
<origin rpy="0 0 0" xyz="0 0 0"/>
</joint>
<link name="head">
<collision>
<origin rpy="0 0 0" xyz="0.256 0 0.120"/>
<geometry>
<box size="0.076 0.060 0.040"/>
</geometry>
</collision>
<collision>
<origin rpy="0 0 0" xyz="0.225 0 0.150"/>
<geometry>
<box size="0.020 0.080 0.100"/>
</geometry>
</collision>
</link>
<gazebo reference="body">
<visual>
<material>
<ambient>.1 .1 .1 1.0</ambient>
<diffuse>.1 .1 .1 1.0</diffuse>
<specular>.1 .1 .1 1.0</specular>
</material>
</visual>
</gazebo>
</robot>

View File

@ -1,149 +0,0 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- <xacro:macro name="leg" params="name mirror mirror_dae front_hind front_hind_dae"> -->
<ros2_control name="GazeboSystem" type="system">
<hardware>
<plugin>gz_ros2_control/GazeboSimSystem</plugin>
</hardware>
<joint name="FR_abad_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="FR_hip_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="FR_knee_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="FL_abad_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="FL_hip_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="FL_knee_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="RR_abad_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="RR_hip_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="RR_knee_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="RL_abad_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="RL_hip_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<joint name="RL_knee_joint">
<command_interface name="effort" initial_value="0.0"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
<state_interface name="effort"/>
</joint>
<sensor name="imu_sensor">
<state_interface name="orientation.x"/>
<state_interface name="orientation.y"/>
<state_interface name="orientation.z"/>
<state_interface name="orientation.w"/>
<state_interface name="angular_velocity.x"/>
<state_interface name="angular_velocity.y"/>
<state_interface name="angular_velocity.z"/>
<state_interface name="linear_acceleration.x"/>
<state_interface name="linear_acceleration.y"/>
<state_interface name="linear_acceleration.z"/>
</sensor>
<sensor name="LF_foot_end">
<state_interface name="force.x"/>
<state_interface name="force.y"/>
<state_interface name="force.z"/>
<param name="frame_id">LF_FOOT</param>
</sensor>
<sensor name="RF_foot_end">
<state_interface name="force.x"/>
<state_interface name="force.y"/>
<state_interface name="force.z"/>
<param name="frame_id">RF_FOOT</param>
</sensor>
<sensor name="LH_foot_end">
<state_interface name="force.x"/>
<state_interface name="force.y"/>
<state_interface name="force.z"/>
<param name="frame_id">LH_FOOT</param>
</sensor>
<sensor name="RH_foot_end">
<state_interface name="force.x"/>
<state_interface name="force.y"/>
<state_interface name="force.z"/>
<param name="frame_id">LH_FOOT</param>
</sensor>
</ros2_control>
<!-- Gazebo's ros2_control plugin -->
<gazebo>
<plugin filename="gz_ros2_control-system" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
<parameters>$(find cyberdog_description)/config/robot_control.yaml</parameters>
</plugin>
<plugin filename="gz-sim-imu-system"
name="gz::sim::systems::Imu">
</plugin>
<plugin filename="gz-sim-contact-system"
name="gz::sim::systems::Contact">
</plugin>
<plugin filename="gz-sim-forcetorque-system"
name="gz::sim::systems::ForceTorque">
</plugin>
</gazebo>
</robot>

View File

@ -1,41 +0,0 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="leg_transmission" params="name">
<transmission name="${name}_abad_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${name}_abad_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${name}_abad_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>"${abadGearRatio}"</mechanicalReduction>
</actuator>
</transmission>
<transmission name="${name}_hip_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${name}_hip_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${name}_hip_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>"${abadGearRatio}"</mechanicalReduction>
</actuator>
</transmission>
<transmission name="${name}_knee_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="${name}_knee_joint">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="${name}_knee_motor">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>"${kneeGearRatio}"</mechanicalReduction>
</actuator>
</transmission>
</xacro:macro>
</robot>

View File

@ -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

View File

@ -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

View File

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 130 KiB

View File

@ -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()

View File

@ -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

View File

@ -1,20 +1,20 @@
<package format="2">
<name>b2_description</name>
<version>1.0.0</version>
<description>
<p>URDF Description package for b2_description</p>
<p>This package contains configuration data, 3D models and launch files
for b2_description robot</p>
</description>
<author>Unitree Robotics</author>
<maintainer email="TODO@email.com" />
<license>BSD</license>
<exec_depend>xacro</exec_depend>
<exec_depend>joint_state_publisher</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>imu_sensor_broadcaster</exec_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
<package format="2">
<name>b2_description</name>
<version>1.0.0</version>
<description>
<p>URDF Description package for b2_description</p>
<p>This package contains configuration data, 3D models and launch files
for b2_description robot</p>
</description>
<author>Unitree Robotics</author>
<maintainer email="TODO@email.com" />
<license>BSD</license>
<exec_depend>xacro</exec_depend>
<exec_depend>joint_state_publisher</exec_depend>
<exec_depend>robot_state_publisher</exec_depend>
<exec_depend>imu_sensor_broadcaster</exec_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>

View File

@ -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

View File

@ -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
}

Some files were not shown because too many files have changed in this diff Show More