ROS1 Noetic General
Use this skill for project-agnostic ROS1 Noetic work, not only quadruped tasks.
Typical trigger phrasing includes requests like:
- - "启动机器狗"
- "启动 ROS 程序"
- "启动 ROS"
- "帮我看一下 ROS"
- "帮我编译一下这个 ROS 项目"
- "检查这个 catkin 工作区"
- "帮我把这个 launch 跑起来"
- "看看这个 ROS 节点为什么没起来"
- "build this ROS package"
- "start this ROS launch"
- "check this ROS workspace"
- "debug this ROS node"
- "use rosskill"
Routing rule inside this skill:
- - If the request is mainly general ROS knowledge (concepts, terminology, architecture, best practices), answer with ROS guidance first.
- If the request touches local files, local workspace state, local commands, build/start/launch/run/monitor/stop actions, or runtime diagnostics, use this skill's scripts and execution workflow.
- If the user explicitly says
使用 rosskill, 用 ros skill, or use rosskill, strongly prefer this skill even when the request could also be answered more generally.
When the request mentions OpenClaw, rosbridge, websocket ROS control, or remote intent mapping, load references/ros1-openclaw-adapter.md early.
Workflow
- 1. Resolve execution context and bundled resource paths.
- Validate ROS1 environment and active graph.
- Classify request into a project profile.
- Execute profile-specific checklist.
- Apply safe rollout and verification.
- Report result with reproducible commands.
Step 1: Resolve execution context first
Bundled scripts live inside this skill directory. Do not assume the current shell directory is the skill root.
- - Resolve
scripts/... and references/... relative to this SKILL.md file before using them. - If you execute a bundled script, prefer an absolute path to the script.
- If the host runtime already provides equivalent ROS inspection commands, it is fine to use those directly.
Example pattern:
CODEBLOCK0
Step 2: Validate environment
Run:
CODEBLOCK1
If ROS commands are missing, use the shell detector output to decide whether the machine expects setup.bash or setup.zsh, then source ROS first.
Typical pattern:
CODEBLOCK2
If workspace overlays exist, source base first and overlays second.
Step 3: Choose project profile
- - A. Bringup/Build: catkin workspace, package dependencies, launch files.
- B. Runtime Debug: topics/services/actions, tf tree, node health.
- C. Motion Control: velocity/joint commands with feedback checks.
- D. Data Pipeline: rosbag record/playback, offline analysis.
- E. OpenClaw Integration: rosbridge websocket adaptation and intent mapping.
- F. Architecture/Performance: nodelets, callback-threading, messagefilters, dynamicreconfigure.
- G. Migration Planning: ROS1 legacy maintenance and ROS1→ROS2 transition strategy.
Read detailed commands from references/project-profiles.md.
For full ROS1 coverage (core graph, launch, tf/tf2, actions, bags, diagnostics, networking), load references/ros1-full-scope.md.
Step 4: Execute by profile
A) Bringup/Build
- -
bringup means bringing a ROS system up far enough to run: source ROS, identify workspace, build if needed, find launch files, start nodes, and confirm the graph is healthy. - Verify workspace structure and package discoverability.
- Detect workspace/build strategy first with
scripts/ros1_workspace_probe.sh. - Run
scripts/ros1_bringup_check.sh before starting or rebuilding a project. - For OpenClaw-style tool use, prefer the runtime loop:
ros1_start_target.sh -> ros1_runtime_health_check.sh -> ros1_stop_target.sh. - Build with the detected catkin command and stop on first error.
- Discover and validate launch files before runtime.
Minimal runtime loop example:
CODEBLOCK3
B) Runtime Debug
- - Confirm graph visibility (
rosnode list, rostopic list). - Check type/rate/bandwidth for critical topics.
- Verify tf availability and frame consistency.
C) Motion Control
- - Verify command topic type and active subscribers.
- Validate critical interface types explicitly with
scripts/ros1_interface_check.sh. - Prefer closed-loop motion if distance/angle is requested.
- Keep conservative defaults and always send explicit stop.
Use interface/type checks first, then run motion script (mobile base profile):
CODEBLOCK4
D) Data Pipeline
- - Record minimal required topics (avoid “record all” unless requested).
- Confirm clock/time behavior in playback scenarios.
- Document bag metadata and replay command for reproducibility.
E) OpenClaw Integration (ROS1)
- -
rosbridge is the websocket bridge that lets OpenClaw or other external clients publish/subscribe/call into a ROS graph without writing native rospy / roscpp code. - Start ROS1 rosbridge websocket.
- Preflight the ROS graph before exposing any endpoint to OpenClaw.
- Map high-level intents to ROS1 topic/service/action operations with explicit templates.
- Enforce safety stop semantics, timeout, and disconnect behavior for every motion intent.
See references/ros1-openclaw-adapter.md.
F) Architecture / Performance
- - Enforce single-responsibility node boundaries.
- Choose queue sizes intentionally for high-rate sensor topics.
- Use
message_filters for sensor-time synchronization. - Apply callback threading patterns (
MultiThreadedSpinner / worker queue). - Use nodelets for large intra-process data when zero-copy matters.
- Use
dynamic_reconfigure for runtime tuning instead of hard-coded constants.
See references/ros1-engineering-patterns.md.
G) Migration Planning (ROS1 → ROS2)
- - Capture current ROS1 interfaces (topics/services/actions/params) before migration.
- Prefer staged migration from leaf nodes inward.
- Use bridge period planning where mixed ROS1/ROS2 runtime is required.
See references/ros1-engineering-patterns.md migration section.
Step 5: Safety and quality gates
- - Never leave a robot/controller moving on function exit.
- Add timeout for every long-running command.
- Fail fast when telemetry is stale or missing.
- Report exact measured outcome (not only “success”).
- When starting long-running processes, persist pid/log/state metadata so later health checks and stop actions can use the same handle.
- Ask for confirmation before commands that install packages, require
sudo, change system configuration, or move hardware in the real world. - Prefer dry-run inspection before any destructive or stateful ROS action.
Step 6: References
- - Official ROS docs and package index links: INLINECODE30
- Full ROS1 capability map and command matrix: INLINECODE31
- Engineering patterns & migration playbook: INLINECODE32
- Project-profile checklists and command templates: INLINECODE33
- OpenClaw↔ROS1 adapter blueprint: INLINECODE34
- ROS1 knowledge-base sources ledger (official pages reviewed): INLINECODE35
If official sites block simple fetches, use whatever browsing or browser-automation tools the host runtime actually exposes. Do not assume tool names that the host has not provided.
技能名称: ros1-noetic-general
详细描述:
ROS1 Noetic 通用技能
使用此技能处理与项目无关的ROS1 Noetic工作,不仅限于四足机器人任务。
典型的触发短语包括以下请求:
- - 启动机器狗
- 启动 ROS 程序
- 启动 ROS
- 帮我看一下 ROS
- 帮我编译一下这个 ROS 项目
- 检查这个 catkin 工作区
- 帮我把这个 launch 跑起来
- 看看这个 ROS 节点为什么没起来
- build this ROS package
- start this ROS launch
- check this ROS workspace
- debug this ROS node
- use rosskill
此技能内部的路由规则:
- - 如果请求主要是通用的ROS知识(概念、术语、架构、最佳实践),则优先以ROS指导进行回答。
- 如果请求涉及本地文件、本地工作区状态、本地命令、构建/启动/运行/监控/停止操作或运行时诊断,则使用此技能的脚本和执行工作流。
- 如果用户明确说使用 rosskill、用 ros skill 或 use rosskill,即使该请求也可以通过更通用的方式回答,也应强烈优先使用此技能。
当请求中提到 OpenClaw、rosbridge、websocket ROS控制 或 远程意图映射 时,请尽早加载 references/ros1-openclaw-adapter.md。
工作流
- 1. 解析执行上下文和捆绑的资源路径。
- 验证ROS1环境和活动图。
- 将请求分类到项目配置文件中。
- 执行特定于配置文件的检查清单。
- 应用安全部署和验证。
- 使用可复现的命令报告结果。
步骤1:首先解析执行上下文
捆绑的脚本位于此技能目录内。不要假设当前shell目录是技能根目录。
- - 在使用 scripts/... 和 references/... 之前,请相对于此 SKILL.md 文件解析它们。
- 如果执行捆绑脚本,请优先使用脚本的绝对路径。
- 如果主机运行时已经提供了等效的ROS检查命令,也可以直接使用这些命令。
示例模式:
zsh
SKILL_DIR=<此技能的绝对路径>
zsh $SKILLDIR/scripts/ros1shell_detect.sh
zsh $SKILLDIR/scripts/ros1env_check.sh
步骤2:验证环境
运行:
zsh
zsh $SKILLDIR/scripts/ros1shell_detect.sh
zsh $SKILLDIR/scripts/ros1env_check.sh
zsh $SKILLDIR/scripts/ros1graph_probe.sh topic
如果缺少ROS命令,请使用shell检测器输出来判断机器期望的是 setup.bash 还是 setup.zsh,然后先source ROS。
典型模式:
zsh
source /opt/ros/noetic/setup.zsh
如果存在工作区覆盖层,请先source基础层,再source覆盖层。
步骤3:选择项目配置文件
- - A. 启动/构建:catkin工作区、包依赖、启动文件。
- B. 运行时调试:话题/服务/动作、tf树、节点健康状态。
- C. 运动控制:带反馈检查的速度/关节指令。
- D. 数据管道:rosbag录制/回放、离线分析。
- E. OpenClaw集成:rosbridge websocket适配和意图映射。
- F. 架构/性能:nodelet、回调线程、messagefilters、dynamicreconfigure。
- G. 迁移规划:ROS1遗留维护和ROS1→ROS2过渡策略。
从 references/project-profiles.md 中读取详细命令。
如需完整的ROS1覆盖范围(核心图、启动、tf/tf2、动作、bag、诊断、网络),请加载 references/ros1-full-scope.md。
步骤4:按配置文件执行
A) 启动/构建
- - bringup 意味着将ROS系统启动到足以运行的程度:source ROS、识别工作区、必要时构建、查找启动文件、启动节点并确认图是健康的。
- 验证工作区结构和包的可发现性。
- 首先使用 scripts/ros1workspaceprobe.sh 检测工作区/构建策略。
- 在启动或重建项目之前,运行 scripts/ros1bringupcheck.sh。
- 对于OpenClaw风格的工具使用,优先使用运行时循环:ros1starttarget.sh -> ros1runtimehealthcheck.sh -> ros1stop_target.sh。
- 使用检测到的catkin命令进行构建,并在第一个错误时停止。
- 在运行时之前发现并验证启动文件。
最小运行时循环示例:
zsh
zsh $SKILLDIR/scripts/ros1start_target.sh \
--workspace /path/to/ws \
--package my_pkg \
--launch demo.launch
zsh $SKILLDIR/scripts/ros1runtimehealthcheck.sh \
--state-file /tmp/ros1skillruntime//state.env \
--expect-topic /rosout
zsh $SKILLDIR/scripts/ros1stop_target.sh \
--state-file /tmp/ros1skillruntime//state.env
B) 运行时调试
- - 确认图可见性(rosnode list、rostopic list)。
- 检查关键话题的类型、速率和带宽。
- 验证tf可用性和帧一致性。
C) 运动控制
- - 验证指令话题类型和活跃订阅者。
- 使用 scripts/ros1interfacecheck.sh 显式验证关键接口类型。
- 如果请求了距离/角度,优先使用闭环运动。
- 保持保守的默认值,并始终发送显式停止。
先使用接口/类型检查,然后运行运动脚本(移动基座配置文件):
zsh
zsh $SKILLDIR/scripts/ros1interfacecheck.sh topic /cmdvel geometry_msgs/Twist
python3 $SKILLDIR/scripts/moveforwardbyodom.py \
--cmd-topic /cmd_vel \
--odom-topic /odom \
--distance 1.0 \
--speed 0.2
D) 数据管道
- - 录制最少必需的话题(除非请求,否则避免“录制所有”)。
- 在回放场景中确认时钟/时间行为。
- 记录bag元数据和回放命令以确保可复现性。
E) OpenClaw集成(ROS1)
- - rosbridge 是websocket桥接器,允许OpenClaw或其他外部客户端发布/订阅/调用ROS图,而无需编写原生的 rospy / roscpp 代码。
- 启动ROS1 rosbridge websocket。
- 在向OpenClaw暴露任何端点之前,先对ROS图进行预检。
- 使用显式模板将高级意图映射到ROS1话题/服务/动作操作。
- 对每个运动意图强制执行安全停止语义、超时和断开连接行为。
参见 references/ros1-openclaw-adapter.md。
F) 架构/性能
- - 强制执行单一职责的节点边界。
- 为高频率传感器话题有意选择队列大小。
- 使用 messagefilters 进行传感器时间同步。
- 应用回调线程模式(MultiThreadedSpinner / 工作队列)。
- 当零拷贝很重要时,对大型进程内数据使用nodelet。
- 使用 dynamicreconfigure 进行运行时调优,而不是硬编码常量。
参见 references/ros1-engineering-patterns.md。
G) 迁移规划(ROS1 → ROS2)
- - 在迁移前捕获当前的ROS1接口(话题/服务/动作/参数)。
- 优先从叶节点向内进行分阶段迁移。
- 在需要混合ROS1/ROS2运行时的情况下,使用桥接期规划。
参见 references/ros1-engineering-patterns.md 的迁移部分。
步骤5:安全和质量门控
- - 绝不在函数退出时让机器人/控制器保持运动状态。
- 为每个长时间运行的命令添加超时。
- 当遥测数据过时或缺失时,快速失败。
- 报告精确的测量结果(不仅仅是“成功”)。
- 启动长时间运行的进程时,持久化pid/日志/状态元数据,以便后续的健康检查和停止操作可以使用相同的句柄。
- 在安装包、需要 sudo、更改系统配置或在实际世界中移动硬件的命令之前,请求确认。
- 在任何破坏性或状态性ROS操作之前,优先进行预演检查。
步骤6:参考资料
- - 官方ROS文档和包索引链接:references/official-docs.md
- 完整的ROS1能力图和命令矩阵:references/ros1-full-scope.md
- 工程模式和迁移手册:references/ros1-engineering-pattern