用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill robot-modeling命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | robot-modeling |
| description | Gazebo 机器人建模技能 - SDF 模型结构、链接、关节、惯性配置 |
| argument-hint | gazebo机器人模型 OR SDF建模 OR 创建机器人 |
| user-invocable | true |
用于在 Gazebo Harmonic 中创建机器人模型
当需要以下帮助时使用此技能:
<?xml version="1.0" ?>
<sdf version="1.11">
<model name="my_robot">
<static>false</static>
<link name="base_link">
<pose>0 0 0.1 0 0 0</pose>
<inertial>
<mass>1.0</mass>
<inertia>
<ixx>0.001</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.001</iyy>
<iyz>0</iyz>
<izz>0.001</izz>
</inertia>
</inertial>
<collision name="base_collision">
<geometry>
<box>
<size>0.5 0.5 0.1</size>
</box>
</geometry>
</collision>
<visual name="base_visual">
<geometry>
<box>
<size>0.5 0.5 0.1</size>
</box>
</geometry>
<material>
<diffuse>0.5 0.5 0.5 1</diffuse>
</material>
</visual>
</link>
<joint name="wheel_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_link</child>
<axis>
<xyz>0 0 1</xyz>
<limit>-1e16 1e16</limit>
</axis>
</joint>
</model>
</sdf>
<inertial>
<mass>5.0</mass>
<frame>link_frame</frame>
<inertia>
<ixx>0.01</ixx>
<ixy>0</ixy>
<ixz>0</ixz>
<iyy>0.01</iyy>
<iyz>0</iyz>
<izz>0.01</izz>
</inertia>
</inertial>
<collision name="base_collision">
<pose>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.5 0.5 0.1</size>
</box>
</geometry>
<surface>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
</ode>
</friction>
<restitution>
<coefficient>0.5</coefficient>
</restitution>
</surface>
</collision>
<visual name="base_visual">
<pose>0 0 0 0 0 0</pose>
<geometry>
<box>
<size>0.5 0.5 0.1</size>
</box>
</geometry>
<material>
<ambient>0.5 0.5 0.5 1</ambient>
<diffuse>0.5 0.5 0.5 1</diffuse>
<specular>0.1 0.1 0.1 1</specular>
</material>
</visual>
<joint name="wheel_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_link</child>
<pose>0 0 0 0 0 0</pose>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-1.57</lower>
<upper>1.57</upper>
<effort>10</effort>
<velocity>5</velocity>
</limit>
<dynamics>
<damping>0.1</damping>
<friction>0.1</friction>
</dynamics>
</axis>
</joint>
<joint name="wheel_joint" type="continuous">
<parent>base_link</parent>
<child>wheel_link</child>
<axis>
<xyz>0 0 1</xyz>
<dynamics>
<damping>0.05</damping>
<friction>0.0</friction>
</dynamics>
</axis>
</joint>
<joint name="slider_joint" type="prismatic">
<parent>base_link</parent>
<child>slider_link</child>
<axis>
<xyz>1 0 0</xyz>
<limit>
<lower>0</lower>
<upper>1.0</upper>
<effort>100</effort>
<velocity>0.5</velocity>
</limit>
</axis>
</joint>
<joint name="fixed_joint" type="fixed">
<parent>base_link</parent>
<child>mounted_link</child>
</joint>
<joint name="ball_joint" type="ball">
<parent>base_link</parent>
<child>ball_link</child>
<axis>
<xyz>1 0 0</xyz>
<dynamics>
<damping>0.1</damping>
</dynamics>
</axis>
</joint>
<joint name="wheel_joint" type="revolute">
<parent>base_link</parent>
<child>wheel_link</child>
<axis>
<xyz>0 0 1</xyz>
<limit>
<lower>-10</lower>
<upper>10</upper>
<effort>5</effort>
<velocity>10</velocity>
</limit>
</axis>
<!-- 关节驱动器配置 -->
<dynamics>
<damping>0.1</damping>
<friction>0.2</friction>
</dynamics>
</joint>
<!-- 使用 position 控制器 -->
<plugin filename="gz-sim-joint-position-controller-system" name="gz::sim::systems::JointPositionController">
<joint_name>arm_joint_1</joint_name>
<initial_position>0.0</initial_position>
</plugin>
<plugin filename="gz-sim-joint-velocity-controller-system" name="gz::sim::systems::JointVelocityController">
<joint_name>wheel_joint</joint_name>
<velocity>0.0</velocity>
</plugin>
<?xml version="1.0" ?>
<sdf version="1.11">
<model name="differential_robot">
<static>false</static>
<!-- 主体 -->
<link name="base_link">
<pose>0 0 0.15 0 0 0</pose>
<inertial>
<mass>5.0</mass>
<inertia>
<ixx>0.01</ixx><iyy>0.01</iyy><izz>0.01</izz>
</inertia>
</inertial>
<collision name="base_collision">
<geometry><box><size>0.4 0.3 0.1</size></box></geometry>
0.4 0.3 0.1
0.8 0.2 0.2 1
0 0.2 0.05 -1.57 0 0
0.5
0.0010.0010.001
0.050.04
0.050.04
0.2 0.2 0.2 1
0 -0.2 0.05 -1.57 0 0
0.5
0.0010.0010.001
0.050.04
0.050.04
0.2 0.2 0.2 1
base_link
left_wheel
0 0 1
base_link
right_wheel
0 0 1
<!-- 参考 differentials 示例扩展 -->
<model name="compound_robot">
<!-- 主车体 -->
<link name="chassis">...</link>
<!-- 嵌套模型 - 机械臂 -->
<model name="arm">
<static>false</static>
<link name="arm_base">...</link>
</model>
</model>
解决方案:检查惯性质量和重力设置
解决方案:调整 damping 和 friction 参数