From 51af7ad66cd3e1b2d46abdc4ffe77dda1f92f0ec Mon Sep 17 00:00:00 2001 From: Felipe Inostroza Date: Fri, 2 Jun 2023 10:03:49 -0400 Subject: [PATCH] FI: fixes bug when an action has a field that matches the subfield (eg a goal has a field named goal , or a feedback has a feedback in it) --- resource/interface_factories.cpp.em | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/resource/interface_factories.cpp.em b/resource/interface_factories.cpp.em index b831b47f..8571c40e 100644 --- a/resource/interface_factories.cpp.em +++ b/resource/interface_factories.cpp.em @@ -421,20 +421,20 @@ void ActionFactory_@(frm_)_@(to_)< @(field["ros" + frm]["name"])@(frm)_it != @(type.lower())@(frm).@(field["ros" + frm]["name"]).end() && @(field["ros" + to]["name"])@(to)_it != @(type.lower())@(to).@(field["ros" + to]["name"]).end() ) { - auto & @(field["ros" + frm]["name"])@(frm) = *(@(field["ros" + frm]["name"])@(frm)_it++); - auto & @(field["ros" + to]["name"])@(to) = *(@(field["ros" + to]["name"])@(to)_it++); + auto & @(field["ros" + frm]["name"])@(frm)_ = *(@(field["ros" + frm]["name"])@(frm)_it++); + auto & @(field["ros" + to]["name"])@(to)_ = *(@(field["ros" + to]["name"])@(to)_it++); @[ else]@ - auto & @(field["ros" + frm]["name"])@(frm) = @(type.lower())@(frm).@(field["ros" + frm]["name"]); - auto & @(field["ros" + to]["name"])@(to) = @(type.lower())@(to).@(field["ros" + to]["name"]); + auto & @(field["ros" + frm]["name"])@(frm)_ = @(type.lower())@(frm).@(field["ros" + frm]["name"]); + auto & @(field["ros" + to]["name"])@(to)_ = @(type.lower())@(to).@(field["ros" + to]["name"]); @[ end if]@ @[ if field["basic"]]@ @[ if field["ros2"]["type"].startswith("builtin_interfaces") ]@ - ros1_bridge::convert_@(frm)_to_@(to)(@(field["ros" + frm]["name"])@(frm), @(field["ros" + to]["name"])@(to)); + ros1_bridge::convert_@(frm)_to_@(to)(@(field["ros" + frm]["name"])@(frm)_, @(field["ros" + to]["name"])@(to)_); @[ else]@ - @(field["ros" + to]["name"])@(to) = @(field["ros" + frm]["name"])@(frm); + @(field["ros" + to]["name"])@(to)_ = @(field["ros" + frm]["name"])@(frm)_; @[ end if]@ @[ else]@ - Factory<@(field["ros1"]["cpptype"]),@(field["ros2"]["cpptype"])>::convert_@(frm)_to_@(to)(@(field["ros" + frm]["name"])@(frm), @(field["ros" + to]["name"])@(to)); + Factory<@(field["ros1"]["cpptype"]),@(field["ros2"]["cpptype"])>::convert_@(frm)_to_@(to)(@(field["ros" + frm]["name"])@(frm)_, @(field["ros" + to]["name"])@(to)_); @[end if]@ @[ if field["array"]]@ }