loop-closure

Diagnose and tune loop closure detection in Cartographer and SLAM Toolbox.

Updated Aug 16, 2026
One-click install
npx skills add https://github.com/three1324/yeonjinautomotive --skill loop-closure-three1324
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: loop-closure
Source: https://github.com/three1324/yeonjinautomotive/tree/main/.claude/skills/loop-closure
Command: npx skills add https://github.com/three1324/yeonjinautomotive --skill loop-closure-three1324

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? SLAM maps of closed loops often show gaps, overlaps, or warped geometry because accumulated odometry drift is never corrected, or because false loop closures tear the map apart. This Skill explains how loop closure works and how to tune its parameters to produce consistent, distortion-free maps. ## Core Features & Use Cases - Parameter Tuning Guidance: Concrete thresholds and ranges for Cartographer (min_score, sampling_ratio, max_constraint_distance, huber_scale) and SLAM Toolbox (loop_match_minimum_response, chain size, search space) with recommended starting values. - False Positive Diagnosis: Symptom identification (map tearing, bending walls) and a mitigation strategy table mapping each fix to the correct parameter in both SLAM frameworks. - Visual Verification Workflow: How to read /constraint_list markers in RViz (green vs blue constraints) to confirm closures connect genuinely revisited areas. - Use Case: Your robot maps a building corridor loop but the map shows a gap where the path should close. Use this Skill to lower min_score, verify blue constraints appear in RViz, and re-map until 3 laps produce identical maps. ## Quick Start Ask the AI to explain why my SLAM map distorts after the robot revisits an area and which loop closure parameters to adjust.

Frequently Asked Questions about loop-closure

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix a SLAM map that has a gap where the loop should close?

Lower the loop closure match threshold so legitimate closures are detected: reduce min_score in Cartographer (start at 0.55) or loop_match_minimum_response_fine in SLAM Toolbox. Then verify in RViz that blue inter-submap constraints appear in revisited areas.

What causes false positive loop closures in SLAM?

False closures occur when match thresholds are too low and the environment contains symmetric corridors, repeating room layouts, or featureless walls. The optimizer then warps the map to force two different areas together, causing visible tearing or bending.

Cartographer vs SLAM Toolbox loop closure parameters?

Cartographer uses constraint_builder min_score, sampling_ratio, and max_constraint_distance, while SLAM Toolbox uses loop_match_minimum_response_coarse/fine, chain size, and search space dimensions. Both support disabling loop closure entirely for debugging.

How do I visualize loop closures in RViz?

Subscribe to the /constraint_list MarkerArray topic in RViz. Green lines are sequential intra-submap constraints and blue lines are loop closures. Missing blue lines in revisited areas mean closures are not triggering; blue lines between wrong areas indicate false positives.

When should I disable loop closure in SLAM?

Disable it when false closures repeatedly corrupt the map despite raised thresholds, such as in highly symmetric environments. Set optimize_every_n_nodes to 0 in Cartographer or do_loop_closing to false in SLAM Toolbox, then rely on accurate odometry instead.