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

Don't crash if a wrong config was detected #324

Merged
merged 1 commit into from
Jun 10, 2024
Merged

Conversation

christophfroehlich
Copy link
Contributor

@christophfroehlich christophfroehlich commented Jun 9, 2024

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_

RCLCPP_ERROR_STREAM(
this->dataPtr->node_->get_logger(),
"Error parsing URDF in gz_ros2_control plugin, plugin not active : " << ex.what());
return;

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

@christophfroehlich
Copy link
Contributor Author

@Mergifyio backport iron humble

Copy link
Contributor

mergify bot commented Jun 9, 2024

backport iron humble

✅ Backports have been created

@ahcorde
Copy link
Collaborator

ahcorde commented Jun 10, 2024

@Mergifyio backport jazzy

@ahcorde ahcorde merged commit ec1b958 into master Jun 10, 2024
5 checks passed
@ahcorde ahcorde deleted the fix/crash_wrong_config branch June 10, 2024 07:47
Copy link
Contributor

mergify bot commented Jun 10, 2024

backport jazzy

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 10, 2024
mergify bot pushed a commit that referenced this pull request Jun 10, 2024
mergify bot pushed a commit that referenced this pull request Jun 10, 2024
ahcorde pushed a commit that referenced this pull request Jun 10, 2024
(cherry picked from commit ec1b958)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
ahcorde added a commit that referenced this pull request Jun 10, 2024
(cherry picked from commit ec1b958)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
ahcorde added a commit that referenced this pull request Jun 10, 2024
(cherry picked from commit ec1b958)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
Co-authored-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
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.

None yet

2 participants