Skip to content

Commit

Permalink
WIP: Make BT nodes have configurable wait times. (ros-navigation#3960)
Browse files Browse the repository at this point in the history
* Make BT nodes have configurable wait times.

Previous solution provided hardcoded 1s value.
Right now the value can be configured for BT
Action, Cancel and Service nodes.

[ros-navigation#3920]

Signed-off-by: Adam Galecki <[email protected]>

* Make BT nodes have configurable wait times.

Previous solution provided hardcoded 1s value.
Right now the value can be configured for BT
Action, Cancel and Service nodes.

[ros-navigation#3920]

Signed-off-by: Adam Galecki <[email protected]>

* Fix typos, linting errors and value type from float to int

* Fix extra underscores

* Fix extra underscore

* Update unit tests with blackboard parameter

Signed-off-by: Adam Galecki <[email protected]>

* Fix formatting errors

Signed-off-by: Adam Galecki <[email protected]>

* Update system tests to match new parameter

Signed-off-by: Adam Galecki <[email protected]>

---------

Signed-off-by: Adam Galecki <[email protected]>
  • Loading branch information
embeddedadam authored and Marc-Morcos committed Jul 4, 2024
1 parent ca27dec commit 14494d7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,9 @@ class BtActionNode : public BT::ActionNodeBase
// The timeout value for waiting for a service to response
std::chrono::milliseconds wait_for_service_timeout_;

// The timeout value for waiting for a service to response
std::chrono::milliseconds wait_for_service_timeout_;

// To track the action server acknowledgement when a new goal is sent
std::shared_ptr<std::shared_future<typename rclcpp_action::ClientGoalHandle<ActionT>::SharedPtr>>
future_goal_handle_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ class BtServiceNode : public BT::ActionNodeBase
// The timeout value for waiting for a service to response
std::chrono::milliseconds wait_for_service_timeout_;

// The timeout value for waiting for a service to response
std::chrono::milliseconds wait_for_service_timeout_;

// To track the server response when a new request is sent
std::shared_future<typename ServiceT::Response::SharedPtr> future_result_;
bool request_sent_{false};
Expand Down

0 comments on commit 14494d7

Please sign in to comment.