Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
직접 명령은 검토 Prompt를 거치지 않습니다. 실행하기 전에 소스를 확인하세요.
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill robot-sim명령은 한 줄로 유지됩니다. 복사하기 전에 가로로 스크롤해 전체 내용을 확인하세요.
로컬 사본을 원하시나요? SkillsMP에서 현재 제공할 수 있는 파일을 다운로드하세요.
SOC 직업 분류 기준
SKILL.md 표시 중
| name | robot-sim |
| description | Isaac Lab 机器人仿真技能 - 机器人配置、关节控制、物理模拟 |
| argument-hint | Isaac Lab机器人 OR 机器人仿真 OR 关节控制 |
| user-invocable | true |
用于在 Isaac Lab 中配置和控制机器人
当需要以下帮助时使用此技能:
from isaaclab.assets import RobotCfg
robot_cfg = RobotCfg(
name="my_robot",
usd_path="/path/to/robot.usd",
articulation_props=ArticulationCfg(
solver_type="Featherstone",
activate_warmstart=True,
stiffness={".*": 500.0},
damping={".*": 50.0}
)
)
from isaaclab.assets import RigidBodyCfg, ArticulationCfg
robot_cfg = RobotCfg(
name="my_robot",
usd_path="/path/to/robot.usd",
articulation_props=ArticulationCfg(
# 仿真参数
solver_type="Featherstone",
dt=0.005,
# 关节刚度和阻尼
stiffness={
".*": 500.0 # 所有关节
},
damping={
"joint_1": 10.0,
"joint_2": 20.0
},
# 位置/速度限制
position_limits={
"joint_1": (-1.5, 1.5),
"joint_2": (-2.0, 2.0)
},
velocity_limits={
".*": 10.0 # rad/s
},
effort_limits={
".*": 100.0 # Nm
}
)
)
from isaaclab.controllers import DifferentialIKController
controller = DifferentialIKController(
cfg=DifferentialIKControllerCfg(
command_type="position",
ik_solver="dls",
num_steps=10
)
)
# 设置目标位置
controller.set_goal(target_position)
# 更新
joint_pos = robot.data.joint_pos
joint_pos_desired = controller.compute(
robot.data.joint_pos,
robot.data.joint_vel
)
# 简单的 PD 控制器
kp = 100.0 # 比例增益
kd = 10.0 # 微分增益
def pd_control(target_pos, current_pos, current_vel):
error = target_pos - current_pos
torque = kp * error - kd * current_vel
return torque
# 设置关节力矩
robot.set_joint_effort(effort)
# 或者使用动作
action = torch.zeros(num_envs, num_joints)
action[:, joint_index] = 10.0 # 10 Nm
env.step(action)
解决方案:增加阻尼,调整控制增益