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

Catch pluginlib exceptions #229

Merged

Conversation

christophfroehlich
Copy link
Contributor

I recently worked with custom simulation plugins as described in the docs.

It took me a while to debug the ClassLoader, I propose a catch on pluginlib exceptions.

As an example, a non-existing plugin name in the urdf

      <hardware>
        <plugin>gazebo_ros2_control_actuators/GazeboSystemWrong</plugin>
      </hardware>

was just not loaded and gzserver died. Now it is catched with the following error message

[gzserver-1] [ERROR] [1692356394.343300163] [gazebo_ros2_control]: The plugin failed to load for some reason. Error: According to the loaded plugin descriptions the class gazebo_ros2_control/GazeboSystemWrong with base class type gazebo_ros2_control::GazeboSystemInterface does not exist. Declared types are ...

Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

LGTM, just a minor nit

gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp Outdated Show resolved Hide resolved
gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp Outdated Show resolved Hide resolved
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
@ahcorde ahcorde merged commit f8a475d into ros-controls:master Aug 18, 2023
5 checks passed
@ahcorde
Copy link
Collaborator

ahcorde commented Aug 18, 2023

https://github.com/Mergifyio backport humble

@mergify
Copy link
Contributor

mergify bot commented Aug 18, 2023

backport humble

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Aug 18, 2023
Co-authored-by: Alejandro Hernández Cordero <[email protected]>
(cherry picked from commit f8a475d)

# Conflicts:
#	gazebo_ros2_control/src/gazebo_ros2_control_plugin.cpp
ahcorde pushed a commit that referenced this pull request Aug 18, 2023
* Catch pluginlib exceptions (#229)

Co-authored-by: Alejandro Hernández Cordero <[email protected]>
(cherry picked from commit f8a475d)
@christophfroehlich christophfroehlich deleted the catch_pluginlib_exceptions branch October 2, 2023 14:40
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