You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+40-61Lines changed: 40 additions & 61 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,15 +16,22 @@ In addition, the Toolchain offers automatic extractors of the models from the or
16
16
For the static code analysis we made available a web interface able to inspect code hosted on Git and get its model representation as feedback [http://ros-model.seronet-project.de/](http://ros-model.seronet-project.de/).
17
17
18
18
19
-
## Install with ROS
19
+
## Install with ROS 2 (Humble or Rolling)
20
20
1. clone this repository into the source folder in your workspace, such as:
21
21
```
22
22
ws/src/ros2model
23
23
```
24
24
2. Source ROS workspace
25
+
26
+
Humble:
25
27
```
26
28
source /opt/ros/humble/setup.bash
27
29
```
30
+
31
+
Rolling:
32
+
```
33
+
source /opt/ros/rolling/setup.bash
34
+
```
28
35
3. Back to the folder "ws", create and active venv
Spin time in seconds to wait for discovery (only applies when not using an already running daemon)
74
-
-s, --use-sim-time Enable ROS simulation time
75
-
--no-daemon Do not spawn nor use an already running daemon
76
-
-o OUTPUT_FOLDER, --output_folder OUTPUT_FOLDER
77
-
The folder for storing the generated models.
78
-
--include_hidden_nodes
79
-
Consider hidden nodes.
80
-
--include_hidden_interfaces
81
-
Consider hidden topics, services or actions.
82
-
```
83
-
84
-
2. Create a ros system model from a run-time system:
85
-
```
86
-
ros2 model system -o test/turtlesim # save the system in test folder and named as "turtlesim.rossystem"
87
-
```
88
-
You can run the command below to get more usage information.
89
-
```
90
-
ros2 model system -h
91
-
```
92
-
```
93
-
usage: ros2 model system [-h] [--spin-time SPIN_TIME] [-s] [--no-daemon] [-o OUTPUT_FILE] [--include_hidden_nodes]
94
-
[--include_hidden_interfaces]
95
-
96
-
Create .rossystem for a runtime system
97
-
98
-
options:
99
-
-h, --help show this help message and exit
100
-
--spin-time SPIN_TIME
101
-
Spin time in seconds to wait for discovery (only applies when not using an already running daemon)
102
-
-s, --use-sim-time Enable ROS simulation time
103
-
--no-daemon Do not spawn nor use an already running daemon
104
-
-o OUTPUT_FILE, --output_file OUTPUT_FILE
105
-
The system model file path.
106
-
--include_hidden_nodes
107
-
Consider hidden nodes.
108
-
--include_hidden_interfaces
109
-
Consider hidden topics, services or actions.
110
-
```
60
+
### Node models from a running system
61
+
Generate component models for each node discovered at runtime. Use `--include-description` if you need the `robot_description` parameter in the exported file and `--from-launch` to refine package/executable data with launch files.
62
+
```
63
+
ros2 model node -o test/nodes --include-description --from-launch my_pkg/bringup.launch.py
64
+
```
65
+
More options:
66
+
```
67
+
ros2 model node -h
68
+
```
69
+
70
+
### System model from a running system
71
+
Capture a full `.rossystem` model. The `--include-description` and `--from-launch` flags work the same way as for node models.
72
+
```
73
+
ros2 model system -o test/turtlesim.rossystem --include-description --from-launch turtlesim_gazebo/launch/sim_launch.py
74
+
```
75
+
More options:
76
+
```
77
+
ros2 model system -h
78
+
```
79
+
80
+
### Interface models from package definitions
81
+
Generate `.ros` models for topics, services, and actions declared in interface packages. Use `--all` to export every available package or pass `-p <package>` multiple times to target specific ones.
82
+
```
83
+
ros2 model msg --all -o test/interfaces
84
+
ros2 model msg -p std_msgs -p geometry_msgs -o test/interfaces
0 commit comments