Skip to content

Conversation

@VitezGabriela
Copy link

Goal:

Update the Controller Manager to handle errors when the ResourceManager fails to initialize due to an invalid URDF or faulty hardware plugin.

Behavior:

  • Catch exceptions caused by parsing invalid URDFs during initialization
  • Log error messages
  • Reset the resource_manager_ pointer to a minimal, safe state.
  • Continue waiting for a valid robot_description to be published

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

@mergify
Copy link
Contributor

mergify bot commented Nov 3, 2025

@VitezGabriela, all pull requests must be targeted towards the master development branch.
Once merged into master, it is possible to backport to jazzy, but it must be in master
to have these changes reflected into new distributions.

@destogl destogl changed the base branch from jazzy to master November 3, 2025 17:26
@mergify
Copy link
Contributor

mergify bot commented Nov 3, 2025

This pull request is in conflict. Could you fix it @VitezGabriela?

@VitezGabriela VitezGabriela force-pushed the feature/invalid-urdf-cm-recovery branch from 194ed06 to f5d9c81 Compare November 3, 2025 18:04

// Get parameters needed for RT "update" loop to work
if (is_resource_manager_initialized())
if (!is_resource_manager_initialized())
Copy link
Member

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

Copy link
Member

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.

Copy link
Author

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.

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.

3 participants