ros-controls / gz_ros2_control

Connect the latest version of Gazebo with ros2_control.
https://gazebosim.org
Apache License 2.0
92 stars 70 forks source link

Don't crash if a wrong config was detected (backport #324) #330

Closed mergify[bot] closed 3 weeks ago

mergify[bot] commented 3 weeks ago

As reported with #323, the plugin crashes if there is a wrong config. On humble, the controller_manager tries to access unavailable state interfaces (I'll investigate more).

But also on rolling it crashes, despite the URDF parsers throws an error if a joint does not exists. The configure() method returns but PreUpdate, PostUpdate and Deconstructor are accessing the this->dataPtr->controller_manager_ https://github.com/ros-controls/gz_ros2_control/blob/45035076408e6014cc911e8d4bc169572a25008c/gz_ros2_control/src/gz_ros2_control_plugin.cpp#L394-L397

Is there maybe another way to deactivate the plugin properly and not even call the Update methods?


This is an automatic backport of pull request #324 done by Mergify.