ワンクリックで
urdf-geometry
Guide for creating appropriate geometry in URDF files - basic shapes vs OpenSCAD vs mesh files
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Guide for creating appropriate geometry in URDF files - basic shapes vs OpenSCAD vs mesh files
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | urdf-geometry |
| description | Guide for creating appropriate geometry in URDF files - basic shapes vs OpenSCAD vs mesh files |
This skill helps you choose and create the right type of geometry for robot links in URDF files.
Use this skill when:
Basic geometry types in URDF:
<box size="x y z"/> - Rectangular boxes<cylinder radius="r" length="l"/> - Cylinders<sphere radius="r"/> - SpheresUse basic geometry when:
Example:
<link name="base_link">
<visual>
<geometry>
<box size="0.5 0.3 0.1"/>
</geometry>
<material name="gray">
<color rgba="0.7 0.7 0.7 1"/>
</material>
</visual>
<collision>
<geometry>
<box size="0.5 0.3 0.1"/>
</geometry>
</collision>
</link>
If basic geometry won't work, you have two options:
Use OpenSCAD when:
Advantages:
Process:
meshes/ folder)Example:
// meshes/custom_bracket.scad
module bracket(width=50, height=30, thickness=5) {
difference() {
// Main body
cube([width, height, thickness]);
// Mounting holes
translate([10, height/2, 0])
cylinder(h=thickness, r=3);
translate([width-10, height/2, 0])
cylinder(h=thickness, r=3);
}
}
bracket(width=60, height=40, thickness=6);
<!-- Reference in URDF -->
<link name="mounting_bracket">
<visual>
<geometry>
<mesh filename="package://my_robot/meshes/custom_bracket.stl"/>
</geometry>
</visual>
</link>
Use existing meshes when:
Supported formats:
.stl - Standard Tessellation Language (most common).dae - COLLADA (supports colors and textures).glb/.gltf - GL Transmission FormatImportant checks:
package://robot_name/meshes/part.stlExample:
<link name="sensor_housing">
<visual>
<geometry>
<mesh filename="package://my_robot/meshes/housing.stl" scale="0.001 0.001 0.001"/>
</geometry>
</visual>
</link>
Before creating custom OpenSCAD code, check for existing libraries:
Common OpenSCAD libraries:
Check available libraries:
Example using MCAD:
include <MCAD/motors.sh>
use <MCAD/gears.scad>
// Use predefined motor mount
motorWidth = 28;
motorHeight = 46;
motorLength = 42;
stepper_motor_mount(28);
Visual geometry:
Collision geometry:
Example:
<link name="gripper">
<!-- Detailed visual -->
<visual>
<geometry>
<mesh filename="package://my_robot/meshes/gripper_detailed.stl"/>
</geometry>
</visual>
<!-- Simple collision (box approximation) -->
<collision>
<geometry>
<box size="0.08 0.12 0.05"/>
</geometry>
</collision>
</link>
meshes/ directory, OpenSCAD in scad/ or meshes/❌ Don't:
✅ Do:
User request: "I need a wheel for my robot"
Decision process:
Response:
For a basic wheel, I'll use a cylinder:
```xml
<link name="wheel">
<visual>
<geometry>
<cylinder radius="0.1" length="0.05"/>
</geometry>
<material name="black">
<color rgba="0.1 0.1 0.1 1"/>
</material>
</visual>
<collision>
<geometry>
<cylinder radius="0.1" length="0.05"/>
</geometry>
</collision>
</link>
If you need a more detailed wheel with treads, I can create an OpenSCAD file. Would you like me to do that?
## Extension Integration
This skill works with the URDF editor's features:
- **Auto-conversion**: .scad files automatically convert to .stl
- **Preview**: See geometry in 3D immediately
- **Library discovery**: Access to configured OpenSCAD libraries
- **Validation**: Schema validation ensures correct URDF syntax
## Summary
**Decision flow:**
1. Basic geometry (box/cylinder/sphere)? → Use it
2. Need custom shape? → Ask user → Create OpenSCAD file
3. Have existing mesh? → Verify existence → Reference it
4. Always use simple collision geometry
5. Test with preview command
Use this skill when modifying OpenSCAD files where the user wants to use the customizer features (parameter parsing, UI generation, and conversion to STL/SVG/GLB with parameter overrides).
Use this skill when modifying OpenSCAD files (*.scad)
Use when creating URDF or Xacro files which require non-trivial geometry
Discover, recommend, and install OpenSCAD libraries for your projects. Use when: needing geometry functions, seeking existing modules before creating, managing library dependencies, or exploring what libraries are available in your workspace.
Core URDF/Xacro syntax, joint types, kinematic structures, and URDF validation for robot descriptions
Convert URDF files to Xacro format with macros for reusable components like wheels, sensors, and repeated geometry