Skip to main content

🧩 Upgrade Implementation Guide

This manual turns the broad upgrade ideas into concrete, reproducible steps for the LIMO Pro + MyCobot + YOLO platform.
Each section follows a prereqs → install → configure → test → rollback pattern so you can iterate safely.


Safety First

Test upgrades on a copy of your workspace and keep your robot on a stand (wheels lifted) when validating motion changes.
Always back up your maps and params before editing files.

Recommended Workspace Layout

Use a clean overlay workspace (example: ~/krish_ws):

krish_ws/
├── src/
│ ├── nav_handler/ # mission_manager, pose_setter, etc.
│ ├── object_detector/ # YOLO detector node(s)
│ ├── mycobot_arm/ # pick_node, drop_node
│ ├── full_system/ # launch files, params, utils
│ └── rtabmap_configs/ # rtabmap/cartographer configs
├── maps/
├── params/
└── scripts/

1) Advanced Mapping & Exploration (RTAB‑Map)​

Goal: Replace Cartographer with RTAB‑Map to enable live mapping + autonomous exploration (no prebuilt map).

Prereqs

  • Camera topics available:
    • /camera/color/image_raw, /camera/color/camera_info, /camera/depth/image_raw
  • Static TF from base_link → camera_link (already in your bringup)

Install

sudo apt update
sudo apt install ros-foxy-rtabmap-ros

2) YOLO: Accuracy, Multi‑Class, GPU Offload​

Goal: Increase robustness to 99%+ via more data and better coverage.

Data

  • Capture in your real environment (lighting, occlusion, distance).
  • Balance classes (target ≥ 1k images/class for strong generalization).
  • Maintain train/val/test splits (e.g., 80/10/10).

Training Options

  • Roboflow Train or local Ultralytics runs (preferred for reproducibility).

Export

  • Produce a single .pt model for deployment into object_detector.py.

3) Multi‑Object Queue (Mission Manager)​

Goal: Detect and collect several objects before returning to base.

Steps

  1. Replace single target state with a queue of PoseStamped:
    self.targets = deque()
  2. Debounce by time (e.g., ignore duplicate detections for 3s).
  3. Deduplicate by distance (e.g., ignore if within 0.4m of last queue item).
  4. Control flow:
    • If queue not empty → pause exploration → navigate to targets[0].
    • On arrival → pick → pop-left → continue.
    • When empty → return to base → drop.

Notes

  • Keep your existing interrupt guard so exploration doesn't collide with object navigation.

4) Vector Memory (User Recognition)​

Goal: Deliver objects to the correct person.

Enroll Script

  • Create scripts/enroll_user.py to capture 10–20 face images and compute an average embedding for each user.
  • Store as { "name": [embedding floats...] } in JSON or as rows in SQLite.

Tips

  • Capture under typical room lighting.
  • Keep faces frontal and slightly off-axis samples.

5) Voice Commands (Offline)​

Goal: Hands‑free commands like "start mission", "pause", "return to base".

Approach

  • Use vosk (light, offline) or whisper.cpp (more accurate, heavier).
  • Publish intents to /voice_cmd (String or custom msg).

Example Grammar

  • start → begin exploration
  • pause → cancel current nav goal
  • return → return to base and drop

6) Web Dashboard (Browser Control)​

Stack

  • rosbridge_server (WebSocket bridge)
  • web_video_server (camera stream)
  • Optional: Foxglove Studio for a professional dashboard

Controls & Feeds

  • Buttons → publish to /ui_cmd (start, pause, return).
  • Live map → subscribe /map.
  • Camera → MJPEG stream.
  • Object queue → subscribe your queue topic or reuse /target_pose.

7) Performance & Reliability​

  • Reduce max_vel_theta for precise turns in tight labs.
  • Increase planner_frequency for responsiveness.
  • Tune controller plugin (DWB or RPP) for smoother trajectories.
  • Validate AMCL params (laser noise, update rates).
  • Track changes in params/nav2_params.yaml for quick rollbacks.

Add a lightweight health node that publishes to /diagnostics:

  • CPU, RAM, temperature, battery (if available), MyCobot connection status.
  • Mirror key states in RViz (MarkerArray) and the Web UI.
  • Speak alerts via espeak when thresholds exceed (e.g., "CPU 85 percent").

9) Test Plans (Per Upgrade)​

RTAB‑Map

  • Map grows live; restart → confirm persistence (if saving DB is enabled).

YOLO

  • Validate with a confusion matrix; field-test: 20 detections with 0–1 false positive.

Multi‑Object Queue

  • Place 3 targets; verify sequential pickup without intermediate base returns.

User Recognition

  • 3 enrolled users; match rate ≥ 95% within 2 m in typical lighting.

Voice/Web UI

  • Misrecognition rate < 5% after grammar tweaks; remote controls gated by a "safe mode" switch.

10) Rollback & Recovery​

  • Use feature branches: feature/rtabmap, feature/multiqueue, etc.
  • Version all params/ and full_system/launch/ files.
  • Keep a stable bringup (full_mission_stable.launch.py) to recover instantly.
Design Once, Extend Forever

Keep new behavior param‑driven and node‑decoupled. When you add multi‑robot, cloud model updates, or docking later, you won't need rewrites.