-
Notifications
You must be signed in to change notification settings - Fork 4
Support multiple hardware interfaces in the coordinator #72
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
Conversation
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.
Pull Request Overview
This PR enables the controller coordinator to support multiple hardware interfaces instead of being limited to a single interface. The main enhancement allows users to specify an ordered list of hardware interfaces that can be activated/deactivated sequentially through the coordinator service.
Key changes:
- Modified parameter configuration to accept multiple hardware interfaces via
hardware_sequence
array - Updated the coordinator implementation to handle sequential activation/deactivation of multiple hardware interfaces
- Bumped package versions across all modules to 0.3.3
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
controller_coordinator/src/coordinator_parameters.yaml | Changed parameter from single hardware_interface to hardware_sequence array |
controller_coordinator/src/coordinator.hpp | Updated member variables to handle multiple hardware interface requests |
controller_coordinator/src/coordinator.cpp | Implemented sequential processing of multiple hardware interfaces with proper error handling |
end_effector_trajectory_controller/CHANGELOG.md | Fixed incorrect package name in changelog header |
Multiple package.xml files | Version bump to 0.3.3 across all packages |
Multiple CHANGELOG.md files | Added 0.3.3 release entries |
rclcpp::spin_until_future_complete(this->get_node_base_interface(), hardware_future); | ||
} | ||
|
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.
Sequential blocking calls to spin_until_future_complete
may cause performance issues if there are many hardware interfaces. Consider implementing parallel activation with proper synchronization or adding timeout handling to prevent indefinite blocking.
rclcpp::spin_until_future_complete(this->get_node_base_interface(), hardware_future); | |
} | |
futures.push_back(hardware_future.share()); | |
} | |
for (auto & future : futures) { | |
if (future.wait_for(std::chrono::seconds(10)) != std::future_status::ready) { | |
RCLCPP_ERROR(this->get_logger(), "Timeout while waiting for hardware activation"); | |
response->success = false; | |
response->message = "Timeout during hardware activation"; | |
} | |
} |
Copilot uses AI. Check for mistakes.
rclcpp::spin_until_future_complete(this->get_node_base_interface(), hardware_future); | ||
} | ||
|
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.
Sequential blocking calls to spin_until_future_complete
may cause performance issues if there are many hardware interfaces. Consider implementing parallel deactivation with proper synchronization or adding timeout handling to prevent indefinite blocking.
rclcpp::spin_until_future_complete(this->get_node_base_interface(), hardware_future); | |
} | |
futures.push_back(hardware_future.share()); | |
} | |
for (auto & future : futures) { | |
if (future.wait_for(std::chrono::seconds(10)) != std::future_status::ready) { | |
RCLCPP_ERROR(this->get_logger(), "Timeout while deactivating hardware interface"); | |
response->success = false; | |
response->message = "Timeout while deactivating hardware interface"; | |
} | |
} |
Copilot uses AI. Check for mistakes.
* add support for multiple hardware interfaces * changelog * make hardware activation synchronous * Fixed coordinator hardware bug (cherry picked from commit 734f1a0)
* add support for multiple hardware interfaces * changelog * make hardware activation synchronous * Fixed coordinator hardware bug (cherry picked from commit 734f1a0) Co-authored-by: Evan Palmer <[email protected]>
Changes Made
This PR adds support for activating/deactivating multiple hardware interfaces using the controller coordinator.
Associated Issues
Testing
TBD