feat(lidar): add point-aligned ground review
This commit is contained in:
@@ -6,8 +6,10 @@ import json
|
||||
from pathlib import Path
|
||||
|
||||
from k1link.compute import (
|
||||
DEFAULT_GROUND_BENCHMARK_PROFILE,
|
||||
PATCHWORKPP_SOURCE_COMMIT,
|
||||
PATCHWORKPP_SOURCE_TAG,
|
||||
GroundBenchmarkProfile,
|
||||
LidarGroundBenchmarkV1,
|
||||
LidarReplayPackV2,
|
||||
PatchworkPPGroundSegmenter,
|
||||
@@ -47,14 +49,40 @@ def _arguments() -> argparse.Namespace:
|
||||
"--patchwork-source-commit",
|
||||
default=PATCHWORKPP_SOURCE_COMMIT,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--profile-id",
|
||||
default=DEFAULT_GROUND_BENCHMARK_PROFILE.profile_id,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--sensor-height-m",
|
||||
type=float,
|
||||
default=DEFAULT_GROUND_BENCHMARK_PROFILE.patchwork_sensor_height_proxy_m,
|
||||
)
|
||||
parser.add_argument(
|
||||
"--map-vertical-origin-offset-m",
|
||||
type=float,
|
||||
default=(DEFAULT_GROUND_BENCHMARK_PROFILE.patchwork_map_vertical_origin_offset_m),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--height-evidence",
|
||||
choices=("missing", "operator-estimated", "runtime-calibrated"),
|
||||
default=DEFAULT_GROUND_BENCHMARK_PROFILE.patchwork_height_evidence,
|
||||
)
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
def main() -> int:
|
||||
arguments = _arguments()
|
||||
profile = GroundBenchmarkProfile(
|
||||
profile_id=arguments.profile_id,
|
||||
patchwork_sensor_height_proxy_m=arguments.sensor_height_m,
|
||||
patchwork_map_vertical_origin_offset_m=(arguments.map_vertical_origin_offset_m),
|
||||
patchwork_height_evidence=arguments.height_evidence,
|
||||
)
|
||||
replay = LidarReplayPackV2(arguments.replay_pack)
|
||||
try:
|
||||
patchwork = PatchworkPPGroundSegmenter.load(
|
||||
profile=profile,
|
||||
module_name=arguments.patchwork_module,
|
||||
source_tag=arguments.patchwork_source_tag,
|
||||
source_commit=arguments.patchwork_source_commit,
|
||||
@@ -63,6 +91,7 @@ def main() -> int:
|
||||
replay,
|
||||
arguments.output_root,
|
||||
patchwork=patchwork,
|
||||
profile=profile,
|
||||
)
|
||||
annotation = (
|
||||
build_lidar_ground_annotation_template(
|
||||
@@ -87,9 +116,7 @@ def main() -> int:
|
||||
"current": result.report["current"],
|
||||
"candidate": result.report["candidate"],
|
||||
"comparison": result.report["comparison"],
|
||||
"annotation_template_id": (
|
||||
annotation.name if annotation is not None else None
|
||||
),
|
||||
"annotation_template_id": (annotation.name if annotation is not None else None),
|
||||
},
|
||||
ensure_ascii=False,
|
||||
indent=2,
|
||||
|
||||
Reference in New Issue
Block a user