Skip to content

Commit

Permalink
Create config executable (#293)
Browse files Browse the repository at this point in the history
* Add defaults and executable

* Add to Python readme

* Update python/pyproject.toml

Co-authored-by: Ignacio Vizzo <ignaciovizzo@gmail.com>

* Update python/README.md

Co-authored-by: Ignacio Vizzo <ignaciovizzo@gmail.com>

* Update python/kiss_icp/config/parser.py

Co-authored-by: Ignacio Vizzo <ignaciovizzo@gmail.com>

---------

Co-authored-by: Ignacio Vizzo <ignaciovizzo@gmail.com>
  • Loading branch information
benemer and nachovizzo authored Mar 18, 2024
1 parent 5600e7a commit c2ea460
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ kiss_icp_pipeline --help
This should print the following help message:
![out](https://user-images.githubusercontent.com/21349875/193282970-25a400aa-ebcd-487a-b839-faa04eeca5b9.png)

### Config

You can generate a default `config.yaml` by typing

```sh
kiss_icp_dump_config
```

Now, you can modify the parameters and pass the file to the `--config` option when running the `kiss_icp_pipeline`.

### Install Python API (developer mode)

If you plan to modify the code then you need to setup the dev dependencies, luckily, the only real
Expand Down
2 changes: 1 addition & 1 deletion python/kiss_icp/config/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def load_config(
return config


def write_config(config: KISSConfig, filename: str):
def write_config(config: KISSConfig = KISSConfig(), filename: str = "kiss_icp.yaml"):
with open(filename, "w") as outfile:
try:
yaml = importlib.import_module("yaml")
Expand Down
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ visualizer = [

[project.scripts]
kiss_icp_pipeline = "kiss_icp.tools.cmd:run"
kiss_icp_dump_config = "kiss_icp.config.parser:write_dump_config"

[project.urls]
Homepage = "https://github.com/PRBonn/kiss-icp"
Expand Down

0 comments on commit c2ea460

Please sign in to comment.