Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deskew the scans by default #432

Merged
merged 7 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions python/kiss_icp/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,10 @@ def _yaml_source(config_file: Optional[Path]) -> Dict[str, Any]:
return data or {}


def load_config(
config_file: Optional[Path], deskew: Optional[bool], max_range: Optional[float]
) -> KISSConfig:
"""Load configuration from an Optional yaml file. Additionally, deskew and max_range can be
also specified from the CLI interface"""

def load_config(config_file: Optional[Path], max_range: Optional[float]) -> KISSConfig:
config = KISSConfig(**_yaml_source(config_file))

# Override defaults from command line
if deskew is not None:
config.data.deskew = deskew
if max_range is not None:
config.data.max_range = max_range

Expand Down
3 changes: 1 addition & 2 deletions python/kiss_icp/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def __init__(
self,
dataset,
config: Optional[Path] = None,
deskew: Optional[bool] = False,
max_range: Optional[float] = None,
visualize: bool = False,
n_scans: int = -1,
Expand All @@ -58,7 +57,7 @@ def __init__(
self._last = self._jump + self._n_scans

# Config and output dir
self.config = load_config(config, deskew=deskew, max_range=max_range)
self.config = load_config(config, max_range=max_range)
self.results_dir = None

# Pipeline
Expand Down
12 changes: 9 additions & 3 deletions python/kiss_icp/tools/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ def kiss_icp_pipeline(
is_flag=True,
help="[Optional] Whether or not to deskew the scan or not",
),
# Aditional Options ---------------------------------------------------------------------------
# Additional Options ---------------------------------------------------------------------------
visualize: bool = typer.Option(
False,
"--visualize",
Expand Down Expand Up @@ -225,7 +225,14 @@ def kiss_icp_pipeline(
print(f"[WARNING] '{dataloader}' does not support '--jump', starting from first frame")
jump = 0

# Lazy-loading for faster CLI
print(
f"[WARNING] KISS-ICP now deskews the scans by default. If you want to change this behaviour create and edit a configuration file using 'kiss_icp_dump_config'. Then run using --config <your_config>."
)
if deskew:
print(
f"[WARNING] The option '--deskew' is deprecated and might be removed in future versions."
)

from kiss_icp.datasets import dataset_factory
from kiss_icp.pipeline import OdometryPipeline

Expand All @@ -239,7 +246,6 @@ def kiss_icp_pipeline(
meta=meta,
),
config=config,
deskew=deskew,
max_range=max_range,
visualize=visualize,
n_scans=n_scans,
Expand Down
Loading