feature/multi-robots-types #12

Merged
aqua3 merged 20 commits from feature/multi-robots-types into master 2024-12-05 11:36:57 -04:00
3 changed files with 25 additions and 0 deletions
Showing only changes of commit b07870936c - Show all commits

View File

@ -36,6 +36,25 @@ ROS1 is considered end of life. It's recomended to use a ROS2 template instead
We're working on it... 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 ## NVIDIA Container Toolkit
[Source](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html) [Source](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html)

View File

@ -133,11 +133,16 @@ class Spirimu(Robot):
default_robot_compose += f"#{compose_file} not valid \n" default_robot_compose += f"#{compose_file} not valid \n"
continue continue
specialArgs = data.get("x-spiri-sdk-default-args", "") 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", "") docstring = data.get("x-spiri-sdk-doc", "")
if docstring: if docstring:
for line in docstring.split("\n"): for line in docstring.split("\n"):
if line: if line:
default_robot_compose += f"# {line}\n" default_robot_compose += f"# {line}\n"
if not enabled:
default_robot_compose += "##"
default_robot_compose += f"{compose_file} {specialArgs}\n" default_robot_compose += f"{compose_file} {specialArgs}\n"
ui.label("Compose files").classes("text-xl") ui.label("Compose files").classes("text-xl")

View File

@ -1,4 +1,5 @@
x-spiri-sdk-doc: Capture camera images for mapping x-spiri-sdk-doc: Capture camera images for mapping
x-spiri-sdk-default-enabled: false
services: services:
camera-capture: camera-capture: