Skip to content

Commit

Permalink
HotFix: fix error for the launch file generator
Browse files Browse the repository at this point in the history
  • Loading branch information
ipa-nhg committed May 20, 2020
1 parent a41a2a7 commit 8155969
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<?xml version="1.0"?>
<launch>
<param name="param1" value=" hello"/>
<rosparam param="list">[ 1, 2, a]</rosparam>
<rosparam param="list">[ 1, 3]</rosparam>
<param name="param1" value="hello"/>
<rosparam param="list">[1,2,a]</rosparam>
<rosparam param="list">[1,3]</rosparam>
<rosparam>
first_element: 8
third_element: dsd
first_element:8
third_element:dsd
</rosparam>

<node pkg="test_pkg" type="test_node" name="test_node" cwd="node" respawn="false" output="screen">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,10 +281,10 @@ class RosSystemGenerator extends AbstractGenerator {
«FOR rosParameter:component.rosparameter»
«IF rosParameter.parameter.type.toString.contains("ParameterStructType")»
«FOR ParamMember:rosParameter.value.eContents»
<param name=«getParamName(ParamMember.eContents.get(0).toString)» value=«compile_param_value(convertParamValue(ParamMember.eContents.get(0).eContents.get(0)))» />
<param name="«getParamName(ParamMember.eContents.get(0).toString)»" value="«compile_param_value(convertParamValue(ParamMember.eContents.get(0).eContents.get(0)))»" />
«ENDFOR»
«ELSE»
«IF rosParameter.value!==null»<param name=«rosParameter.parameter.name» value=«compile_param_value(rosParameter.value)» />«ENDIF»
«IF rosParameter.value!==null»<param name="«rosParameter.parameter.name»" value="«compile_param_value(rosParameter.value" />«ENDIF»
«ENDIF»
«ENDFOR»
</node>
Expand Down Expand Up @@ -589,12 +589,12 @@ def compile_pkg(ComponentInterface component)
value_return =""
param_value = paramValue.toString
if (param_value.contains("(value:")){
value_return= param_value.substring(param_value.indexOf("value:")+6,param_value.indexOf(")"))
value_return= param_value.substring(param_value.indexOf("value:")+7,param_value.indexOf(")"))
} else if(param_value.contains("ParameterSequenceImpl")){
value_return+="{"
for(param: paramValue.eContents){
if (param.toString.contains("(value:")){
value_return+=param.toString.substring(param.toString.indexOf("value:")+6,param.toString.indexOf(")"))
value_return+=param.toString.substring(param.toString.indexOf("value:")+7,param.toString.indexOf(")"))
} else {
for(subparam: param.eContents){
if (subparam.toString.contains("ParameterStructMemberImpl")){
Expand All @@ -617,12 +617,12 @@ def compile_pkg(ComponentInterface component)
value_return =""
param_value = paramValue.toString
if (param_value.contains("(value:")){
value_return= param_value.substring(param_value.indexOf("value:")+6,param_value.indexOf(")"))
value_return= param_value.substring(param_value.indexOf("value:")+7,param_value.indexOf(")"))
} else if(param_value.contains("ParameterSequenceImpl")){
value_return+="["
for(param: paramValue.eContents){
if (param.toString.contains("(value:")){
value_return+=param.toString.substring(param.toString.indexOf("value:")+6,param.toString.indexOf(")"))
value_return+=param.toString.substring(param.toString.indexOf("value:")+7,param.toString.indexOf(")"))
value_return+=","

}}
Expand Down

0 comments on commit 8155969

Please sign in to comment.