Skip to content

Latest commit

 

History

History
95 lines (75 loc) · 4.16 KB

File metadata and controls

95 lines (75 loc) · 4.16 KB

Claude Code project guide — ERASOR2

This file is auto-loaded when Claude Code is launched inside this repo. Keep it under ~150 lines. Anything longer goes in .claude/memory/.

Project at a glance

  • ERASOR2: removes dynamic objects from accumulated LiDAR maps.
  • C++17 / Eigen / PCL 1.10 / OpenCV / OpenMP.
  • ROS-free at runtime since v1.0, catkin-free since v1.1 — yaml-cpp replaces rosparam, rerun.io replaces RViz/tf2/publishers, erasor2::GridMap (include/erasor2/grid_map.hpp) replaces grid_map_core + grid_map_cv.
  • Builds with plain CMake; no catkin workspace needed.
  • Seven binaries: mapgen, run_erasor2, compare_map, accum_4dmos, fill_removert_labels, helipr_to_kitti, merge_heliclouds.

Build & run

cmake -B build -S . && cmake --build build -j

# Full pipeline (preprocessing → mapgen → run_erasor2 → evaluate):
python scripts/run_pipeline.py --config config/erasor2/seq_05.yaml \
    --conda-env ~/.miniconda3/envs/erasor2-3.10

The pre-built docker container on the original dev machine is named erasor2_dev and mounts ~/catkin_ws_for_erasor2/home/catkin_ws. The workspace name is historical — nothing in the build needs catkin.

Test data + golden artifacts

These are NOT in git (see .gitignore); they live next to the repo on disk and are needed for regression checks. On a fresh machine, run tests/scripts/prepare_fixtures.sh to generate them, or copy from another machine (the erasor2_transfer.tar.gz bundle).

Path Size Source
data/kitti_semantic/dataset/sequences/05/{velodyne,labels}/ 764 MB subset of SemanticKITTI seq-05 [2350..2670]
data/kitti_semantic/dataset/sequences/05/{hdbscan,patchwork}/ 50 MB generated by scripts/kitti_clustering.py
~/erasor2_golden/05_*.pcd 57 MB generated by tests/scripts/prepare_fixtures.sh

Parity check CI

  • Workflow: .github/workflows/parity.yml
  • Trigger is disabled at v1 — only workflow_dispatch. Re-enable by uncommenting the pull_request: block once the self-hosted runner labeled erasor2-rig is registered.
  • The check cmps the produced mapgen + estimated PCDs against the golden set, plus an assert_metrics.py PR/RR/F1 tolerance gate.
  • Reference numbers on the seq-05 subset: PR=97.668 %, RR=98.457 %, F1=0.9806.

Conventions to keep working

  • pre-commit hooks run clang-format, cpplint, isort, black, flake8, mdformat. They auto-fix most things; re-stage and re-commit if a hook reformats files.
  • cpplint demands explicit on single-arg constructors. The CI hook will catch this — don't forget for new C++ classes.
  • flake8 misreads f-strings: f"x={v:.3f}" triggers a false E231. Use "x={:.3f}".format(v) instead, or # noqa: E231 on the line.
  • Ubuntu 20.04 libstdc++ + open3d: on 20.04 only, open3d 0.19 needs CXXABI_1.3.15, which is in the conda env's libstdc++ but not the system one. Set LD_PRELOAD=$CONDA_ENV/lib/libstdc++.so.6 before invoking Python scripts that import open3d. Ubuntu 22.04's system libstdc++ is fresh enough; no LD_PRELOAD needed there.
  • kitti_clustering.py paths come from --kitti_dir / --save_dir. --kitti_dir is the directory ABOVE dataset/ for SemanticKITTI (so <kitti_dir>/dataset/sequences/<seq>/velodyne/ exists); for HeLiMOS it's the directory containing the sequence subfolders directly. --save_dir is the sequence directory to write hdbscan/ + patchwork/ into; if omitted, labels go inside the sequence dir alongside velodyne/. run_pipeline.py derives kitti_dir from the yaml's abs_data_dir (two parents up).

When you change algorithm code

Refresh the golden PCDs on purpose in the same PR:

rm -rf ~/erasor2_golden
tests/scripts/prepare_fixtures.sh    # rebuilds + saves new golden

The golden lives outside the repo, so this is a runner-state mutation, not a commit. Mention it in the PR description.

Pointers to deeper context

  • tests/README.md — full parity-CI design + self-hosted runner setup
  • .claude/memory/MEMORY.md — session notes / gotchas accumulated by Claude
  • scripts/environment.yml — conda env recipe