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
1. Include in the server binding links and change to none instead of localhost.
2. Include the link to the non-negative less than 232.
3. Explain better the message binding with links.
4. Put at the end a whole example of a ROS application with its explanation.
Copy file name to clipboardExpand all lines: ros2/README.md
+110-21
Original file line number
Diff line number
Diff line change
@@ -16,22 +16,23 @@ Current version is `0.1.0`.
16
16
17
17
This object contains information about the server representation in ROS 2.
18
18
ROS 2 can use either DDS or Zenoh as its middleware.
19
-
DDS is decentralized with no central server, so the field `host` can be set to `localhost`.
19
+
DDS is decentralized with no central server, so the field `host` can set to `none`.
20
+
For more information on DDS tuning, you can visit the [DDS Tuning Guide](https://docs.ros.org/en/rolling/How-To-Guides/DDS-tuning.html).
20
21
When using Zenoh, the `host` field specifies the Zenoh Router IP address.
21
22
22
23
###### Fixed Fields
23
24
24
25
Field Name | Type | Description
25
26
---|:---:|---|
26
-
`rmwImplementation` | string | Specifies the ROS 2 middleware implementation to be used. Valid values include the different [ROS 2 middleware vendors](https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Different-Middleware-Vendors.html). This determines the underlying middleware implementation that handles communication.
27
-
`domainId` | integer | All ROS 2 nodes use domain ID 0 by default. To prevent interference between different groups of computers running ROS 2 on the same network, a group can be set with a unique domain ID. Must be a non-negative integer less than 232.
27
+
`rmwImplementation` | string | Specifies the ROS 2 middleware implementation to be used. Valid values include the different [ROS 2 middleware vendors (RMW)](https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Different-Middleware-Vendors.html) like `rmw_fastrtps_cpp` (Fast DDS) or `rmw_zenoh_cpp` (Zenoh). This determines the underlying middleware implementation that handles communication.
28
+
`domainId` | integer | All ROS 2 nodes use domain ID 0 by default. To prevent interference between different groups of computers running ROS 2 on the same network, a group can be set with a unique domain ID. [Must be a non-negative integer less than 232](https://docs.ros.org/en/rolling/Concepts/Intermediate/About-Domain-ID.html).
28
29
29
30
### Examples
30
31
31
32
```yaml
32
33
servers:
33
34
ros2:
34
-
host: localhost
35
+
host: none
35
36
protocol: ros2
36
37
protocolVersion: humble
37
38
bindings:
@@ -82,22 +83,22 @@ Field Name | Type | Description
82
83
ROS 2 subscriber example:
83
84
84
85
```yaml
85
-
receiveCmdVel:
86
-
action: receive
87
-
channel:
88
-
$ref: "#/channels/CmdVel"
89
-
bindings:
90
-
ros2:
91
-
role: subscriber
92
-
node: /turtlesim
93
-
qosPolicies:
94
-
history: unknown
95
-
reliability: reliable
96
-
durability: volatile
97
-
lifespan: -1
98
-
deadline: -1
99
-
liveliness: automatic
100
-
leaseDuration: -1
86
+
receiveCmdVel:
87
+
action: receive
88
+
channel:
89
+
$ref: "#/channels/CmdVel"
90
+
bindings:
91
+
ros2:
92
+
role: subscriber
93
+
node: /turtlesim
94
+
qosPolicies:
95
+
history: unknown
96
+
reliability: reliable
97
+
durability: volatile
98
+
lifespan: -1
99
+
deadline: -1
100
+
liveliness: automatic
101
+
leaseDuration: -1
101
102
```
102
103
103
104
ROS 2 publisher example:
@@ -176,4 +177,92 @@ RotateAbsolute:
176
177
177
178
## Message Binding Object
178
179
179
-
This object MUST NOT contain any properties. Its name is reserved for future use.
180
+
While this object DOES NOT contain any ROS 2 specific properties, it is important to understand how to express the different [ROS2 data types](https://design.ros2.org/articles/legacy_interface_definition.html#:~:text=to%20IDL%20types-,ROS%20type,string,-The%20mapping%20of) in [AsyncAPI message types and formats](https://www.asyncapi.com/docs/reference/specification/v3.0.0#dataTypeFormat:~:text=The%20formats%20defined%20by%20the%20AsyncAPI%20Specification%20are%3A).
181
+
182
+
ROS 2 Type | AsyncAPI Type | AsyncAPI Format |
183
+
---|:---:|---|
184
+
bool | boolean | boolean
185
+
byte | string | octet
186
+
char | integer | uint8
187
+
float32 | number | float
188
+
float64 | number | double
189
+
int8 | integer | int8
190
+
uint8 | integer | uint8
191
+
int16 | integer | int16
192
+
uint16 | integer | uint16
193
+
int32 | integer | int32
194
+
uint32 | integer | uint32
195
+
int64 | integer | int64
196
+
uint64 | integer | uint64
197
+
string | string | string
198
+
array | array | --
199
+
200
+
201
+
## Complete example:
202
+
From the AsyncAPI specification example it could be extracted that:
203
+
- It consist on a ROS2 jazzy application running with Fast DDS as RMW.
204
+
- `/turtlesim`node is a subscriber of the `/turtle1/cmd_vel` topic and its qos policies.
205
+
- The interface of the `/turtle1/cmd_vel` topic is `Twist` that has a nested type: `Vector3`
206
+
- `Vector3`has already the types converted to AsyncAPI types and formats (number and double), instead of using the ROS2 types.
0 commit comments