用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill world-creation命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | world-creation |
| description | Gazebo 世界创建技能 - SDF 世界文件、环境光照、地形、物理引擎配置 |
| argument-hint | 创建gazebo世界 OR 仿真环境 OR 地形生成 |
| user-invocable | true |
用于创建 Gazebo Harmonic 仿真世界
当需要以下帮助时使用此技能:
<?xml version="1.0" ?>
<sdf version="1.11">
<world name="my_world">
<!-- 物理引擎 -->
<physics name="physics" default="true">
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>1000</real_time_update_rate>
</physics>
<!-- 光照 -->
<light type="directional" name="sun">
<cast_shadows>true</cast_shadows>
<pose>0 0 10 0 0 0</pose>
<intensity>1</intensity>
<diffuse>0.8 0.8 0.8 1</diffuse>
</light>
<!-- 地面 -->
<model name="ground_plane">
<static>true</static>
<link name="link">
<collision name="collision">
<geometry>
<plane>
<normal>0 0 1</normal>
</plane>
</geometry>
<surface>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
</ode>
</friction>
</surface>
</collision>
<visual name="visual">
<geometry>
<plane>
<size>100 100</size>
</plane>
</geometry>
<material>
<script>
<uri>file://media/materials/scripts/gazebo.material</uri>
<name>Gazebo/Grey</name>
</script>
</material>
</visual>
</link>
</model>
</world>
</sdf>
<physics name="physics" default="true" type="ode">
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>1000</real_time_update_rate>
<ode>
<solver>
<type>quick</type>
<iters>50</iters>
<sor>1.3</sor>
</solver>
<constraints>
<cfm>1e-5</cfm>
<erp>0.2</erp>
<contact_max_correcting_vel>100</contact_max_correcting_vel>
<contact_surface_layer>0.001</contact_surface_layer>
</constraints>
</ode>
</>
<physics name="physics" default="true" type="dart">
<max_step_size>0.001</max_step_size>
<real_time_factor>1</real_time_factor>
<real_time_update_rate>1000</real_time_update_rate>
<dart>
<solver>
<type>bullet</type>
<iters>50</iters>
<tolerance>1e-6</tolerance>
</solver>
</dart>
</physics>
<physics name="bouncy_physics">
<dynamics>
<ode>
<bullet_friction>0.8</bullet_friction>
</ode>
</dynamics>
<collision>
<surface>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
<slip1>0</slip1>
<slip2>0</slip2>
</ode>
</friction>
<restitution>
<coefficient>0.8</coefficient>
<threshold>100</threshold>
</restitution>
</surface>
</collision>
</physics>
<light type="directional" name="sun">
<pose>0 0 10 0 0 0</pose>
<cast_shadows>true</cast_shadows>
<intensity>1.0</intensity>
<diffuse>0.8 0.8 0.8 1</diffuse>
<specular>0.2 0.2 0.2 1</specular>
<direction>-0.5 0.5 -0.5</direction>
<attenuation>
<range>100</range>
<constant>0.5</constant>
<linear>0.01</linear>
<quadratic>0.001</quadratic>
</attenuation>
</light>
<light type="point" name="lamp">
<pose>0 0 3 0 0 0</pose>
<diffuse>1 0.9 0.7 1</diffuse>
<specular>1 1 1 1</specular>
<intensity>0.8</intensity>
<attenuation>
<range>10</range>
<constant>0.5</constant>
<linear>0.2</linear>
<quadratic>0.1</quadratic>
</attenuation>
</light>
<light type="spot" name="spot_light">
<pose>0 0 5 0 0 0</pose>
<diffuse>1 1 1 1</diffuse>
<specular>1 1 1 1</specular>
<intensity>1.0</intensity>
<spot>
<inner_angle>0.3</inner_angle>
<outer_angle>0.5</outer_angle>
<falloff>1.0</falloff>
</spot>
<direction>0 0 -1</direction>
<attenuation>
<range>20</range>
<constant>0.5</constant>
<linear>0.1</linear>
</attenuation>
</light>
<scene>
<ambient>0.3 0.3 0.3 1</ambient>
<background>0.5 0.7 1 1</background>
<shadows>true</shadows>
<grid>false</grid>
<origin_visual>false</origin_visual>
</scene>
<model name="heightmap_terrain">
<static>true</static>
<link name="terrain_link">
<collision name="terrain_collision">
<geometry>
<heightmap>
<uri>file://models/terrain.png</uri>
<size>100 100 10</size>
<resolutions>0.5 0.5</resolutions>
</heightmap>
</geometry>
<surface>
<friction>
<ode>
<mu>1.0</mu>
<mu2>1.0</mu2>
</ode>
</friction>
</surface>
</collision>
<visual name=>
file://models/terrain.png
100 100 10
0.5 0.5
<visual name="terrain_visual">
<geometry>
<heightmap>
<uri>file://models/terrain.png</uri>
<size>100 100 5</size>
<material>
<diffuse>
<uri>file://materials/textures/grass.jpg</uri>
<size>10 10</size>
</diffuse>
</material>
</heightmap>
</geometry>
</visual>
<!-- 使用 Mesh -->
<model name="mesh_terrain">
<static>true</static>
<link name="terrain_link">
<collision name="terrain_collision">
<geometry>
<mesh>
<uri>file://models/terrain.obj</uri>
<scale>1 1 1</scale>
</mesh>
</geometry>
</collision>
<visual name="terrain_visual">
<geometry>
<mesh>
<uri>file://models/terrain.obj</uri>
<scale>1 1 1</scale>
</mesh>
</geometry>
</visual>
</link>
</model>
<model name="wall">
<static>true</static>
<link name="wall_link">
<pose>0 0 1 0 0 0</pose>
<collision name="wall_collision">
<geometry>
<box>
<size>10 0.2 2</size>
</box>
</geometry>
</collision>
<visual name="wall_visual">
<geometry>
<box>
<size>10 0.2 2</size>
</box>
</geometry>
<material>
<diffuse>0.7 0.7 0.7 1</diffuse>
</material>
</visual>
</link>
<model name="obstacle_1">
<static>true</static>
<link name="link">
<pose>2 2 0.5 0 0 0</pose>
<collision>
<geometry><cylinder><radius>0.3</radius><height>1</height></cylinder></geometry>
</collision>
<visual>
<geometry><cylinder><radius>0.3</radius><height>1</height></cylinder></geometry>
<material><diffuse>0.8 0.2 0.2 1</diffuse></material>
</visual>
<model name="ball">
<pose>0 0 1 0 0 0</pose>
<link name="ball_link">
<inertial>
<mass>0.5</mass>
<inertia>
<ixx>0.001</ixx><iyy>0.001</iyy><izz>0.001</izz>
</inertia>
</inertial>
<collision>
<geometry><sphere><radius>0.2</radius></sphere></geometry>
</collision>
<visual>
<geometry><sphere><radius>0.2</radius></sphere></>
1 0 0 1
<scene>
<sky>
<clouds>
<speed>0.1</speed>
<scale>0.5</scale>
<ambient>0.8 0.8 0.8 1</ambient>
</clouds>
</sky>
</scene>
<scene>
<fog>
<color>0.8 0.8 0.8 1</color>
<density>0.01</density>
<type>linear</type>
<start>10</start>
<end>50</end>
</fog>
</scene>
<!-- 包含模型库中的模型 -->
<include>
<uri>model://pioneer2dx</uri>
<pose>0 0 0 0 0 1.57</pose>
<name>pioneer</name>
</include>
<!-- 包含本地模型 -->
<include>
<uri>file://models/my_robot.sdf</uri>
<pose>0 0 0 0 0 0</pose>
<name>my_robot</name>
</include>
<gui fullscreen='0'>
<camera name='user_camera'>
<pose>-5 -5 2 0 0.275643 2.35619</pose>
<view_controller>orbit</view_controller>
</camera>
<entity_visual>
<link>1</link>
<geometry>0 0 0 0 0 0</geometry>
</entity_visual>
</gui>
解决方案:减小 max_step_size,增加 real_time_factor
解决方案:确认 cast_shadows 设置为 true,光源强度足够