Skip to content

Commit

Permalink
Debug parameters definition and add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-nhg committed Feb 7, 2024
1 parent 8976943 commit 951c212
Show file tree
Hide file tree
Showing 37 changed files with 11,430 additions and 10,514 deletions.
13 changes: 12 additions & 1 deletion docu/RosModelDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ The only remarkable difference with the ROS 1 model is that the quality of servi
- profile: default_qos / sensor_qos / services_qos/ parameter_qos
- reliability: best_effort / reliable

The type of supported parameters are:
- Boolean
- Double
- String
- Integer
- Base64
- List [Type, Type]
- Array [Type]
- Struct [Name Type, Name Type]

For more details please check the following [examples](ParametersAPI.md).

See the following example for the [arucos_ros](https://github.com/pal-robotics/aruco_ros) driver:

Expand Down Expand Up @@ -188,4 +199,4 @@ The textual editor contains checker embedded, for example:

It incorporates also the auto-complete function. This is available by pressing **Ctrl** + the space bar:

![alt text](images/RosModelAutocomplete.gif)
![alt text](images/RosModelAutocomplete.gif)
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getParameterAnyTypeAccess().getGroup(), "rule__ParameterAnyType__Group__0");
builder.put(grammarAccess.getParameterAnyTypeAccess().getGroup_2(), "rule__ParameterAnyType__Group_2__0");
builder.put(grammarAccess.getParameterArrayTypeAccess().getGroup(), "rule__ParameterArrayType__Group__0");
builder.put(grammarAccess.getParameterArrayTypeAccess().getGroup_2(), "rule__ParameterArrayType__Group_2__0");
builder.put(grammarAccess.getParameterArrayTypeAccess().getGroup_4(), "rule__ParameterArrayType__Group_4__0");
builder.put(grammarAccess.getParameterListAccess().getGroup(), "rule__ParameterList__Group__0");
builder.put(grammarAccess.getParameterListAccess().getGroup_3(), "rule__ParameterList__Group_3__0");
builder.put(grammarAccess.getParameterAnyAccess().getGroup(), "rule__ParameterAny__Group__0");
Expand Down Expand Up @@ -136,8 +136,8 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getParameterBooleanTypeAccess().getDefaultAssignment_2_1(), "rule__ParameterBooleanType__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterBase64TypeAccess().getDefaultAssignment_2_1(), "rule__ParameterBase64Type__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterAnyTypeAccess().getDefaultAssignment_2_1(), "rule__ParameterAnyType__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_1(), "rule__ParameterArrayType__TypeAssignment_1");
builder.put(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_2_1(), "rule__ParameterArrayType__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_2(), "rule__ParameterArrayType__TypeAssignment_2");
builder.put(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_4_1(), "rule__ParameterArrayType__DefaultAssignment_4_1");
builder.put(grammarAccess.getParameterListAccess().getValueAssignment_2(), "rule__ParameterList__ValueAssignment_2");
builder.put(grammarAccess.getParameterListAccess().getValueAssignment_3_1(), "rule__ParameterList__ValueAssignment_3_1");
builder.put(grammarAccess.getParameterAnyAccess().getValueAssignment_2_1(), "rule__ParameterAny__ValueAssignment_2_1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getParameterAnyTypeAccess().getGroup(), "rule__ParameterAnyType__Group__0");
builder.put(grammarAccess.getParameterAnyTypeAccess().getGroup_2(), "rule__ParameterAnyType__Group_2__0");
builder.put(grammarAccess.getParameterArrayTypeAccess().getGroup(), "rule__ParameterArrayType__Group__0");
builder.put(grammarAccess.getParameterArrayTypeAccess().getGroup_2(), "rule__ParameterArrayType__Group_2__0");
builder.put(grammarAccess.getParameterArrayTypeAccess().getGroup_4(), "rule__ParameterArrayType__Group_4__0");
builder.put(grammarAccess.getParameterListAccess().getGroup(), "rule__ParameterList__Group__0");
builder.put(grammarAccess.getParameterListAccess().getGroup_3(), "rule__ParameterList__Group_3__0");
builder.put(grammarAccess.getParameterAnyAccess().getGroup(), "rule__ParameterAny__Group__0");
Expand Down Expand Up @@ -228,8 +228,8 @@ private static void init(ImmutableMap.Builder<AbstractElement, String> builder,
builder.put(grammarAccess.getParameterBooleanTypeAccess().getDefaultAssignment_2_1(), "rule__ParameterBooleanType__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterBase64TypeAccess().getDefaultAssignment_2_1(), "rule__ParameterBase64Type__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterAnyTypeAccess().getDefaultAssignment_2_1(), "rule__ParameterAnyType__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_1(), "rule__ParameterArrayType__TypeAssignment_1");
builder.put(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_2_1(), "rule__ParameterArrayType__DefaultAssignment_2_1");
builder.put(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_2(), "rule__ParameterArrayType__TypeAssignment_2");
builder.put(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_4_1(), "rule__ParameterArrayType__DefaultAssignment_4_1");
builder.put(grammarAccess.getParameterListAccess().getValueAssignment_2(), "rule__ParameterList__ValueAssignment_2");
builder.put(grammarAccess.getParameterListAccess().getValueAssignment_3_1(), "rule__ParameterList__ValueAssignment_3_1");
builder.put(grammarAccess.getParameterAnyAccess().getValueAssignment_2_1(), "rule__ParameterAny__ValueAssignment_2_1");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4110,9 +4110,9 @@ rule__ParameterArrayType__Group__1__Impl
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_1()); }
(rule__ParameterArrayType__TypeAssignment_1)
{ after(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_1()); }
{ before(grammarAccess.getParameterArrayTypeAccess().getLeftSquareBracketKeyword_1()); }
LeftSquareBracket
{ after(grammarAccess.getParameterArrayTypeAccess().getLeftSquareBracketKeyword_1()); }
)
;
finally {
Expand All @@ -4125,6 +4125,7 @@ rule__ParameterArrayType__Group__2
}
:
rule__ParameterArrayType__Group__2__Impl
rule__ParameterArrayType__Group__3
;
finally {
restoreStackSize(stackSize);
Expand All @@ -4136,63 +4137,116 @@ rule__ParameterArrayType__Group__2__Impl
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getGroup_2()); }
(rule__ParameterArrayType__Group_2__0)?
{ after(grammarAccess.getParameterArrayTypeAccess().getGroup_2()); }
{ before(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_2()); }
(rule__ParameterArrayType__TypeAssignment_2)
{ after(grammarAccess.getParameterArrayTypeAccess().getTypeAssignment_2()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group__3
@init {
int stackSize = keepStackSize();
}
:
rule__ParameterArrayType__Group__3__Impl
rule__ParameterArrayType__Group__4
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group__3__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getRightSquareBracketKeyword_3()); }
RightSquareBracket
{ after(grammarAccess.getParameterArrayTypeAccess().getRightSquareBracketKeyword_3()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group__4
@init {
int stackSize = keepStackSize();
}
:
rule__ParameterArrayType__Group__4__Impl
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group__4__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getGroup_4()); }
(rule__ParameterArrayType__Group_4__0)?
{ after(grammarAccess.getParameterArrayTypeAccess().getGroup_4()); }
)
;
finally {
restoreStackSize(stackSize);
}


rule__ParameterArrayType__Group_2__0
rule__ParameterArrayType__Group_4__0
@init {
int stackSize = keepStackSize();
}
:
rule__ParameterArrayType__Group_2__0__Impl
rule__ParameterArrayType__Group_2__1
rule__ParameterArrayType__Group_4__0__Impl
rule__ParameterArrayType__Group_4__1
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group_2__0__Impl
rule__ParameterArrayType__Group_4__0__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getDefaultKeyword_2_0()); }
{ before(grammarAccess.getParameterArrayTypeAccess().getDefaultKeyword_4_0()); }
Default
{ after(grammarAccess.getParameterArrayTypeAccess().getDefaultKeyword_2_0()); }
{ after(grammarAccess.getParameterArrayTypeAccess().getDefaultKeyword_4_0()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group_2__1
rule__ParameterArrayType__Group_4__1
@init {
int stackSize = keepStackSize();
}
:
rule__ParameterArrayType__Group_2__1__Impl
rule__ParameterArrayType__Group_4__1__Impl
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__Group_2__1__Impl
rule__ParameterArrayType__Group_4__1__Impl
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_2_1()); }
(rule__ParameterArrayType__DefaultAssignment_2_1)
{ after(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_2_1()); }
{ before(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_4_1()); }
(rule__ParameterArrayType__DefaultAssignment_4_1)
{ after(grammarAccess.getParameterArrayTypeAccess().getDefaultAssignment_4_1()); }
)
;
finally {
Expand Down Expand Up @@ -6801,30 +6855,30 @@ finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__TypeAssignment_1
rule__ParameterArrayType__TypeAssignment_2
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getTypeParameterTypeParserRuleCall_1_0()); }
{ before(grammarAccess.getParameterArrayTypeAccess().getTypeParameterTypeParserRuleCall_2_0()); }
ruleParameterType
{ after(grammarAccess.getParameterArrayTypeAccess().getTypeParameterTypeParserRuleCall_1_0()); }
{ after(grammarAccess.getParameterArrayTypeAccess().getTypeParameterTypeParserRuleCall_2_0()); }
)
;
finally {
restoreStackSize(stackSize);
}

rule__ParameterArrayType__DefaultAssignment_2_1
rule__ParameterArrayType__DefaultAssignment_4_1
@init {
int stackSize = keepStackSize();
}
:
(
{ before(grammarAccess.getParameterArrayTypeAccess().getDefaultParameterListParserRuleCall_2_1_0()); }
{ before(grammarAccess.getParameterArrayTypeAccess().getDefaultParameterListParserRuleCall_4_1_0()); }
ruleParameterList
{ after(grammarAccess.getParameterArrayTypeAccess().getDefaultParameterListParserRuleCall_2_1_0()); }
{ after(grammarAccess.getParameterArrayTypeAccess().getDefaultParameterListParserRuleCall_4_1_0()); }
)
;
finally {
Expand Down
Loading

0 comments on commit 951c212

Please sign in to comment.