Skip to content

Commit

Permalink
docs: Adapt docs to new fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
huyenngn committed Apr 26, 2024
1 parent 59ebd74 commit b1e4ca1
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"-m",
"git+https://github.com/DSD-DBS/coffee-machine",
"-l",
"oa",
"sa",
"-o",
"tests/data/coffee_msgs"
]
Expand Down
46 changes: 33 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,45 @@ Read the [full documentation on Github pages](https://dsd-dbs.github.io/capella-

# Examples

Import ROS .msg files to Capella model layer's root data package:
Import local ROS .msg files to Capella model layer's root data package:

```sh
python -m capella_ros_tools \
import \
-i tests/data/data_model/example_msgs \
-m tests/data/empty_project_60 \
-l la \
--no-deps
python -m capella_ros_tools \
import \
-i tests/data/data_model/example_msgs \
-m tests/data/empty_project_60 \
-l la \
--no-deps
```

Export Capella model layer's root data package as ROS .msg files:
Import remote ROS .msg files to Capella model layer's root data package:

```sh
python -m capella_ros_tools \
export \
-m tests/data/melody_model_60 \
-l la \
-o tests/data/melody_msgs
python -m capella_ros_tools \
import \
-i git+https://github.com/DSD-DBS/dsd-ros-msg-definitions-oss \
-m tests/data/empty_project_60 \
-l la
```

Export local Capella model layer's root data package as ROS .msg files:

```sh
python -m capella_ros_tools \
export \
-m tests/data/melody_model_60 \
-l la \
-o tests/data/melody_msgs
```

Export remote Capella model layer's root data package as ROS .msg files:

```sh
python -m capella_ros_tools \
export \
-m git+https://github.com/DSD-DBS/coffee-machine \
-l sa \
-o tests/data/coffee_msgs
```

# Installation
Expand Down
2 changes: 1 addition & 1 deletion capella_ros_tools/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def import_msgs(
"-r",
"--root",
type=click.UUID,
help="The UUID of the root package to import the messages to.",
help="The UUID of the root package to import the messages from.",
)
@click.option(
"-o",
Expand Down
5 changes: 3 additions & 2 deletions docs/source/howtos.rst
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Import ROS2 Messages from Git Repository:
python -m capella_ros_tools \
import \
-i git+https://github.com/DSD-DBS/dsd-ros-msg-definitions-oss \
-m tests/data/ empty_project_60 \
-m tests/data/empty_project_60 \
-l la
Export Capella data package:
Expand All @@ -40,7 +40,8 @@ Export Capella data package:
python -m capella_ros_tools \
export \
-m tests/data/melody_model_60 -l la \
-m tests/data/melody_model_60 \
-l la \
-o tests/data/melody_msgs
Export Capella data package from Git Repository:
Expand Down
17 changes: 10 additions & 7 deletions docs/source/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,21 @@ Import ROS2 Messages:
python -m capella_ros_tools import -i <INPUT> -m <MODEL> -l <LAYER> -o <OUTPUT> --no-deps
* **-i/--input**, import ROS2 messages from path <INPUT>
* **-m/--model**, write to Capella model at path <MODEL>
* **-l/--layer**, use Capella model layer <LAYER>
* **-o/--out**, write generated decl YAML to path <OUT> (optional)
* **-i/--input**, path to folder with .msg files.
* **-m/--model**, path to the Capella model.
* **-l/--layer**, layer to import the messages to.
* **-r/--root**, UUID of the root package to import the messages to.
* **-t/--type**, UUID of the types package to import the generated data types to.
* **--no-deps**, flag to disable import of ROS2 dependencies (e.g. std_msgs)
* **-o/--output**, path to output decl YAML.

Export Capella Model (experimental):
------------------------------------
.. code-block:: bash
python -m capella_ros_tools export -m <MODEL> -l <LAYER> -o <OUTPUT>
* **-m/--model**, export Capella model from path <MODEL>
* **-l/--layer**, use Capella model layer <LAYER>
* **-o/--output**, write ROS2 messages to <OUTPUT>
* **-m/--model**, path to the Capella model.
* **-l/--layer**, layer to export the messages from.
* **-r/--root**, UUID of the root package to export the messages from.
* **-o/--output**, path to output folder.

0 comments on commit b1e4ca1

Please sign in to comment.