-
Notifications
You must be signed in to change notification settings - Fork 386
Controller Manager recovery from invalid URDF errors #2775
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
base: master
Are you sure you want to change the base?
Controller Manager recovery from invalid URDF errors #2775
Conversation
|
@VitezGabriela, all pull requests must be targeted towards the |
|
This pull request is in conflict. Could you fix it @VitezGabriela? |
…tion, robot description callback and resource manager constructor
194ed06 to
f5d9c81
Compare
controller_manager/include/controller_manager/controller_manager.hpp
Outdated
Show resolved
Hide resolved
|
|
||
| // Get parameters needed for RT "update" loop to work | ||
| if (is_resource_manager_initialized()) | ||
| if (!is_resource_manager_initialized()) |
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.
a little bit of documentation about the logic happening here would be nice
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.
@VitezGabriela I think we shouldn't change here the logic. But add this to "else" statement as we might lose handling of limits here.
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.
@destogl The logic is still preserved this way. Importing the joint limits is handled in the method init_resource_manager which is called in upper lines. Otherwise, if the robot description is not valid (or empty), we shouldn't try to import limits but wait on the description.
Co-authored-by: Bence Magyar <[email protected]>
Goal:
Update the Controller Manager to handle errors when the ResourceManager fails to initialize due to an invalid URDF or faulty hardware plugin.
Behavior:
Observations:
The Controller Manager now no longer crashes on invalid URDFs. Instead, it safely recovers by initializing the resource_manager_ pointer to a minimal state, allowing the controller manager to continue operating and respond to future valid robot descriptions.
Testing:
Unit tests were created with multiple invalid URDF scenarios. All tests passed successfully. Testing can be done by executing:
./build/controller_manager/test_controller_manager_with_resource_manager