Skip to content

Commit

Permalink
Use incremental timeouts in spin_until_future_calls during BT executi…
Browse files Browse the repository at this point in the history
…on to handle large server timeouts (ros-navigation#2320)

* Use incremental timeouts in spin_until_future_calls during BT execution

Signed-off-by: Sarthak Mittal <[email protected]>

* Fix tests

Signed-off-by: Sarthak Mittal <[email protected]>

* Fix tests

* Remove unnecessary timeout_ variable

Signed-off-by: Sarthak Mittal <[email protected]>

* Reset goal_sent on terminal conditions

Signed-off-by: Sarthak Mittal <[email protected]>

* Rename variables and refactor timeout logic

Signed-off-by: Sarthak Mittal <[email protected]>

* Fix timeout logic and add tests

Signed-off-by: Sarthak Mittal <[email protected]>

* Updates tests to ensure previous node state does not leak into new cycles

Signed-off-by: Sarthak Mittal <[email protected]>

* Change goal_handle_ checks to future_goal_handle_

Signed-off-by: Sarthak Mittal <[email protected]>

* Remove goal handle reset in halt

* Update server_timeout to 20ms and inherit BtServiceNode from BT::ActionNodeBase

Signed-off-by: Sarthak Mittal <[email protected]>
  • Loading branch information
naiveHobo authored May 13, 2021
1 parent cb6d9a0 commit 23754d2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions nav2_bringup/bringup/params/nav2_multirobot_params_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ bt_navigator:
global_frame: map
robot_base_frame: base_link
odom_topic: /odom
bt_loop_duration: 10
default_server_timeout: 20
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
Expand Down
2 changes: 2 additions & 0 deletions nav2_bringup/bringup/params/nav2_multirobot_params_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ bt_navigator:
global_frame: map
robot_base_frame: base_link
odom_topic: /odom
bt_loop_duration: 10
default_server_timeout: 20
# 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
# nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
# nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
Expand Down
2 changes: 2 additions & 0 deletions nav2_bringup/bringup/params/nav2_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ bt_navigator:
global_frame: map
robot_base_frame: base_link
odom_topic: /odom
bt_loop_duration: 10
default_server_timeout: 20
enable_groot_monitoring: True
groot_zmq_publisher_port: 1666
groot_zmq_server_port: 1667
Expand Down

0 comments on commit 23754d2

Please sign in to comment.