diff --git a/README.md b/README.md index 8f67d5c..bf7601f 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,25 @@ ROS1 is considered end of life. It's recomended to use a ROS2 template instead We're working on it... +## Special docker options + +We support the following special docker options to make metadata available inside the SDK + + * x-spiri-sdk-doc: "" + +This will appear as a comment when creating a new robot + + * x-spiri-sdk-default-enabled: true + +Set this to false and that docker compose will be commented out by default when creating a new robot + + * x-spiri-sdk-default-args: "" + +Extra arguments to pass to docker compose. Should accept all docker compose arguments. + +Common options would be `--build`. You might also appreciate `--pull ("always"|"missing"|"never")`. + + ## NVIDIA Container Toolkit [Source](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) diff --git a/guiTools/spiri_sdk_guitools/sim_drone.py b/guiTools/spiri_sdk_guitools/sim_drone.py index 4f0a530..5fab2e1 100644 --- a/guiTools/spiri_sdk_guitools/sim_drone.py +++ b/guiTools/spiri_sdk_guitools/sim_drone.py @@ -133,11 +133,16 @@ class Spirimu(Robot): default_robot_compose += f"#{compose_file} not valid \n" continue specialArgs = data.get("x-spiri-sdk-default-args", "") + enabled = str(data.get("x-spiri-sdk-default-enabled", True)) + enabled = enabled.lower() in ["true", "yes", "1"] + docstring = data.get("x-spiri-sdk-doc", "") if docstring: for line in docstring.split("\n"): if line: default_robot_compose += f"# {line}\n" + if not enabled: + default_robot_compose += "##" default_robot_compose += f"{compose_file} {specialArgs}\n" ui.label("Compose files").classes("text-xl") diff --git a/robots/spiri-mu/camera_capture/docker-compose.yaml b/robots/spiri-mu/camera_capture/docker-compose.yaml index b27f2be..81c15ba 100644 --- a/robots/spiri-mu/camera_capture/docker-compose.yaml +++ b/robots/spiri-mu/camera_capture/docker-compose.yaml @@ -1,4 +1,5 @@ x-spiri-sdk-doc: Capture camera images for mapping +x-spiri-sdk-default-enabled: false services: camera-capture: