用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/MIUAV/vibe-coding-ros2 --skill rl-environments命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | rl-environments |
| description | PyBullet RL 环境技能 - Gymnasium 环境、奖励函数、并行训练 |
| argument-hint | PyBullet RL OR Gymnasium环境 OR 强化学习 |
| user-invocable | true |
用于创建 PyBullet 强化学习环境
当需要以下帮助时使用此技能:
pip install pybullet gymnasium
import gymnasium as gym
import pybullet as p
import pybullet_data
class MyEnv(gym.Env):
def __init__(self):
super().__init__()
self.client = p.connect(p.DIRECT)
p.setAdditionalSearchPath(pybullet_data.getDataPath())
def reset(self, seed=None):
p.resetSimulation()
p.loadURDF("plane.urdf")
return obs, info
def step(self, action):
p.stepSimulation()
return obs, reward, done, info
def compute_reward(self):
distance = np.linalg.norm(self.agent_pos - self.target_pos)
return -distance