Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill urdf-xacro-creation명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SKILL.md 표시 중
| name | urdf-xacro-creation |
| description | URDF/Xacro 创建技能 - URDF 语法、宏定义、传输配置、ROS2 控制器 |
| argument-hint | URDF OR xacro OR robot_description OR URDF创建 |
| user-invocable | true |
机器人 URDF/Xacro 模型创建
当需要以下帮助时使用此技能:
<!-- robot.urdf -->
<?xml version="1.0"?>
<robot name="robot_name">
<!-- 链接定义 -->
<link name="base_link">
<visual>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.5 0.5 0.2"/>
</geometry>
<material name="blue">
<color rgba="0 0 0.8 1"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<box size="0.5 0.5 0.2"/>
</geometry>
</collision>
<inertial>
<mass value="10.0"/>
<origin xyz="0 0 0" rpy="0 0 0"/>
<inertia ixx="0.1" ixy="0" ixz="0" iyy="0.1" iyz="0" izz="0.1"/>
</inertial>
</link>
<!-- 关节定义 -->
<joint name="joint1" type="revolute">
<parent link="base_link"/>
<child link="link1"/>
<origin xyz="0.25 0 0" rpy="0 0 0"/>
<axis xyz="0 0 1"/>
<limit lower="-3.14" upper="3.14" effort="100" velocity="10"/>
<dynamics damping="0.7" friction="0.5"/>
</joint>
<!-- 传输 -->
<transmission name="joint1_trans">
<type>transmission_interface/SimpleTransmission</type>
<joint name="joint1">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
</joint>
<actuator name="motor1">
<hardwareInterface>hardware_interface/EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
</robot>
<!-- robot.xacro -->
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- 常量定义 -->
<xacro:property name="PI" value="3.14159"/>
<xacro:property name="robot_name" value="my_robot"/>
<!-- 宏定义 -->
<xacro:macro name="box_inertia" params="mass width height depth *origin">
<inertial>
<xacro:insert_block name="origin"/>
<mass value="${mass}"/>
<inertia ixx="${mass/12*(height**2 + depth**2)}"
iyy="${mass/12*(width**2 + depth**2)}"
izz="${mass/12*(width**2 + height**2)}"/>
</inertial>
</xacro:macro>
<!-- 包含其他文件 -->
<xacro:include filename="$(find my_robot_description)/urdf/materials.xacro"/>
<!-- 条件参数 -->
< =>
# config/robot_controllers.yaml
controller_manager:
ros__parameters:
update_rate: 100
joint_trajectory_controller:
type: joint_trajectory_controller/JointTrajectoryController
joint_state_broadcaster:
type: joint_state_broadcaster/JointStateBroadcaster
joint_trajectory_controller:
ros__parameters:
joints:
- joint1
- joint2
command_interfaces:
- position
state_interfaces:
- position
- velocity
SOC 직업 분류 기준