ros-controls / gazebo_ros2_control

Wrappers, tools and additional API's for using ros2_control with Gazebo Classic
Apache License 2.0
199 stars 125 forks source link

Catch pluginlib exceptions #229

Closed christophfroehlich closed 1 year ago

christophfroehlich commented 1 year ago

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 ...
ahcorde commented 1 year ago

https://github.com/Mergifyio backport humble

mergify[bot] commented 1 year ago

backport humble

✅ Backports have been created

* [#230 Catch pluginlib exceptions (backport #229)](https://github.com/ros-controls/gazebo_ros2_control/pull/230) has been created for branch `humble` but encountered conflicts