Skip to content

Remove traces of SequenceStar #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ list(APPEND BT_SOURCE
src/controls/reactive_sequence.cpp
src/controls/reactive_fallback.cpp
src/controls/sequence_node.cpp
src/controls/sequence_star_node.cpp
src/controls/sequence_with_memory_node.cpp
src/controls/switch_node.cpp
src/controls/while_do_else_node.cpp

Expand Down
4 changes: 2 additions & 2 deletions examples/test_files/Check.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<root>

<BehaviorTree ID="CheckStatus">
<SequenceStar>
<SequenceWithMemory>
<Action ID="CheckBattery"/>
<Action ID="CheckTemperature"/>
</SequenceStar>
</SequenceWithMemory>
</BehaviorTree>

</root>
4 changes: 2 additions & 2 deletions examples/test_files/subtrees/Talk.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<root BTCPP_format="4">

<BehaviorTree ID="SayStuff">
<SequenceStar>
<SequenceWithMemory>
<Action ID="SaySomething" message="Hello World"/>
<Action ID="SayHello"/>
</SequenceStar>
</SequenceWithMemory>
</BehaviorTree>

</root>
2 changes: 1 addition & 1 deletion include/behaviortree_cpp/behavior_tree.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "behaviortree_cpp/controls/reactive_fallback.h"
#include "behaviortree_cpp/controls/fallback_node.h"
#include "behaviortree_cpp/controls/sequence_node.h"
#include "behaviortree_cpp/controls/sequence_star_node.h"
#include "behaviortree_cpp/controls/sequence_with_memory_node.h"
#include "behaviortree_cpp/controls/switch_node.h"
#include "behaviortree_cpp/controls/if_then_else_node.h"
#include "behaviortree_cpp/controls/while_do_else_node.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace BT
{
/**
* @brief The SequenceStarNode is used to tick children in an ordered sequence.
* @brief The SequenceWithMemory is used to tick children in an ordered sequence.
* If any child returns RUNNING, previous children are not ticked again.
*
* - If all the children return SUCCESS, this node returns SUCCESS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include "behaviortree_cpp/controls/sequence_star_node.h"
#include "behaviortree_cpp/controls/sequence_with_memory_node.h"

namespace BT
{
SequenceWithMemory::SequenceWithMemory(const std::string& name) :
ControlNode::ControlNode(name, {}), current_child_idx_(0)
{
setRegistrationID("SequenceStar");
setRegistrationID("SequenceWithMemory");
}

NodeStatus SequenceWithMemory::tick()
Expand Down
4 changes: 2 additions & 2 deletions src/xml_parsing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -432,8 +432,8 @@ void VerifyXML(const std::string& xml_text,
"attribute [ID]");
}
}
else if (name == "Sequence" || name == "SequenceStar" ||
name == "Fallback")
else if (name == "Sequence" || name == "ReactiveSequence" ||
name == "SequenceWithMemory" || name == "Fallback")
{
if (children_count == 0)
{
Expand Down
8 changes: 4 additions & 4 deletions tests/navigation_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@ static const char* xml_text = R"(
<Inverter>
<Condition ID="IsStuck"/>
</Inverter>
<SequenceStar name="navigate">
<SequenceWithMemory name="navigate">
<Action ID="ComputePathToPose"/>
<Action ID="FollowPath"/>
</SequenceStar>
</SequenceWithMemory>
</ReactiveSequence>

<SequenceStar name="stuck_recovery">
<SequenceWithMemory name="stuck_recovery">
<Condition ID="IsStuck"/>
<Action ID="BackUpAndSpin"/>
</SequenceStar>
</SequenceWithMemory>

</Fallback>
</BehaviorTree>
Expand Down