Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2
210910794
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Summer2021
210910794
Commits
63fb5ea8
Commit
63fb5ea8
authored
5 years ago
by
Michael Jeronimo
Committed by
Carl Delsey
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix rate controller issue (#1386)
Once the child node begins to run, it should continue to run until completion.
parent
8cb73c8f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nav2_behavior_tree/plugins/decorator/rate_controller.cpp
+6
-2
6 additions, 2 deletions
nav2_behavior_tree/plugins/decorator/rate_controller.cpp
with
6 additions
and
2 deletions
nav2_behavior_tree/plugins/decorator/rate_controller.cpp
+
6
−
2
View file @
63fb5ea8
...
...
@@ -72,8 +72,12 @@ inline BT::NodeStatus RateController::tick()
typedef
std
::
chrono
::
duration
<
float
>
float_seconds
;
auto
seconds
=
std
::
chrono
::
duration_cast
<
float_seconds
>
(
elapsed
);
// If we've exceed the specified period, execute the child node
if
(
first_time
||
seconds
.
count
()
>=
period_
)
{
// The child gets ticked the first time through and any time the period has
// expired. In addition, once the child begins to run, it is ticked each time
// 'til completion
if
(
first_time
||
(
child_node_
->
status
()
==
BT
::
NodeStatus
::
RUNNING
)
||
seconds
.
count
()
>=
period_
)
{
first_time
=
false
;
const
BT
::
NodeStatus
child_state
=
child_node_
->
executeTick
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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