Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad5dfc2

Browse files
author
Davide Faconti
committed
2 parents 75af6ab + 79a8abc commit ad5dfc2

File tree

3 files changed

+8
-16
lines changed

3 files changed

+8
-16
lines changed

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ complex.
5757

5858
The usual approach to manage complexity, heterogeneity and scalability is to
5959
use the concept of
60-
[Component Base Software Engineering](https://en.wikipedia.org/wiki/Component-based_software_engineering).
60+
[Component Based Software Engineering](https://en.wikipedia.org/wiki/Component-based_software_engineering).
6161

6262
Any existing middleware for robotics took this approach either informally or formally,
6363
being [ROS](http://www.ros.org), [YARP](http://www.yarp.it) and

docs/tutorial_06_subtree_ports.md

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,14 @@ remapping is done entirely in the XML definition.
1616

1717
Let's consider this Beahavior Tree.
1818

19-
```XML hl_lines="8 9"
19+
```XML hl_lines="7"
2020
<root main_tree_to_execute = "MainTree">
2121

2222
<BehaviorTree ID="MainTree">
2323

2424
<Sequence name="main_sequence">
2525
<SetBlackboard output_key="move_goal" value="1;2;3" />
26-
<SubTree ID="MoveRobot">
27-
<remap internal="target" external="move_goal"/>
28-
<remap internal="output" external="move_result"/>
29-
</SubTree>
26+
<SubTree ID="MoveRobot" target="move_goal" output="move_result" />
3027
<SaySomething message="{move_result}"/>
3128
</Sequence>
3229

src/xml_parsing.cpp

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,12 @@ void VerifyXML(const std::string& xml_text,
324324
for (auto child = node->FirstChildElement(); child != nullptr;
325325
child = child->NextSiblingElement())
326326
{
327-
if( StrEqual(child->Name(), "remap") == false)
327+
if( StrEqual(child->Name(), "remap") )
328328
{
329-
ThrowError(node->GetLineNum(),
330-
"<SubTree> accept only childs of type <remap>");
329+
ThrowError(node->GetLineNum(), "<remap> was deprecated");
330+
}
331+
else{
332+
ThrowError(node->GetLineNum(), "<SubTree> should not have any child");
331333
}
332334
}
333335

@@ -614,13 +616,6 @@ void BT::XMLParser::Pimpl::recursivelyCreateTree(const std::string& tree_ID,
614616
{
615617
auto new_bb = Blackboard::create(blackboard);
616618

617-
for (auto remap_el = element->FirstChildElement("remap"); remap_el != nullptr;
618-
remap_el = remap_el->NextSiblingElement("remap"))
619-
{
620-
new_bb->addSubtreeRemapping( remap_el->Attribute("internal"),
621-
remap_el->Attribute("external") );
622-
}
623-
624619
for (const XMLAttribute* attr = element->FirstAttribute(); attr != nullptr; attr = attr->Next())
625620
{
626621
new_bb->addSubtreeRemapping( attr->Name(), attr->Value() );

0 commit comments

Comments
 (0)