cartographer-tuning

Configure Google Cartographer 2D SLAM parameters for ROS 2 robots.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Tuning Google Cartographer for ROS 2 involves dozens of interdependent Lua parameters across local SLAM, scan matching, and the pose graph, and misconfigured values cause map tearing, drift, and false loop closures that are hard to diagnose. ## Core Features & Use Cases - Local SLAM Configuration: Set trajectory builder parameters including min/max range, submap size, grid resolution, and IMU usage for scan insertion. - Scan Matcher Tuning: Configure the real-time correlative scan matcher and Ceres refinement weights to handle featureless corridors and noisy odometry. - Pose Graph & Loop Closure Control: Adjust constraint builder scores, sampling ratios, and Huber loss to prevent false loop closures and map tearing. - Use Case: Your indoor differential-drive robot produces a torn map every time it revisits a corridor. Use this Skill to raise the loop closure min_score, tune the Huber scale, and generate a complete working .lua configuration plus ROS 2 launch integration. ## Quick Start Ask the assistant to generate a tuned Cartographer Lua configuration for an indoor differential-drive robot with a single 2D lidar and IMU.

Frequently Asked Questions about cartographer-tuning

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

FAQPage Schema
How do I tune Google Cartographer for ROS 2 indoor mapping?

Tune Cartographer by editing the .lua configuration file passed to cartographer_node. Set TRAJECTORY_BUILDER_2D range limits to match your lidar, configure submaps.num_range_data and grid resolution, then adjust POSE_GRAPH constraint builder scores to control loop closures.

How do I fix false loop closures in Cartographer?

False loop closures in Cartographer are fixed by raising POSE_GRAPH.constraint_builder.min_score to 0.7 or higher and lowering sampling_ratio. Increasing the Huber scale also downweights outlier constraints that cause map tearing.

Does Cartographer work without an IMU?

Cartographer can run without an IMU by setting TRAJECTORY_BUILDER_2D.use_imu_data to false and using base_link as the tracking_frame. Compensate by increasing ceres_scan_matcher rotation_weight to trust odometry heading more.

Why does my Cartographer map tear at loop closure?

Map tearing at loop closure usually comes from incorrect constraints being accepted into the pose graph. Increase optimization_problem.huber_scale, decrease constraint_builder.sampling_ratio, and raise min_score to reject weak matches.

How do I reduce Cartographer CPU usage on a Raspberry Pi?

Reduce Cartographer CPU load by increasing POSE_GRAPH.optimize_every_n_nodes so global optimization runs less often, and lowering submaps.num_range_data so submaps finish faster. Fewer background threads also help on constrained hardware.