Skip to content

Commit

Permalink
Prepend kiss_icp_ for env variable usage (#286)
Browse files Browse the repository at this point in the history
* Prepend `kiss_icp_` for env variable usage

Before this didn't work
```
export DATA=carlos
kiss_icp_pipeline ...
```

After, you need to be more explicit to break it:
```
export KISS_ICP_DATA=carlos
kiss_icp_pipeline ...
```

This allow us to mantain the API as well

* Add to help

---------

Co-authored-by: Benedikt Mersch <benedikt.mersch@gmail.com>
  • Loading branch information
nachovizzo and benemer authored Mar 1, 2024
1 parent e1c01d9 commit b217173
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/kiss_icp/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,13 @@
from pathlib import Path
from typing import Any, Dict, Optional

from pydantic_settings import BaseSettings
from pydantic_settings import BaseSettings, SettingsConfigDict

from kiss_icp.config.config import AdaptiveThresholdConfig, DataConfig, MappingConfig


class KISSConfig(BaseSettings):
model_config = SettingsConfigDict(env_prefix="kiss_icp_")
out_dir: str = "results"
data: DataConfig = DataConfig()
mapping: MappingConfig = MappingConfig()
Expand Down
4 changes: 4 additions & 0 deletions python/kiss_icp/tools/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ def name_callback(value: str):
# Use a more specific dataloader: {", ".join(_available_dl_help)}
$ kiss_icp_pipeline --dataloader kitti --sequence 07 --visualize <path-to-kitti-root>:open_file_folder:
# To change single config parameters on-the-fly, you can export them beforehand:
$ export kiss_icp_out_dir='<path-to-logs>:open_file_folder:'
$ export kiss_icp_data='{{"max_range": 50}}'
"""


Expand Down

0 comments on commit b217173

Please sign in to comment.