Skip to content

Commit 492695e

Browse files
authored
feat: ros2 bindings (#589)
Co-authored-by: Pavel Bodiachevskii <PavelBodyachevskiy@gmail.com>
1 parent 6e0563f commit 492695e

File tree

9 files changed

+636
-442
lines changed

9 files changed

+636
-442
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
/bindings/pulsar/ @VisualBean
1818
/bindings/sns/ @dpwdec @iancooper
1919
/bindings/sqs/ @dpwdec @iancooper
20+
/bindings/ros2/ @gramss @amparosancho
2021

2122
/bindings/*.json @KhudaDad414

bindings/ros2/0.1.0/operation.json

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "http://asyncapi.com/bindings/ros2/0.1.0/operation.json",
4+
"description": "This object contains information about the operation representation in ROS 2.",
5+
"examples": [
6+
{
7+
"node": "/turtlesim",
8+
"qosPolicies": {
9+
"deadline": "-1",
10+
"durability": "volatile",
11+
"history": "unknown",
12+
"leaseDuration": "-1",
13+
"lifespan": "-1",
14+
"liveliness": "automatic",
15+
"reliability": "reliable"
16+
},
17+
"role": "subscriber"
18+
}
19+
],
20+
"type": "object",
21+
"required": [ "role", "node" ],
22+
"properties": {
23+
"bindingVersion": {
24+
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
25+
"type": "string",
26+
"enum": [ "0.1.0" ]
27+
},
28+
"node": {
29+
"description": "The name of the ROS 2 node that implements this operation.",
30+
"type": "string"
31+
},
32+
"qosPolicies": {
33+
"type": "object",
34+
"properties": {
35+
"deadline": {
36+
"description": "The expected maximum amount of time between subsequent messages being published to a topic. -1 means infinite.",
37+
"type": "integer"
38+
},
39+
"durability": {
40+
"description": "Persistence specification that determines message availability for late-joining subscribers",
41+
"type": "string",
42+
"enum": [ "transient_local", "volatile" ]
43+
},
44+
"history": {
45+
"description": "Policy parameter that defines the maximum number of samples maintained in the middleware queue",
46+
"type": "string",
47+
"enum": [ "keep_last", "keep_all", "unknown" ]
48+
},
49+
"leaseDuration": {
50+
"description": "The maximum period of time a publisher has to indicate that it is alive before the system considers it to have lost liveliness. -1 means infinite.",
51+
"type": "integer"
52+
},
53+
"lifespan": {
54+
"description": "The maximum amount of time between the publishing and the reception of a message without the message being considered stale or expired. -1 means infinite.",
55+
"type": "integer"
56+
},
57+
"liveliness": {
58+
"description": "Defines the mechanism by which the system monitors and determines the operational status of communication entities within the network.",
59+
"type": "string",
60+
"enum": [ "automatic", "manual" ]
61+
},
62+
"reliability": {
63+
"description": "Specifies the communication guarantee model that determines whether message delivery confirmation between publisher and subscriber is required.",
64+
"type": "string",
65+
"enum": [ "best_effort", "realiable" ]
66+
}
67+
}
68+
},
69+
"role": {
70+
"description": "Specifies the ROS 2 type of the node for this operation.",
71+
"type": "string",
72+
"enum": [
73+
"publisher",
74+
"action_client",
75+
"service_client",
76+
"subscriber",
77+
"action_server",
78+
"service_server"
79+
]
80+
}
81+
},
82+
"patternProperties": {
83+
"^x-[\\w\\d\\.\\x2d_]+$": {
84+
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
85+
}
86+
},
87+
"additionalProperties": false
88+
}

bindings/ros2/0.1.0/server.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "http://asyncapi.com/bindings/ros2/0.1.0/server.json",
4+
"description": "This object contains information about the server representation in ROS 2.",
5+
"examples": [
6+
{
7+
"domainId": "0",
8+
"rmwImplementation": "rmw_fastrtps_cpp"
9+
}
10+
],
11+
"type": "object",
12+
"required": [ "host", "protocol" ],
13+
"properties": {
14+
"bindingVersion": {
15+
"description": "The version of this binding. If omitted, 'latest' MUST be assumed.",
16+
"type": "string",
17+
"enum": [ "0.1.0" ]
18+
},
19+
"domainId": {
20+
"description": "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.",
21+
"type": "integer",
22+
"maximum": 231,
23+
"minimum": 0
24+
},
25+
"rmwImplementation": {
26+
"description": "Specifies the ROS 2 middleware implementation to be used. This determines the underlying middleware implementation that handles communication.",
27+
"type": "string"
28+
}
29+
},
30+
"patternProperties": {
31+
"^x-[\\w\\d\\.\\x2d_]+$": {
32+
"$ref": "http://asyncapi.com/definitions/3.0.0/specificationExtension.json"
33+
}
34+
}
35+
}

definitions/3.1.0/operationBindingsObject.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,41 @@
214214
}
215215
},
216216
"redis": {},
217+
"ros2": {
218+
"properties": {
219+
"bindingVersion": {
220+
"enum": ["0.1.0"]
221+
}
222+
},
223+
"allOf": [
224+
{
225+
"description": "If no bindingVersion specified, use the latest binding",
226+
"if": {
227+
"not": {
228+
"required": [
229+
"bindingVersion"
230+
]
231+
}
232+
},
233+
"then": {
234+
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/operation.json"
235+
}
236+
},
237+
{
238+
"if": {
239+
"required": [ "bindingVersion" ],
240+
"properties": {
241+
"bindingVersion": {
242+
"const": "0.1.0"
243+
}
244+
}
245+
},
246+
"then": {
247+
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/operation.json"
248+
}
249+
}
250+
]
251+
},
217252
"sns": {
218253
"allOf": [
219254
{

definitions/3.1.0/serverBindingsObject.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,41 @@
202202
}
203203
},
204204
"redis": {},
205+
"ros2": {
206+
"properties": {
207+
"bindingVersion": {
208+
"enum": ["0.1.0"]
209+
}
210+
},
211+
"allOf": [
212+
{
213+
"description": "If no bindingVersion specified, use the latest binding",
214+
"if": {
215+
"not": {
216+
"required": [
217+
"bindingVersion"
218+
]
219+
}
220+
},
221+
"then": {
222+
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/server.json"
223+
}
224+
},
225+
{
226+
"if": {
227+
"required": [ "bindingVersion" ],
228+
"properties": {
229+
"bindingVersion": {
230+
"const": "0.1.0"
231+
}
232+
}
233+
},
234+
"then": {
235+
"$ref": "http://asyncapi.com/bindings/ros2/0.1.0/server.json"
236+
}
237+
}
238+
]
239+
},
205240
"sns": {},
206241
"solace": {
207242
"allOf": [

0 commit comments

Comments
 (0)