webots
Webots 机器人仿真开发技能 - 机器人建模、控制器开发、传感器配置、ROS/ROS2 集成
от MIUAV★ 30 звёзд на GitHub
Установить webots в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Webots Robot Simulation Skill
用于 Webots 机器人仿真环境的配置和开发
何时使用
当需要以下帮助时使用此技能:
- 安装和配置 Webots
- 创建机器人模型
- 编写控制器代码
- 配置传感器和执行器
- 集成 ROS/ROS2
快速参考
安装 Webots
# 下载 Webots
# https://cyberbotics.com/#download
# Ubuntu 安装
sudo apt install ./webots_*.deb
# 或使用 AppImage
chmod +x webots.AppImage
./webots.AppImage
启动 Webots
# 从命令行启动
webots
# 打开特定世界文件
webots /path/to/world.wbt
项目结构
my_project/
├── worlds/
│ └── my_robot.wbt # 世界文件
├── protos/
│ └── MyRobot.proto # 自定义 PROTO 定义
├── controllers/
│ ├── my_controller/ # 控制器目录
│ │ ├── my_controller.c # C 控制器
│ │ ├── Makefile
│ │ └── (其他文件)
│ └── python_controller/ # Python 控制器
│ └── robot.py
└── libraries/
└── (外部库)
创建机器人模型
基本 PROTO 文件
PROTO MyRobot [
field SFVec3f translation 0 0 0
field SFRotation rotation 0 1 0 0
field SFString name "my_robot"
field SFFloat wheelRadius 0.1
]
{
Robot {
translation IS translation
rotation IS rotation
name IS name
children [
# 主体
Shape {
appearance Appearance {
material Material {
diffuseColor 0.3 0.3 0.3
}
}
geometry Box {
size 0.5 0.3 0.1
}
}
# 轮子
HingeJoint {
jointParameters HingeJointParameters {
anchor 0.2 0.15 0
}
device Slot {
device Slot {
wheel Motor {
maxVelocity 10
}
}
}
endPoint Solid {
children [
Shape {
appearance Appearance {
material Material { diffuseColor 0.1 0.1 0.1 }
}
geometry Cylinder {
height 0.05
radius 0.1
}
}
]
boundingObject Box {
size 0.1 0.1 0.05
}
}
}
]
controller "my_controller"
boundingObject Box {
size 0.5 0.3 0.1
}
}
}
完整机器人示例 - 差速驱动
PROTO DiffDriveRobot [
field SFVec3f translation 0 0 0.1
field SFRotation rotation 0 1 0 0
field SFString name "diff_drive"
field SFFloat wheelRadius 0.1
field SFFloat axleLength 0.3
]
{
Robot {
translation IS translation
rotation IS rotation
name IS name
children [
# 主体
Solid {
children [
Shape {
appearance Appearance {
material Material {
diffuseColor 0.4 0.4 0.8
}
}
geometry Box {
size 0.4 0.3 0.1
}
}
]
}
# 左轮
HingeJoint {
jointParameters HingeJointParameters {
anchor 0 0.15 0
axis 1 0 0
}
device Slot {
device Slot {
wheel Motor {
maxVelocity 10
maxTorque 10
}
}
}
endPoint Solid {
children [
Shape {
appearance Appearance {
material Material { diffuseColor 0.2 0.2 0.2 }
}
geometry Cylinder {
height 0.05
radius IS wheelRadius
}
}
]
boundingObject Cylinder {
height 0.05
radius IS wheelRadius
}
}
}
# 右轮
HingeJoint {
jointParameters HingeJointParameters {
anchor 0 -0.15 0
axis 1 0 0
}
device Slot {
device Slot {
wheel Motor {
maxVelocity 10
maxTorque 10
}
}
}
endPoint Solid {
children [
Shape {
appearance Appearance {
material Material { diffuseColor 0.2 0.2 0.2 }
}
geometry Cylinder {
height 0.05
radius IS wheelRadius
}
}
]
boundingObject Cylinder {
height 0.05
radius IS wheelRadius
}
}
}
# 激光雷达
Lidar {
name "lidar"
translation 0.2 0 0.05
numberOfLayers 1
fieldOfView 3.14
maxRange 10
resolution 0.01
}
# 摄像头
Camera {
name "camera"
translation 0.15 0 0.05
width 640
height 480
fieldOfView 1.0
}
]
controller "my_controller"
boundingObject Box {
size 0.5 0.4 0.15
}
}
}
控制器开发
Python 控制器
# controllers/my_robot/robot.py
from controller import Robot, Camera, Lidar
class MyRobot:
def __init__(self):
self.robot = Robot()
self.time_step = int(self.robot.getBasicTimeStep())
# 获取执行器
s
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
- proto-models/SKILL.md
- robot-controllers/SKILL.md
- ros2-integration/SKILL.md
FAQ
Что делает скилл webots?
Webots 机器人仿真开发技能 - 机器人建模、控制器开发、传感器配置、ROS/ROS2 集成
Как установить скилл webots?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл webots запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
AnthropicToolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
access
AnthropicManage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
configure
AnthropicSet up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
access
AnthropicManage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…