| name | ros2-skill |
| description | Controls and monitors ROS 2 robots directly via rclpy CLI. Use for ANY ROS 2 robot task: topics (subscribe, publish, capture images, find by type), services (list, call), actions (list, send goals), parameters (get, set, presets), nodes, lifecycle management, controllers (ros2_control), Nav2 navigation (go, cancel, status, waypoints, initial-pose), diagnostics, battery, system health checks, TF frames, bags, logs, and more. When in doubt, use this skill โ it covers the full ROS 2 operation surface. Never tell the user you cannot do something ROS 2-related without checking this skill first. |
| version | 1.0.8 |
| license | Apache-2.0 |
| compatibility | python3, rclpy, ROS 2 environment sourced |
| allowed-tools | ["Bash","Read"] |
| triggers | ["ros2","robot.*topic|topic.*robot","publish.*topic|subscribe.*topic|listen.*topic","move.*robot|drive.*robot|robot.*move|robot.*drive","navigate|nav2|send.*goal|waypoint","ros2_control|controller.*manager|controller.*switch","lifecycle.*node|node.*lifecycle","TF.*frame|transform.*frame|frame.*transform","ros.*param|parameter.*ros","launch.*ros|ros.*launch","bag.*record|bag.*play|ros.*bag","ros.*log|node.*log","estop|emergency.*stop|stop.*robot","camera.*ros|ros.*camera|capture.*image.*robot","ros.*doctor|health.*check.*ros"] |
| metadata | {"openclaw":{"emoji":"๐ค","requires":{"bins":["python3","ros2"],"pip":["rclpy"]},"category":"robotics","tags":["ros2","robotics","rclpy"]},"author":["adityakamath","lpigeon"]} |
ROS 2 Skill
โ ๏ธ ATTENTION โ READ FIRST. This block overrides any conflicting instinct or rationalisation below.
If profile show returns a non-empty summary, the session is Path A. In Path A:
- Do not run
topics find, topics type, tf list (for frame names), services find, or a params list velocity-limit sweep for any data the profile already holds. This is a Rule 14 violation, not "extra safety".
- The profile fields are the source of truth for:
cmd_vel_topic, velocity message type, odometry topic, velocity safety limits, TF frame names, controller names, e-stop service, joint names.
- The only live calls allowed before motion in Path A: (1)
control list-controllers for runtime active/inactive state, (2) one odom subscribe for the stationary check, (3) interface proto <VEL_TYPE> once per session for the payload template, (4) optional topics hz if you have not yet seen the odom rate.
- Forbidden rationalisations (if you find yourself thinking any of these, you are violating Rule 13 โ stop and use the profile):
- "Maximum safety requires live introspection."
- "This catches runtime changes the profile might miss."
- "The profile is just a reference for static info; control and safety checks must be done live."
- "Profile data alone is never enough for actuation."
- "Using the profile is justified because it was just rescanned / because it is fresh." โ The profile is the source of truth for static data always in Path A, not just when fresh. If you think the profile might be stale, run Rule 0.0b escalation (compare to live graph and stop on disagreement); do not bypass with live discovery.
- The single test before any introspection: "Is this field present in the profile?" โ yes โ use it; no โ fall back to live for that one field only (Rule 0.0a); disagrees with live graph โ stop and escalate (Rule 0.0b). The path does not flip.
Detailed Path A operational rules: see "Path A operational summary" section below. Authoritative rules: references/RULES-CORE.md Rule 13 + Rule 14, references/RULES-MOTION.md Rule 3 Step 1.
Structural enforcement (since v1.0.8): the CLI itself refuses topics find / services find calls that violate Path A. The refusal JSON names the matching profile field. profile show always includes a path_a_reminder block listing forbidden commands and the profile fields that replace them. Read that block at session start โ it is the contract. If the guard refuses a call you genuinely need (Path B / debug), pass --ignore-profile; that override is logged.
Provides a structured JSON interface to a live ROS 2 robot. All commands output JSON. Every skill invocation follows three mandatory phases: resolve โ act โ verify. Resolve means: read every static field (topic names, message types, limits, frame names, controller names) from the profile first (Path A) and run a live call only when (a) the profile is absent / does not have that field (Path B / Rule 0.0a), or (b) the value is dynamic runtime state โ controller active/inactive, robot stationary, payload template, odom rate. "Resolve" is not a synonym for "introspect everything live" โ in Path A it collapses to zero live calls for profile-covered fields. Act issues the command. Verify reads post-action state. Never skip any phase, and never expand "resolve" into full live discovery when Path A is active.
Entry Point
Always use ros2_cli.py. Never call ros2 directly or run submodules directly.
python3 {baseDir}/scripts/ros2_cli.py <command> [subcommand] [args]
python3 {baseDir}/scripts/ros2_cli.py --help
python3 {baseDir}/scripts/ros2_cli.py <command> --help
{baseDir} is the path to the skill root directory. Resolve it from the skill metadata before running any command.
Session Start Checklist
Run once per session before the first task. Takes seconds. Catches the most common silent failures.
python3 {baseDir}/scripts/ros2_cli.py doctor
python3 {baseDir}/scripts/ros2_cli.py daemon status
python3 {baseDir}/scripts/ros2_cli.py daemon start
python3 {baseDir}/scripts/ros2_cli.py topics find rosgraph_msgs/msg/Clock
python3 {baseDir}/scripts/ros2_cli.py lifecycle nodes
python3 {baseDir}/scripts/ros2_cli.py context
python3 {baseDir}/scripts/ros2_cli.py profile show
Stop and tell the user if Step 1 reports critical failures. Re-run Step 3 before every timed command in simulation.
Path A operational summary (READ BEFORE EVERY ACTION when profile is loaded)
When profile show returned a non-empty summary at Step 7, the session is Path A. In Path A, the profile is the source of truth for static data โ running live discovery for data the profile already holds is a rule violation (Rule 14), not extra safety.
Use directly from the profile โ zero live calls:
| Need | Profile field | Forbidden in Path A |
|---|
| Velocity command topic | summary.cmd_vel_topic | topics find geometry_msgs/msg/Twist, topics find geometry_msgs/msg/TwistStamped |
| Velocity message type | summary.velocity_topics[].type (entry matching cmd_vel_topic) | topics type <topic> |
| Odometry topic | first value of summary.localization_config.fused_sources | topics find nav_msgs/msg/Odometry |
| Velocity safety ceiling | summary.safety_limits.binding.{linear_x,linear_y,angular_z} | nodes list + params list sweep for max/limit/vel/speed/accel |
| TF frame names | summary.tf_frames.{odom_frame,base_frame,map_frame} | tf list for frame names |
| Controller names | summary.active_controllers | using control list-controllers to discover controller names (still required to check runtime state โ see below) |
| E-stop service | summary.estop_config.service_name | services find std_srvs/srv/SetBool |
| Joint names / order / index | summary.hardware_interfaces[].joints, summary.joint_limits | params get /controller_manager:joints, parsing robot_description |
The only live calls still mandatory before motion in Path A (these read runtime state, which the profile cannot know):
control list-controllers โ confirm the controller named in summary.active_controllers is active right now.
- Subscribe
<ODOM_TOPIC> --max-messages 1 --timeout 2 โ confirm robot is stationary (Rule 9). This double-serves as a liveness check on the odom topic.
interface proto <VEL_TYPE> โ once per session, get the payload template (the type came from the profile, but the field layout did not).
- Optional:
topics hz <ODOM_TOPIC> --duration 2 if publish-until is being used and you have not confirmed odom rate this session.
Path A violation โ worked counterexample (what NOT to do):
User request: "drive forward 1 m". Profile is loaded.
โ topics find geometry_msgs/msg/Twist # Rule 14: profile has cmd_vel_topic
โ topics find geometry_msgs/msg/TwistStamped # Rule 14: profile has velocity_topics[].type
โ topics find nav_msgs/msg/Odometry # Rule 14: profile has fused_sources
โ topics type <discovered_topic> # Rule 14: profile has the type
โ nodes list && params list <each-node> # Rule 14: profile has safety_limits.binding
Cost of the violation: 5โ30 seconds wasted, and if any topics find returns a topic that disagrees with the profile, the agent will silently use the live answer โ masking the disagreement that Rule 0.0b is specifically designed to surface. Live discovery in Path A is not "extra safety"; it actively hides safety-relevant mismatches and delays the command.
Correct Path A motion sequence:
โ
Read VEL_TOPIC, VEL_TYPE, ODOM_TOPIC, MAX_VEL, MAX_ANG from profile (0 live calls)
โ
interface proto <VEL_TYPE> (1 live call, once/session)
โ
control list-controllers (1 live call โ runtime state)
โ
topics subscribe <ODOM_TOPIC> --max-messages 1 --timeout 2 (1 live call โ stationary + liveness)
โ
topics publish-until <VEL_TOPIC> '<payload>' --monitor <ODOM_TOPIC> (the actual command)
โ
topics subscribe <ODOM_TOPIC> --max-messages 1 --timeout 2 (post-motion verify, Rule 8)
3 live calls before the command + 1 after. Not the 6โ9 live discovery calls of Path B.
If a profile field is missing (Rule 0.0a): fall back to live discovery for that one field only โ the path does not flip. Other fields stay on the profile.
If a profile field's value disagrees with the live graph (e.g., summary.cmd_vel_topic is not in topics list): stop and escalate per Rule 0.0b. Do not silently retry with live discovery.
Critical Rules
Read the domain-specific rule files from references/ before the first action. These are hard constraints โ not guidelines. Use references/RULES.md as the index to find the right file. Always load at session start: RULES-CORE.md, RULES-PREFLIGHT.md, and RULES-MOTION.md. Add RULES-DIAGNOSTICS.md when something fails. Key principles:
-
Two-Path Model โ profile first, live fallback. Path A (profile loaded) uses profile fields for static data and live calls only for runtime state; Path B (no profile) does full live introspection. Path is fixed for the session, decided once at Step 7. Never hardcode names, types, or limits. Full guardrails (field-presence rules, exact field names, escalation on runtime mismatch, auto-rescan gating, scan triggers) live in RULES-PREFLIGHT.md Rules 0.0, 0.0a, 0.0b, 0.6, 0.7 and RULES-CORE.md Rules 13, 14.
-
Get the payload template. Before publishing or calling: interface proto <msg_type>. Copy the output. Modify only the fields the task requires. For non-primitive nested fields, run interface show <nested_type> recursively until all leaf fields are primitives.
-
Verify every effect. A zero-error CLI response means the request was delivered โ not that the effect occurred. Always follow up: params get, control list-controllers, subscribe to confirm, etc.
-
Diagnose before reporting. On any error: introspect โ self-correct โ retry โ report. Never ask the user to interpret an error you can check with the CLI.
-
Safety is non-negotiable. Velocity limits, pre-motion odom checks, and post-motion verify are mandatory. Never bypass them.
-
Context discovery is parallel. When discovering multiple independent facts (velocity topic, odom topic, limits, controller state), issue all commands simultaneously โ never sequentially.
Common Operations
Introspection
python3 {baseDir}/scripts/ros2_cli.py context
python3 {baseDir}/scripts/ros2_cli.py context --include-schemas
python3 {baseDir}/scripts/ros2_cli.py topics list [--limit N]
python3 {baseDir}/scripts/ros2_cli.py topics find geometry_msgs/msg/Twist
python3 {baseDir}/scripts/ros2_cli.py topics find nav_msgs/msg/Odometry
python3 {baseDir}/scripts/ros2_cli.py topics type <topic>
python3 {baseDir}/scripts/ros2_cli.py topics details <topic>
python3 {baseDir}/scripts/ros2_cli.py topics hz <topic>
python3 {baseDir}/scripts/ros2_cli.py nodes list
python3 {baseDir}/scripts/ros2_cli.py services list
python3 {baseDir}/scripts/ros2_cli.py actions list
python3 {baseDir}/scripts/ros2_cli.py tf list
Publishing
Path A (profile loaded): resolve <VEL_TOPIC> and <VEL_TYPE> from the profile โ do NOT run topics find / topics type. See "Path A operational summary" above.
python3 {baseDir}/scripts/ros2_cli.py interface proto <VEL_TYPE>
python3 {baseDir}/scripts/ros2_cli.py topics publish <VEL_TOPIC> '<json matching VEL_TYPE>' \
--max-vel <MAX_VEL> --max-ang <MAX_ANG>
python3 {baseDir}/scripts/ros2_cli.py topics publish-until <VEL_TOPIC> \
'<json matching VEL_TYPE>' \
--monitor <ODOM_TOPIC> --field pose.pose.position --euclidean --delta 1.0 --timeout 60 \
--max-vel <MAX_VEL> --max-ang <MAX_ANG>
python3 {baseDir}/scripts/ros2_cli.py topics publish-until <VEL_TOPIC> \
'<json with angular.z = +omega>' \
--monitor <ODOM_TOPIC> --rotate 90 --degrees --timeout 30 \
--max-vel <MAX_VEL> --max-ang <MAX_ANG>
python3 {baseDir}/scripts/ros2_cli.py topics subscribe <topic> --max-messages 1 --timeout 5
python3 {baseDir}/scripts/ros2_cli.py topics echo-once <topic> [--timeout 5]
--max-vel N / --max-ang N (Twist / TwistStamped only): clamp linear x/y/z to ยฑN m/s and angular.z to ยฑN rad/s inside the CLI before the message is sent. Pass summary.safety_limits.binding.linear_x / .angular_z from the profile (Path A) or the Rule 28 limit-scan result (Path B). Clamped axes are reported in velocity_clamped in the JSON output. Other message types pass through unchanged.
Services and Actions
python3 {baseDir}/scripts/ros2_cli.py services details <service>
python3 {baseDir}/scripts/ros2_cli.py services call <service> '<json>'
python3 {baseDir}/scripts/ros2_cli.py actions details <action>
python3 {baseDir}/scripts/ros2_cli.py actions send <action> '<json>' --timeout 60
python3 {baseDir}/scripts/ros2_cli.py actions cancel <goal_id>
Parameters
python3 {baseDir}/scripts/ros2_cli.py params list <node>
python3 {baseDir}/scripts/ros2_cli.py params describe <node:param>
python3 {baseDir}/scripts/ros2_cli.py params get <node:param>
python3 {baseDir}/scripts/ros2_cli.py params set <node:param> <value>
Controllers and Lifecycle
python3 {baseDir}/scripts/ros2_cli.py control list-controllers
python3 {baseDir}/scripts/ros2_cli.py control list-hardware-components
python3 {baseDir}/scripts/ros2_cli.py control switch-controllers --activate <name> --deactivate <name>
python3 {baseDir}/scripts/ros2_cli.py lifecycle nodes
python3 {baseDir}/scripts/ros2_cli.py lifecycle get <node>
python3 {baseDir}/scripts/ros2_cli.py lifecycle set <node> activate
Camera and Images
python3 {baseDir}/scripts/ros2_cli.py topics find sensor_msgs/msg/CameraInfo
python3 {baseDir}/scripts/ros2_cli.py topics subscribe <camera_info_topic> --max-messages 1 --timeout 2
python3 {baseDir}/scripts/ros2_cli.py topics capture-image --topic <camera_topic> --output {baseDir}/.artifacts/<name>.jpg
python3 {baseDir}/scripts/ros2_cli.py topics capture-image --topic <camera_topic> --output {baseDir}/.artifacts/<name>.jpg --no-profile
python3 {baseDir}/scripts/ros2_cli.py topics depth-point --topic <depth_topic> --u <col> --v <row>
Diagnostics and Health
python3 {baseDir}/scripts/ros2_cli.py doctor
python3 {baseDir}/scripts/ros2_cli.py doctor hello
python3 {baseDir}/scripts/ros2_cli.py topics diag
python3 {baseDir}/scripts/ros2_cli.py topics battery
Launch
python3 {baseDir}/scripts/ros2_cli.py launch list <keyword>
python3 {baseDir}/scripts/ros2_cli.py launch new <package> <launch_file>
python3 {baseDir}/scripts/ros2_cli.py launch new <package> <launch_file> use_sim_time:=true
python3 {baseDir}/scripts/ros2_cli.py launch new <package> <launch_file> use_sim_time:=true robot_name:=my_bot
python3 {baseDir}/scripts/ros2_cli.py launch new <package> <launch_file> --param use_sim_time:=true,robot_name:=my_bot
python3 {baseDir}/scripts/ros2_cli.py launch new <package> <launch_file> --config-path /path/to/config.yaml
python3 {baseDir}/scripts/ros2_cli.py launch new <package> <launch_file> --preset my_preset
python3 {baseDir}/scripts/ros2_cli.py launch list
python3 {baseDir}/scripts/ros2_cli.py launch kill <session>
python3 {baseDir}/scripts/ros2_cli.py launch restart <session>
Priority order (ROS 2 last-wins): positional args > --param > --preset. Positional args always win on conflict.
--config-path is independent of the priority stack โ it adds --ros-args --params-file <file> to launched nodes; it does not set launch arguments.
Duplicate detection: if the same package + launch file is already running, a warning with existing_session is returned instead of launching again.
Log Introspection
Works without a live ROS 2 graph โ reads ~/.ros/log/ (or $ROS_LOG_DIR).
python3 {baseDir}/scripts/ros2_cli.py logs list-runs [--limit 20]
python3 {baseDir}/scripts/ros2_cli.py logs query [--run <id>] [--severity WARN] \
[--node <name>] [--after -30s] [--before -5m] [--text <substr>] [--regex <pat>] \
[--max 200]
python3 {baseDir}/scripts/ros2_cli.py logs tail [--run <id>] [--initial-lines 50] \
[--reset]
python3 {baseDir}/scripts/ros2_cli.py logs node-summary [--run <id>] [--top 5]
Time filter formats for --after / --before: -30s, -5m, -2h (relative to now), epoch float, or ISO datetime (2026-04-30T10:00:00).
logs tail workflow: Call once to seed offsets (returns last ~50 lines); call again during the run to get only new entries. Use --reset to re-seed when switching to a new run.
Packages, Bags, and TF
python3 {baseDir}/scripts/ros2_cli.py pkg list
python3 {baseDir}/scripts/ros2_cli.py pkg prefix <package>
python3 {baseDir}/scripts/ros2_cli.py pkg executables <package>
python3 {baseDir}/scripts/ros2_cli.py pkg xml <package>
python3 {baseDir}/scripts/ros2_cli.py pkg create <name> [--build-type ament_cmake|ament_python|cmake] \
[--dependencies rclcpp std_msgs] [--node-name my_node] [--library-name my_lib] \
[--destination-directory /path]
python3 {baseDir}/scripts/ros2_cli.py bag info <bag_path>
python3 {baseDir}/scripts/ros2_cli.py tf list
python3 {baseDir}/scripts/ros2_cli.py tf echo <source_frame> <target_frame>
Robot Profile (no live graph required)
Build once; load every session. The profile captures robot type, packages, launch files (as filenames from the workspace), velocity topics, safety limits, and sensor flags โ eliminating per-session re-discovery.
python3 {baseDir}/scripts/ros2_cli.py profile scan [--workspace /path/to/ros2_ws] [--name my_robot]
python3 {baseDir}/scripts/ros2_cli.py profile scan --packages lekiwi
python3 {baseDir}/scripts/ros2_cli.py profile scan --packages lekiwi --name lekiwi
python3 {baseDir}/scripts/ros2_cli.py profile scan --packages lekiwi,soarm --name my_robot
python3 {baseDir}/scripts/ros2_cli.py profile scan --allow-live
python3 {baseDir}/scripts/ros2_cli.py profile scan --robot-type mobile_base
python3 {baseDir}/scripts/ros2_cli.py profile show
python3 {baseDir}/scripts/ros2_cli.py profile show --section summary
python3 {baseDir}/scripts/ros2_cli.py profile show --section detail
python3 {baseDir}/scripts/ros2_cli.py profile show --section <launch-filename>
python3 {baseDir}/scripts/ros2_cli.py profile rescan [--workspace PATH]
python3 {baseDir}/scripts/ros2_cli.py profile rescan --packages lekiwi,quest_teleop
python3 {baseDir}/scripts/ros2_cli.py profile rescan --packages ''
python3 {baseDir}/scripts/ros2_cli.py profile rescan --launch-file <launch-filename>
python3 {baseDir}/scripts/ros2_cli.py profile list
python3 {baseDir}/scripts/ros2_cli.py profile annotate "Left encoder drifts right โ apply 5% left correction to cmd_vel."
python3 {baseDir}/scripts/ros2_cli.py profile annotate "Camera faces a mirror โ image is horizontally flipped."
Profile JSON shape:
{
"summary": { โ always load; compact
โ Fields with no detected value are ABSENT (never null/[]/{}). Missing key = not detected.
"robot_type": "mobile_base", โ primary type (see types below)
"robot_features": ["pantilt"], โ supplementary features alongside primary type
"robot_type_evidence": { โ signals that drove the detected type
"mobile_base": ["topic:/cmd_vel", "ament:nav2"],
"pantilt": ["pkg:my_pantilt_driver"]
},
"packages": ["my_bringup", "my_nav"],
"launch_files": ["bringup.launch.py", "nav2_bringup.launch.py"], โ filenames from workspace; keys into detail
"urdf_files": ["/path/to/robot.urdf.xacro"], โ primary packages only; deduplicated
"velocity_topics": [{"topic": "/cmd_vel", "type": "geometry_msgs/msg/Twist"}], โ topic+type objects
"safety_limits": {
"sources": [ โ one entry per YAML config that had a velocity limit
{"file": "teleop_joy.yaml", "path": "...", "linear_x": 0.5, "linear_y": 0.3, "angular_z": 1.0},
{"file": "nav2_params.yaml", "path": "...", "linear_x": 0.3, "angular_z": 0.8}
โ axes with no limit are absent from each source entry
],
"binding": { โ most restrictive per axis across all sources + URDF
"linear_x": 0.3, "angular_z": 0.8
โ linear_y only present for holonomic robots
}
},
"has_lidar": true, "has_camera": true, "has_imu": true, "has_nav2": false,
"sensor_mounts": [ โ sensor/actuator links from URDF; unresolved xacro variables excluded
{ โ sensor_type: camera|depth_camera|lidar|imu|sonar|gps|gripper
"joint": "camera_joint", "link": "camera_link",
"sensor_type": "camera",
"xyz": [0.1, 0.0, 0.5], โ position relative to parent link
"rpy": [3.14159, 0.0, 0.0], โ orientation; roll โ ฯ โ upside-down
"image_rotation_deg": 180 โ visual sensors only; capture-image applies this
}
],
โ Drive / kinematics (present when ros2_control YAML was found)
"drive_type": "differential", โ differential|holonomic_omni|mecanum|ackermann|bicycle|tricycle
"kinematics": {"wheel_radius": 0.05, "wheel_separation": 0.2},
"controller_update_rate_hz": 100,
"cmd_vel_topic": "/base_controller/cmd_vel",
"odom_frame_ids": {"odom_frame_id": "odom", "base_frame_id": "base_link"},
"active_controllers": ["base_controller", "joint_state_broadcaster"],
"controller_plugins": ["diff_drive_controller/DiffDriveController", "joint_state_broadcaster/JointStateBroadcaster"],
โ Hardware
"hardware_interfaces": [{"name": "...", "plugin": "...", "joints": [...], "command_interfaces": [...], "state_interfaces": [...], "hardware_params": {...}}],
"mock_hardware_available": false, โ true when enable_mock_mode=true or a "mock"/"fake" launch arg exists
"imu_config": {"plugin": "...", "state_interfaces": [...], "hardware_params": {...}, "broadcaster": {"frame_id": "imu_link", "publish_rate": 100}},
โ Sensors
"lidar_config": {"topic": "/scan", "frame_id": "lidar_link"},
"camera_configs": [...],
"sensor_filter_pipeline": [{"name": "range_filter", "type": "laser_filters/LaserScanRangeFilter", "source_file": "...", "params": {...}}],
โ Navigation
"localization_config": {"method": "ekf", "frequency_hz": 50, "fused_sources": {"odom0": "/base_controller/odom"}},
"nav2_config": {"planner_plugins": [...], "controller_plugins": [...], "behavior_plugins": [...]},
"maps": [{"name": "map", "type": "occupancy", "resolution": 0.05, "image": "map.pgm", "file": "map.yaml", "path": "..."}],
โ Teleop / e-stop
"teleop_config": {"cmd_vel_topic": "/cmd_vel", "joy_topic": "/joy", "scales": {"scale_linear_x": 0.5, "scale_angular_z": 1.0}},
"estop_config": {"topic": "/e_stop", "service_type": "std_srvs/srv/SetBool", "activate_buttons": [0], "deactivate_buttons": [1]},
โ TF / launch
"tf_frames": {"urdf_links": ["base_link", "imu_link", ...], "map_frame": "map", "odom_frame": "odom", "base_frame": "base_link"},
"launch_configurations": {"config": {"default": "base", "choices": ["base", "pantilt"], "description": "..."}},
โ Package metadata
"package_dependencies": {"my_robot_bringup": ["rclpy", "nav2_bringup", ...]}
},
"annotations": [ โ user-added free-text notes; ALWAYS read at session start
{
"added_at": "2026-05-12T...",
"note": "Left motor encoder is worn โ odometry drifts right."
}
],
"detail": { โ load on demand per launch file; null-stripped like summary
"bringup.launch.py": {
"path": "...", "package": "...",
"launch_args": {
โ unified: AST defaults + live-resolved values merged; no null values
"config": {"default": "base", "choices": ["base", "k2"], "description": "hw config"},
"use_sim_time": {"default": "false"},
"serial_port": {"default": "/dev/ttySERVO", "description": "Serial port for motors"}
},
"includes": [ โ sub-launch files included by this file
{
"source": "pkg:nav2_bringup/launch/bringup_launch.py",
"package": "nav2_bringup", "file": "bringup_launch.py",
"args_forwarded": { โ "$ref" = pass-through; literal = hardcoded
"use_sim_time": "$use_sim_time",
"map_yaml_file": "$map_yaml"
}
}
],
"yaml_files": [...], "urdf_files": [...], "joint_limits": {...}
},
...
}
}
Robot type values: humanoid ยท legged ยท aerial ยท underwater ยท surface_vessel ยท mobile_manipulator ยท arm ยท mobile_base ยท unknown
Detection rules (applied strictly in this order):
- Humanoid โ specific platform package name (NAO, Atlas, Valkyrie โฆ) or โฅ 4 URDF joints with torso/neck/shoulder/elbow patterns. Generic terms like "walking"/"balance" are intentionally excluded (too broad).
- Legged โ specific quadruped/hexapod package name (Spot, Go1, ANYmal โฆ) or โฅ 4 URDF joints with FL/FR/RL/RR leg naming.
- Aerial, underwater, surface_vessel โ platform-specific package names or source keywords.
- Mobile manipulator โ both mobile-base and arm signals present.
- Arm โ arm/gripper/MoveIt package or โฅ 3 non-wheel URDF joints.
- Mobile base โ velocity topics (
/cmd_vel) or Nav2 present, or explicit diff-drive/Ackermann packages.
If detection is wrong: run profile scan --robot-type <type> to override. The evidence field always shows what matched so you can see why a type was chosen.
Use summary.safety_limits.binding.linear_x as the --max-vel ceiling and summary.safety_limits.binding.angular_z as the --max-ang ceiling (Rule 28). binding.linear_y is set for holonomic robots. sources lists every config file that contributed a limit โ useful when multiple teleop configs are present. Use summary.launch_files to see what launch files exist in the workspace; load any one's full detail with --section <filename>. Launch arg defaults and choices are always populated โ a missing default key means the argument is required with no declared default.
Output Folders
All outputs are written to hidden folders inside the skill directory. Never use /tmp.
| Folder | Contents |
|---|
{baseDir}/.artifacts/ | Captured images, logs, and all generated outputs |
{baseDir}/.presets/ | Saved parameter presets (params preset-save / params preset-load) |
{baseDir}/.profiles/ | Robot profiles |
Emergency Stop
Send immediately on any unsafe motion or unexpected robot behaviour:
python3 {baseDir}/scripts/ros2_cli.py estop
After estop: verify velocity โ 0 by subscribing <ODOM_TOPIC> --max-messages 1 --timeout 5. If velocity is still non-zero after 5 s (10 s for heavy platforms > 20 kg), escalate as critical failure.
Nav2 Navigation
Send autonomous navigation goals to the Nav2 stack (NavigateToPose action). Requires Nav2 to be running on the robot.
python3 {baseDir}/scripts/ros2_cli.py nav2 go 1.5 -0.3
python3 {baseDir}/scripts/ros2_cli.py nav2 go 1.5 -0.3 --yaw 90
python3 {baseDir}/scripts/ros2_cli.py nav2 go-waypoints 1.0,0.0 2.0,1.5 3.0,0.0
python3 {baseDir}/scripts/ros2_cli.py nav2 cancel
python3 {baseDir}/scripts/ros2_cli.py nav2 status
python3 {baseDir}/scripts/ros2_cli.py nav2 initial-pose 1.0 2.0 --yaw 45
Key flags:
--frame MAP โ coordinate frame (default: map)
--timeout 120 โ seconds to wait for goal completion (default: 120; navigation can take minutes)
--feedback โ include per-step feedback messages in output (nav2 go only)
--no-stop-on-failure โ continue waypoint sequence even if one leg fails (go-waypoints)
Output fields (nav2 go): success (bool), status (int, 4=SUCCEEDED), status_name, goal {x,y,frame}, error?
Before nav2 go: always run nav2 cancel first if a previous goal may still be active (Rule 9 pre-motion check). Use nav2 status to confirm no active goal is present.
Commands Without a Live Graph
These work without ROS running or nodes active:
| Command | Purpose |
|---|
version | Verify skill is installed and reachable |
daemon status / start / stop | Manage the ROS 2 daemon |
bag info <file> | Bag metadata (duration, message counts, per-topic stats) |
logs list-runs | List available ROS 2 log runs in the log directory |
logs query | Filter log entries by severity, node, time, text |
logs tail | Incremental log reading (new entries since last call) |
logs node-summary | Per-node log statistics for a run |
component types | List registered composable node types |
--help on any command | Inspect flags and subcommands |
pkg list / prefix / executables / xml | Package introspection |
pkg create <name> [flags] | Scaffold a new ROS 2 package |
profile scan [--workspace PATH] [--packages PATTERNS] [--robot-type TYPE] | Build robot profile; --packages lekiwi fuzzy-matches packages by name/path (comma-separated for multiple patterns); --robot-type overrides detection |
profile show [--section S] | Show saved robot profile or a section (always includes annotations) |
profile rescan [--launch-file F] [--packages PATTERNS] | Update existing profile; --packages filter is reused automatically from the saved profile unless overridden |
profile list | List all saved robot profiles |
profile annotate "note" | Append a free-text note to the profile (read at every session start) |
Reference Files
This skill uses progressive disclosure. SKILL.md covers the most common operations. Load the files below when the task requires deeper detail.
| File | When to load |
|---|
references/RULES.md | Index only โ maps each rule number to its domain file. Load first to navigate the rule set. |
references/RULES-CORE.md | Always load โ general agent conduct (Rules 0.5, 1, 2, 4โ6, 10โ13). Hard constraints that apply to every command. Includes mandatory compliance preamble and Quick Decision Card. |
references/RULES-PREFLIGHT.md | Load at session start and before any action โ full pre-flight introspection protocol (Rule 0), session-start steps 0โ6 (Rule 0.1), lifecycle/QoS/publisher checks (Rules 14, 15, 19). |
references/RULES-MOTION.md | Always load at session start (any mobile-base or arm robot may receive a motion command) โ movement algorithm (Rule 3), pre-motion check + Nav2 preemption (Rule 9), REP-103/105 (Rule 17), estop (Rule 18), decel zone (Rule 20), timeout recovery (Rule 21), command limits (Rules 22โ23), sequencing (Rule 24), proximity scan (Rule 25). Step 1 of Rule 3 is the authoritative source on the profile fast-path for motion. |
references/RULES-DIAGNOSTICS.md | Load when something fails โ failure diagnosis + log-level elevation (Rule 7), post-action verification table (Rule 8), multi-step sequencing (Rule 16), Error Recovery Protocols. |
references/RULES-REFERENCE.md | Load for command lookup โ full intentโcommand table (Step 1), sensor search by type (Steps 2โ3), message structure (Step 4), velocity limits (Step 5), Launch workflow, Discord image delivery (Rule 26), Setup. |
references/COMMANDS.md | Load when you need the exact flag name, argument format, or JSON output structure for a specific command. 4535 lines โ use --help on the specific subcommand first; only load this file if --help is insufficient or unavailable. |
references/EXAMPLES.md | Load for step-by-step walkthroughs of common tasks (move N meters, capture camera image, send Nav2 goal, etc.). 699 lines. |
references/CLI.md | Load for direct ros2 CLI equivalents and debugging. Not needed during normal agent operation. 90 lines. |
AGENTS.md | Load for the full agent operating protocol โ condensed rules, session start detail, reporting style, subcommand inference, motion workflows, and multi-robot handling. Load alongside the RULES-*.md files at session start. |