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
We facilitate a couple of tools to auto generate the corresponding model (these tools work only for messages and services, the action types, in the majority of the cases, have to be unfortunately implemented manually):
6
-
7
-
- Use our cloud facilities : [ROS Model Extractor](http://ros-model.seronet-project.de/) and navigate to the tag "Specification Analysis". There, if the package that contains the message types is released for Melodic you just have to give the name of the package and press **Submit**. Otherwise please specify first the name of the Git repository that hold the package
8
-
9
-
- Use locally the helper script (:bangbang::bangbang: this method requires a local ROS installation):
5
+
For the autogeneration of of model objects we facilitate a bash (:bangbang::bangbang: this method requires a local ROS installation):
@@ -24,30 +20,91 @@ To modify the ROS models (.ros) manually the ROS tooling provides a customized e
24
20
This editor contains an autocomplete function (by pressing Ctrl+Space) and will report any error made by editing. The first step is define a PackageSet (that correspond to a metapackage for ROS, this definition is optional and its name can be kept empty). Then, the ROS package which contains the msgs have to be defined and within it the option "spec" have to be selected to write down the objects. In the practice that means that the initial *.ros file that describes ROS objects looks:
The grammar supports 3 types of communication objects TopicSpec (to describe ROS msgs), ServiceSpec (to describe ROS srvs) and ActionSpec (to describe ROS actions), and consequentially each of these 3 types support different specifications types:
30
+
The grammar supports 3 types of communication objects messages, services and actions, and consequentially each of these 3 types support different specifications types:
-> Example ```ActionSpec Say { goal { string test } result { bool sucess string message} feedback {} }```
93
+
For example:
94
+
```
95
+
control_msgs:
96
+
actions:
97
+
PointHead
98
+
goal
99
+
'geometry_msgs/msg/PointStamped'[] target
100
+
'geometry_msgs/msg/Vector3'[] pointing_axis
101
+
string pointing_frame
102
+
'builtin_interfaces/msg/Duration'[] min_duration
103
+
float64 max_velocity
104
+
result
105
+
feedback
106
+
float64 pointing_angle_error
107
+
```
51
108
52
109
Where , quite similar to ROS, the allowed element types are:
53
110
@@ -69,47 +126,86 @@ Where , quite similar to ROS, the allowed element types are:
69
126
70
127
- Relative reference to other object:
71
128
- NameOftheObject (if it is described within the same ROS package) -> for example **Point32**
72
-
- 'ROSPackage_name.NameOftheObject' (if it is described in other ROS package) -> for example **'geometry_msgs.Point32'**
129
+
- 'ROSPackage_name/NameOftheObject' (if it is described in other ROS package) -> for example **'geometry_msgs/Point32'**
73
130
74
131
- Arrays of element types:
75
-
- ElementType[] -> for example **string[]** or **Point32[]** or **'geometry_msgs.Point32'[]**
132
+
- ElementType[] -> for example **string[]** or **Point32[]** or **'geometry_msgs/Point32'[]**
76
133
77
134
78
135
Additionally the definition of constants with its value is also supported and follows a patter very similar to the ROS one: ```constanttype1 CONSTANTNAME1=constantvalue1```, for example ```byte OK=0 byte WARN=1 byte ERROR=2 byte STALE=3```.
79
136
80
137
The following extract shows the ROS model description correspondent to the [nav_msgs](http://wiki.ros.org/nav_msgs) package:
:bangbang::bangbang: This model doesn't allow the creation of 2 specification with the same name, although they have different types. That means a ROS model like the following one is not allow:
The reason is that when one of these objects have to be referenced during the definition of a node it will be imposible for the model to distinguish which is the correct one (both are defined as my_msgs.Hello and whitin the dame model file). For these cases we recommend to split the objects into two different model files.
209
+
The reason is that when one of these objects have to be referenced during the definition of a node it will be imposible for the model to distinguish which is the correct one (both are defined as my_msgs/Hello and whitin the dame model file). For these cases we recommend to split the objects into two different model files.
114
210
115
211
The repository [RosCommonObjects](https://github.com/ipa320/RosCommonObjects) holds further examples.
0 commit comments