FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add get_clock() method by EGAlberts · Pull Request #77 · BehaviorTree/BehaviorTree.ROS2 · GitHub

Add get_clock() method - #77

Open
EGAlberts wants to merge 3 commits into
BehaviorTree:humblefrom
EGAlberts:humble
Open

EGAlberts wants to merge 3 commits into
BehaviorTree:humblefrom
EGAlberts:humble

Conversation

Copy link
Copy Markdown

When using ROS2 logging it is desirable to throttle logged messages to keep output manageable ([https://docs.ros.org/en/humble/Tutorials/Demos/Logging-and-logger-configuration.html#logging-throttled]).

To do so, you need access to the node's clock. Since with new changes there is no more direct access to the node object within a subclass of bt_action_node and bt_service_node it is not possible to get the clock and therefore not possible to log with throttling.
This PR adds a get_clock() method to the parent classes which can be used to for throttled logging which I exemplify with an Feedback callback in the existing sleep action sample.

N.B. The samples are still broken in the latest commit. To use any sample (including my edit to exemplify the PR), you need to use BT.CPP with pull 804 BehaviorTree/BehaviorTree.CPP#804 because this actually exports the plugins to be used by the sample behavior trees. I would suggest that you please merge that PR before this one.

facontidavide self-assigned this Sep 6, 2024

Copy link
Copy Markdown
Author

Sorry for the delay, I have made the requested changes now

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL