-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add logger and clock interfaces from ResourceManager to HardwareComponent interfaces #1585
Add logger and clock interfaces from ResourceManager to HardwareComponent interfaces #1585
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1585 +/- ##
==========================================
+ Coverage 86.94% 86.96% +0.01%
==========================================
Files 107 107
Lines 9306 9379 +73
Branches 863 867 +4
==========================================
+ Hits 8091 8156 +65
- Misses 899 903 +4
- Partials 316 320 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
How can we promote this new feature? Please add something to the release notes, maybe also hardware components docs. Possibly we can use this in the demos as well?
Yes, we can use them in the demos as well. I've used it inside the MockHardwareSystem in this PR. |
This pull request is in conflict. Could you fix it @saikishor? |
…d clock interfaces
5ce5a44
to
812d103
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
hardware_interface/include/hardware_interface/actuator_interface.hpp
Outdated
Show resolved
Hide resolved
@ahcorde are we allowed one more breaking change please please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks great, just a few small comments we can resolve fairly quickly.
@@ -73,7 +75,8 @@ class ActuatorInterface : public rclcpp_lifecycle::node_interfaces::LifecycleNod | |||
public: | |||
ActuatorInterface() | |||
: lifecycle_state_(rclcpp_lifecycle::State( | |||
lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN, lifecycle_state_names::UNKNOWN)) | |||
lifecycle_msgs::msg::State::PRIMARY_STATE_UNKNOWN, lifecycle_state_names::UNKNOWN)), | |||
actuator_logger_(rclcpp::get_logger("actuator_interface")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we here use some better name? Or better yet, do we need this actually? As we always have to call init
first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to define something, if not it complains with the following error. That's the reason, I declared basically the name of the class
error: ‘rclcpp::Logger::Logger()’ is private within this context
// Logger and Clock interfaces | ||
rclcpp::node_interfaces::NodeClockInterface::SharedPtr clock_interface_; | ||
rclcpp::node_interfaces::NodeLoggingInterface::SharedPtr logger_interface_; | ||
rclcpp::Logger rm_logger_ = rclcpp::get_logger("resource_manager"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe to add this above to the constructor to if - else
statement. This would increase clarity. (I mean the right side).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
303c846
Co-authored-by: Dr. Denis <denis@stoglrobotics.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for clarifications!
As discussed in the WG meeting on 19th June 2024, I've added the logging and the clock interfaces to ResourceManager and HardwareComponents. I've also modified all the RCUTILS logging to RCLCPP logging.
Thank you