Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iri_base_bt_client
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
labrobotica
ros
iri_core
iri_base_bt_client
Commits
86ac6d8c
Commit
86ac6d8c
authored
4 years ago
by
Alejandro Lopez Gestoso
Browse files
Options
Downloads
Patches
Plain Diff
Added async_is_tree_start and async_is_tree_stop
parent
27963fb1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/iri_bt_basic_nodes.h
+2
-0
2 additions, 0 deletions
include/iri_bt_basic_nodes.h
src/iri_bt_basic_nodes.cpp
+18
-0
18 additions, 0 deletions
src/iri_bt_basic_nodes.cpp
with
20 additions
and
0 deletions
include/iri_bt_basic_nodes.h
+
2
−
0
View file @
86ac6d8c
...
...
@@ -39,7 +39,9 @@ class IriBTBasicNodes
BT
::
NodeStatus
NOP
(
void
);
// functions to check whether start or restart have been demanded by the user
BT
::
NodeStatus
is_not_start_tree
(
void
);
BT
::
NodeStatus
async_is_start_tree
(
void
);
BT
::
NodeStatus
is_not_stop_tree
(
void
);
BT
::
NodeStatus
async_is_stop_tree
(
void
);
// functions set start or restart variables
BT
::
NodeStatus
set_start_tree
(
void
);
...
...
This diff is collapsed.
Click to expand it.
src/iri_bt_basic_nodes.cpp
+
18
−
0
View file @
86ac6d8c
...
...
@@ -12,7 +12,9 @@ void IriBTBasicNodes::init(IriBehaviorTreeFactory &factory)
factory
.
registerIriAsyncAction
(
"NOP"
,
std
::
bind
(
&
IriBTBasicNodes
::
NOP
,
this
));
factory
.
registerSimpleCondition
(
"is_not_start_tree"
,
std
::
bind
(
&
IriBTBasicNodes
::
is_not_start_tree
,
this
));
factory
.
registerIriAsyncAction
(
"async_is_start_tree"
,
std
::
bind
(
&
IriBTBasicNodes
::
async_is_start_tree
,
this
));
factory
.
registerSimpleCondition
(
"is_not_stop_tree"
,
std
::
bind
(
&
IriBTBasicNodes
::
is_not_stop_tree
,
this
));
factory
.
registerIriAsyncAction
(
"async_is_stop_tree"
,
std
::
bind
(
&
IriBTBasicNodes
::
async_is_stop_tree
,
this
));
factory
.
registerSimpleAction
(
"set_start_tree"
,
std
::
bind
(
&
IriBTBasicNodes
::
set_start_tree
,
this
));
factory
.
registerSimpleAction
(
"set_stop_tree"
,
std
::
bind
(
&
IriBTBasicNodes
::
set_stop_tree
,
this
));
...
...
@@ -33,6 +35,14 @@ BT::NodeStatus IriBTBasicNodes::is_not_start_tree(void)
return
BT
::
NodeStatus
::
SUCCESS
;
}
BT
::
NodeStatus
IriBTBasicNodes
::
async_is_start_tree
(
void
)
{
if
(
this
->
tree_start
)
return
BT
::
NodeStatus
::
SUCCESS
;
else
return
BT
::
NodeStatus
::
RUNNING
;
}
BT
::
NodeStatus
IriBTBasicNodes
::
is_not_stop_tree
(
void
)
{
if
(
this
->
tree_stop
)
...
...
@@ -41,6 +51,14 @@ BT::NodeStatus IriBTBasicNodes::is_not_stop_tree(void)
return
BT
::
NodeStatus
::
SUCCESS
;
}
BT
::
NodeStatus
IriBTBasicNodes
::
async_is_stop_tree
(
void
)
{
if
(
this
->
tree_stop
)
return
BT
::
NodeStatus
::
SUCCESS
;
else
return
BT
::
NodeStatus
::
RUNNING
;
}
BT
::
NodeStatus
IriBTBasicNodes
::
set_start_tree
(
void
)
{
this
->
tree_start
=
true
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment