Skip to content
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

Handle hardware errors in Resource Manager #805

Merged

Conversation

destogl
Copy link
Member

@destogl destogl commented Aug 25, 2022

First part of the #742 with changes only in Resource Manager.

@destogl destogl self-assigned this Aug 25, 2022
@mergify
Copy link
Contributor

mergify bot commented Aug 25, 2022

⚠️ The sha of the head commit of this PR conflicts with #742. Mergify cannot evaluate rules on this PR. ⚠️

hardware_interface/src/actuator.cpp Show resolved Hide resolved
for (const auto & interface : hardware_info_map_[hardware_name].command_interfaces)
{
auto found_it = std::find(
available_command_interfaces_.begin(), available_command_interfaces_.end(), interface);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a search in a for loop... could this be implemented somehow using a more flat mapping by any chance? please feel free to say that I'm asking for impossible or very tedious things

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will check this after I address above two comments that could also influence this.

hardware_interface/src/resource_manager.cpp Outdated Show resolved Hide resolved
hardware_interface/src/system.cpp Show resolved Hide resolved
for (const auto & interface : hardware_info_map_[hardware_name].state_interfaces)
{
auto found_it = std::find(
available_state_interfaces_.begin(), available_state_interfaces_.end(), interface);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same search-in-a-for-loop situation

hardware_interface/src/resource_manager.cpp Outdated Show resolved Hide resolved
hardware_interface/src/resource_manager.cpp Show resolved Hide resolved
hardware_interface/src/resource_manager.cpp Outdated Show resolved Hide resolved
@destogl destogl force-pushed the handle-hardware-error-in-resource-manager branch from 9781116 to 3a87e45 Compare September 5, 2022 18:41
@destogl destogl merged commit e748824 into ros-controls:master Sep 24, 2022
@destogl destogl deleted the handle-hardware-error-in-resource-manager branch September 24, 2022 06:44
@destogl
Copy link
Member Author

destogl commented Oct 15, 2022

@Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Oct 15, 2022

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Oct 15, 2022
* Add code for deactivating controller when hardware gets an error on read and write.

(cherry picked from commit e748824)
flochre pushed a commit to flochre/ros2_control that referenced this pull request Jul 5, 2023
* Add code for deactivating controller when hardware gets an error on read and write.

(cherry picked from commit e748824)
destogl added a commit that referenced this pull request Aug 9, 2023
* Add code for deactivating controller when hardware gets an error on read and write.

(cherry picked from commit e748824)
destogl added a commit that referenced this pull request Dec 10, 2023
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