/ad-r1m:ad-r1m-robotfrom ad-r1m
Runs, tunes and troubleshoots the tested SLAM and Nav2 setup on an AD-R1M robot - RTAB-Map with the ADTF3175D ToF camera, Nav2 on /scan or the point cloud, wheel drive (CANopen) faults - and holds the robot's specs and research-backed RTAB-Map parameters. Use when the user wants to map, navigate, tune RTAB-Map or fix SLAM, TF, sensor or wheel problems on an AD-R1M. For choosing or integrating a different SLAM package use ad-r1m-slam-integration; for setup and connection use ad-r1m-bringup.
Ships in ad-r1m. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
The robot must be selected (connect_robot) and robot_status must report state: ready.
If not, use the ad-r1m-bringup skill first.
base_link -> cam1_adtf31xx_optical already models it; flipping maps the floor as
obstacles.Grid/RayTracing stays false: with the raised, narrow-FOV (75°) camera it clears
obstacles the camera no longer sees.robot_status.drives
(see "Wheel drives" below).Specs: ROBOT_SPEC.md. Research and parameter rationale: RTAB_RESEARCH.md. Known problems and fixes: COMMON_FIXES.md.
robot_status: state: ready, sensors.tof and sensors.odometry true, drives.healthy true.setup_workspace (default package=rtabmap_ros) until ready: true. On a robot that has
the shared robot-slam image this takes about a minute.slam action=start deploys the tested default template as launch.py and starts it:
template=depth_rgb (default): ToF depth + the AB (amplitude) image as RGB, visual
registration, odometry from TF. The best setup.template=depth_pointcloud: adds the ToF point cloud for ICP. Only when the user asks
for it; it still has older parameters (see its docstring).diagnostics target=slam: started SLAM nodes, /map publisher, hz for /scan,
/cam1/point_cloud, /odometry/filtered, and tf map->odom=ok.rviz action=start (see ad-r1m-bringup).slam action=stop stops it. The tested templates are mapping-only: reloading a
database they wrote aborts RTAB-Map (Memory::loadDataFromDb, empty descriptors).
To read a template before changing it (the parameter values and why are in its docstring):
cat ${CLAUDE_SKILL_DIR}/templates/rtabmap_depth_rgb_launch.py
A custom launch file goes through slam action=deploy launch_file=... helpers={...} params_yaml=..., then slam action=start template=deployed. The previous version of each
file is kept as <file>.prev in the slam_integration package.
diagnostics target=slam| Measurement | Problem | What to do |
|---|---|---|
slamNodes empty | SLAM not running | slam action=start; if started is false, read logTail |
publishers./scan 0 | No laser scan | Check depthimage_to_laserscan in the robot container |
publisher > 0 but hz 0 | Publisher with no messages in 6 s | /cam1/point_cloud: first ros2_query kind=params name=/cam1/adi_3dtof_adtf31xx_node; param_enable_point_cloud_publish: false is a config choice, not a fault (COMMON_FIXES.md Issue 10), and only depth_pointcloud / nav action=start_pointcloud need it. Otherwise the ToF node or EKF inputs stalled: restart target=tof for the camera |
tf.odom->base_link missing | No odometry TF | robot_localization EKF / wheel odometry |
tf.map->odom missing | SLAM not publishing its TF yet | Wait for the first map update, else check the launch log |
drives.healthy false | Wheel controllers down | "Wheel drives" below |
tofClock.ok false (offsetS far from 0) | ToF stamps on a stale camera time base: topics and rates look fine, but TF, RTAB-Map and the costmaps drop every scan (RViz: "earlier than all the data in the transform cache") | Typical after a power cycle. If robotNtp is false, wait for it. Then restart target=tof (its output repeats tofClock), then check drives (COMMON_FIXES.md Issue 14) |
The tested values are in the template. To change one at runtime (lost on restart):
slam_set_params params={"Rtabmap/DetectionRate": "1.0"}. RTAB-Map parameters are strings;
the tool reports per parameter whether /rtabmap accepted it. To keep a change, edit the
launch file and redeploy.
From diagnostics.rtabmap (cpu_percent, mem_percent of the rtabmap process):
| Observation | Change | Why |
|---|---|---|
| CPU above ~70% | Vis/MaxFeatures 400 -> 150-200, Rtabmap/DetectionRate down | Fewer features and updates per second |
| Memory above ~50% | Rtabmap/MemoryThr 300 -> 200 | Fewer nodes in working memory |
| No loop closures in a revisited area | Check RGBD/ProximityBySpace is true (template default) | Narrow FOV needs proximity detection |
| Obstacles vanish when the robot turns | Grid/RayTracing must be false | COMMON_FIXES.md Issue 6 |
| False obstacles far away on the floor | Lower Grid/RangeMax (template: 2.0) | ToF floor noise grows with range |
Keep Mem/ImagePreDecimation and Mem/ImagePostDecimation equal: post 2 with pre 1 stores
256x256 AB next to 512x512 depth and RTAB-Map drops Vis/DepthAsMask.
nav action=start: the robot's Nav2 on /scan.nav action=start_pointcloud: Nav2 on the ToF point cloud. The raw 512x512 cloud is too
heavy for the costmaps on the RPi 5, so nav_cloud_filter.py strides it to
/cam1/point_cloud_nav at 5 Hz. Plain nav action=start restores the stock command.diagnostics target=nav: each of /controller_server, /planner_server,
/behavior_server, /bt_navigator should be active; /global_costmap/costmap needs a
publisher, which needs /map (from RTAB-Map or the robot's slam_toolbox). If the lifecycle
nodes are not active, restart nav after SLAM publishes the map.The robot's own teleop_keyboard compose service (profile oneoff) drives it and toggles the
kill switch. It reads single keypresses, so the user runs it in their own terminal:
ssh -t analog@<robot>.local
cd ~/demo # the active config folder (robot_config action=active)
docker compose --env-file ad-r1m.env run --rm teleop_keyboard
p: activate the kill switch. Driving stays disabled until this is pressed once.r: reset the kill switch and enable the motors.u i o / j k l / m , . to drive. Limits come from ros_data/teleop_parameters.yaml
(max_vel 0.5 m/s, max_rot 1.0 rad/s by default).A teleop on the PC (pixi run ros2 run teleop_twist_keyboard teleop_twist_keyboard) only
publishes /cmd_vel and cannot reset the kill switch, so it does nothing on its own.
The RC transmitter (crsf_node) also works. Remind the user the robot will move,
and suggest driving only when they ask; it drives during mapping too.
A failed CANopen drive boot leaves the robot container running, and the EKF still publishes
odom -> base_link from the IMU, so containers and TF look fine. robot_status.drives (also
in diagnostics) checks what matters: joint_state_broadcaster and diff_drive_controller
active, and a /joint_states publisher. When unhealthy it adds the drive log and the CAN
heartbeats (canBus: drive_right 0x14, drive_left 0x16).
Do not diagnose from driveLog alone: a healthy boot logs some of the same lines.
Fix in this order (details in COMMON_FIXES.md, Issue 11):
restart target=stack (bringup stop, compose --env-file ad-r1m.env down, bringup start:
fresh containers re-run the drive boot). Right after a restart, wait ~30 s before checking
again. Never use compose stop + start by hand.restart target=slcan: the same with can0 and all drives reset while the stack is down,
then reports which nodes answer. Restarts drop running SLAM / Nav2 (not_restarted):
start them again with slam / nav.canBus: a missing 0x14/0x16 is power or cable; a node at 0x17 is an ADRD3161 on its
factory DIP setting (set S2 to 110 for left, 100 for right, power-cycle).Other hardware units: restart target=crsf (RC receiver), imu (/imu silent), tof (ToF
topics silent, or stale stamps with tofClock.ok false; unit output says if the camera at
192.168.56.1 is unreachable). Every restart reports tofClock.
ros2_query reads without changing anything: kind=topics (with types), nodes,
topic_info name=/scan, params name=/rtabmap, logs name=ad-r1m-robot-1,
read_file path=/ros2_ws/src/slam_integration/launch/launch.py (SLAM container) or
target=host path=~/demo/compose.yaml.
For anything else, use SSH from Bash (ssh analog@<robot>), which asks the user as usual.
User: "Start mapping with RTAB-Map on ad-r1m-18"
robot_status -> ready, drives healthysetup_workspace -> ready: trueslam action=start, then diagnostics target=slamrviz action=startros2_query kind=params name=/rtabmap and check Grid/RayTracingtrue: confirm, then redeploy the tested template (slam action=start)robot_status: drives.healthy false, detail says whyrestart target=stackCOMMON_FIXES.md (opens in a new tab)ROBOT_SPEC.md (opens in a new tab)RTAB_RESEARCH.md (opens in a new tab)templates/cloud_preprocess.py (opens in a new tab)templates/image_preprocess.py (opens in a new tab)templates/mola_icp_launch.py (opens in a new tab)templates/nav_cloud_filter.py (opens in a new tab)templates/nav_pointcloud_launch.py (opens in a new tab)templates/navigation_params_pointcloud.yaml (opens in a new tab)templates/rtab.rviz (opens in a new tab)templates/rtabmap_depth_pointcloud_launch.py (opens in a new tab)templates/rtabmap_depth_rgb_launch.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub analogdevicesinc/datax-collaterals --plugin ad-r1m3 skills in this plugin
/ad-r1m-bringupBrings up an AD-R1M robot - flashes the ADI Kuiper SD card, provisions the robot with or without Cloudsmith credentials (building the robot image and system package from source when needed), connects to it, checks its health, and opens RViz on the user's PC with pixi or native ROS 2. Use when the user sets up a new or reflashed AD-R1M, connects to a robot, installs or rebuilds the robot image or system package, has no Cloudsmith credentials, or wants to see the robot in RViz./ad-r1m-slam-integrationEvaluates ROS 2 SLAM packages (ORB-SLAM3, MOLA, KISS-ICP, slam_toolbox, a GitHub repo, ...) against the AD-R1M's hardware from live robot and repository evidence, then installs the chosen one in the robot's SLAM container and integrates it with a generated launch file. Use when the user asks which SLAM package fits the AD-R1M, wants a new or custom SLAM package on it, or setup_workspace reports unresolved dependencies. For running or tuning the tested RTAB-Map setup use ad-r1m-robot.