Skip to content

Commit 23b3565

Browse files
committed
[Documentation] Update ros1 and ros2 model description
1 parent 33f1719 commit 23b3565

6 files changed

Lines changed: 205 additions & 24 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,14 @@ Publications:
4040
- [(Only for tooling developers) From Source code in eclipse](docu/Installation.md#option-2-using-the-eclipse-installer---source-installation-ros-tooling-developers)
4141
- VS Code plugin(tbd) - WIP [vscode-RosTooling](https://github.com/ipa320/vscode-RosTooling)
4242

43-
## Tutorials
43+
## Tutorials v3
4444

4545
- Create component models:
4646
- (Prerequisite) [Add communication objects](docu/NewCommunicationObjects.md)
47-
- [Create a ROS model from your source code(static code analyzer)](docu/NewRosModel.md)
47+
- [Create manually a new ROS component description](docu/RosModelDescription.md)
48+
- [Generation of code from models](https://github.com/CoreSenseEU/rossdl#usage)
4849
- [Create a ROS model from a deployed robot using our introspection at runtime tool](docu/IntrospectionNode.md)
49-
- [Create new ROS component description](docu/RosModelDescription.md)
50-
- [Generation of code from models](docu/CodeGeneration.md)
50+
- [Create a ROS model from your source code(static code analyzer)](docu/NewRosModel.md))
5151

5252
- Combine components to form a ROS System
5353
- [Create manually a new RosSystem description](docu/RosSystemModelDescription.md)

docu/IntrospectionNode.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Create a ROS model from a deployed robot using our introspection at runtime tool
1+
## Create a ROS model from a deployed robot using our introspection at runtime tool (for ROS 2 systems)
22

33
Please be sure that the tool is installed and your workspace setup, see the [installation guide](../README.md) for further details.
44

@@ -7,19 +7,23 @@ The tools documented here were conceived as a simple way to obtain models of sys
77
You can install the tools directly on your workspace using the following command:
88

99
```
10-
mkdir -p my_catkin_ws/src
11-
cd my_catkin_ws/src
12-
catkin_init_workspace
13-
rosinstall . https://raw.githubusercontent.com/ipa320/ros-model/master/docu/introspection.rosinstall
14-
cd my_catkin_ws
15-
catkin_make (or catkin build)
10+
cd YourRos2WS/src
11+
git clone git@github.com:ipa-nhg/ros2model.git
12+
cd YourRos2WS
13+
colcon build
1614
```
1715

18-
To start the monitoring software the snapshot node has to be started on the same machine where the software to be analysed is running:
16+
To ask the monitoring module to capture all the nodes running on the system, please use the following command:
1917

2018
```
21-
source my_catkin_ws/devel/setup.bash
22-
rosrun rosgraph_monitor rossystem_snapshot
19+
ros2 model running_node -ga -d ~/PathToModelsFolderOutput
2320
```
2421

25-
This script will generate automatically a new file (.rossystem) under the folder: 'rosgraph_monitor/results'.
22+
The folder **PathToModelsFolderOutput** will contain all the model files.
23+
24+
For a single node, the following command can be called:
25+
```
26+
ros2 model running_node [-o Outputfile] <node-name>
27+
```
28+
29+
For further information please check the [ros2model](https://github.com/ipa-cmh/ros2model) repository.

docu/NewRosModel.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
1+
:bangbang::bangbang::bangbang::bangbang: This tutorial is only working for previous versions of the RosTooling (v2)
2+
3+
14
## Create a ROS model from your code
25

36
Please be sure that the tool is installed and your workspace setup, see the [installation guide](../README.md) for further details.
47

5-
To extract your model from ROS code ou have 3 options:
6-
- [Use the available web interface to autogenerate models from code hosted on GitHub](#cloud)
8+
To extract your model from ROS code ou have 2 options:
79
- [Call our docker container configuration for the extraction from a GitHub hosted repository (requires only the installation of Docker)](#docker-container)
810
- [Use a local build of your ROS package (requires the local installation of HAROS)](#local-ros-workspace)
911

10-
### Cloud
11-
12-
Under the link [Model extractor](http://ros-model.seronet-project.de/) a web service to extract automatically models from existing open source ROS packages is available. The user only has to give as input the URL address of the repository (for example https://github.com/ipa320/cob_driver), the name of the package that contains the node to be analysed (for example cob_sick_s300) and the name of th node ( for example cob_sick_s300). The resulted model will be displayed on the right side of the window.
13-
14-
![alt text](images/cob_sick_s300_cloud.png)
15-
1612
### Docker container
1713

1814
Clone the repository [ros-model-extractors](https://github.com/ipa320/ros-model-extractors) and follow its [documentation instructions](https://github.com/ipa320/ros-model-extractors#ros-model-extractors).

docu/RosModelDescription.md

Lines changed: 182 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,182 @@
1-
## TBD
1+
# HOW TO DESCRIBE ROS NODES USING THE LANGUAGE
2+
3+
Component models have two types of extensions, either .ros1 for ROS version 1 packages and .ros2 for ROS 2 packages. In both cases the language allows to describe ros nodes and their interfaces.
4+
To create a new model, you can easily just create a new file with the correct extension.
5+
The textual editor contains checker embedded, for example:
6+
7+
![alt text](images/RosModelEmbededChecker.gif)
8+
9+
It incorporates also the auto-complete function. This is available by pressing **Ctrl** + the space bar:
10+
11+
![alt text](images/RosModelAutocomplete.gif)
12+
13+
## ROS (1)
14+
15+
In ros1 the grammar is as follows:
16+
```
17+
my_awesome_pkg:
18+
**fromGitRepo: ** "http://github.com/MyAccount/RepoName:BranchName"
19+
**artifacts:**
20+
awesome:
21+
**node:** awesome_node
22+
**publishers:**
23+
awesome_pub:
24+
**type:** "std_msgs/msg/Bool"
25+
**subscribers:**
26+
awesome_sub:
27+
**type:** "std_msgs/msg/Bool"
28+
**serviceclients:**
29+
awesome_client:
30+
**type:** "std_srvs/srv/Empty"
31+
**serviceservers:**
32+
awesome_server:
33+
**type:** "std_srvs/srv/Empty"
34+
**actionclients:**
35+
awesome_action:
36+
**type:** "control_msgs/action/JointTrajectory"
37+
**actionservers:**
38+
awesome_action:
39+
**type:** "control_msgs/action/JointTrajectory"
40+
**parameters:**
41+
awesome_param:
42+
**type:** String
43+
**default:** "Hello"
44+
```
45+
46+
For the known teleop ROS package the models looks like:
47+
48+
```
49+
teleop:
50+
artifacts:
51+
teleop_twist_joy_node:
52+
node: teleop_twist_joy_node
53+
publishers:
54+
cmd_vel:
55+
type: "geometry_msgs/msg/Twist"
56+
subscribers:
57+
joy:
58+
type:"sensor_msgs/msg/Joy"
59+
```
60+
61+
## ROS 2
62+
63+
The ros2 grammar is as follows:
64+
```
65+
my_awesome_pkg:
66+
**fromGitRepo: ** "http://github.com/MyAccount/RepoName:BranchName"
67+
**artifacts:**
68+
awesome:
69+
**node:** awesome_node
70+
**publishers:**
71+
awesome_pub:
72+
**type:** "std_msgs/msg/Bool"
73+
**qos:**
74+
**depth:** 10
75+
**durability:** volatile
76+
**history:** keep_all
77+
**profile:** default_qos
78+
**reliability:** best_effort
79+
**subscribers:**
80+
awesome_sub:
81+
**type:** "std_msgs/msg/Bool"
82+
**qos:**
83+
**depth:** 10
84+
**durability:** transient_local
85+
**history:** keep_last
86+
**profile:** sensor_qos
87+
**reliability:** reliable
88+
**serviceclients:**
89+
awesome_client:
90+
**type:** "std_srvs/srv/Empty"
91+
**qos:**
92+
**depth:** 10
93+
**durability:** volatile
94+
**history:** keep_all
95+
**profile:** services_qos
96+
**reliability:** best_effort
97+
**serviceservers:**
98+
awesome_server:
99+
**type:** "std_srvs/srv/Empty"
100+
**qos:**
101+
**depth:** 10
102+
**durability:** volatile
103+
**history:** keep_all
104+
**profile:** services_qos
105+
**reliability:** best_effort
106+
**actionclients:**
107+
awesome_action:
108+
**type:** "control_msgs/action/JointTrajectory"
109+
**qos:**
110+
**depth:** 10
111+
**durability:** volatile
112+
**history:** keep_all
113+
**profile:** default_qos
114+
**reliability:** best_effort
115+
**actionservers:**
116+
awesome_action:
117+
**type:** "control_msgs/action/JointTrajectory"
118+
**qos:**
119+
**depth:** 10
120+
**durability:** volatile
121+
**history:** keep_all
122+
**profile:** default_qos
123+
**reliability:** best_effort
124+
**parameters:**
125+
awesome_param:
126+
**type:** String
127+
**default:** "Hello"
128+
**qos:**
129+
**depth:** 10
130+
**durability:** volatile
131+
**history:** keep_all
132+
**profile:** parameter_qos
133+
**reliability:** best_effort
134+
```
135+
136+
The only remarkable difference with the ROS 1 model is that the quality of service can be defined for all the different interfaces. The quality of service atrributes are optional and they allow the following options:
137+
138+
- depth : it must be an integer.
139+
- durability: volatile / transient_local
140+
- history: keep_all / keep_last
141+
- profile: default_qos / sensor_qos / services_qos/ parameter_qos
142+
- reliability: best_effort / reliable
143+
144+
145+
See the following example for the [arucos_ros](https://github.com/pal-robotics/aruco_ros) driver:
146+
147+
```
148+
aruco_ros:
149+
fromGitRepo: "https://github.com/pal-robotics/aruco_ros.git:humble-devel"
150+
artifacts:
151+
marker_publisher:
152+
node: marker_publisher
153+
subscribers:
154+
image_raw:
155+
type: "sensor_msgs/msg/Image"
156+
publishers:
157+
debug:
158+
type: "sensor_msgs/msg/Image"
159+
markers:
160+
type: "aruco_msgs/msg/MarkerArray"
161+
markers_list:
162+
type: "std_msgs/msg/UInt32MultiArray"
163+
result:
164+
type: "sensor_msgs/msg/Image"
165+
parameters:
166+
camera_frame:
167+
type: String
168+
image_is_rectified:
169+
type: Boolean
170+
marker_size:
171+
type: Double
172+
reference_frame:
173+
type: String
174+
raw_image_topic:
175+
type: String
176+
use_camera_info:
177+
type: Boolean
178+
use_sim_time:
179+
type: Boolean
180+
camera_info_topic:
181+
type: String
182+
```
484 KB
Loading
443 KB
Loading

0 commit comments

Comments
 (0)