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

Dirty crash when exiting safety bounds #1

Open
JoshuaHaustein opened this issue May 11, 2020 · 0 comments
Open

Dirty crash when exiting safety bounds #1

JoshuaHaustein opened this issue May 11, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@JoshuaHaustein
Copy link
Collaborator

JoshuaHaustein commented May 11, 2020

When performing a software-emergency stop (e.g. due to exiting the safe workspace region, defined in constants.h), the stop_all function currently calls std::exit. This behaviour is rather undesirable, as it leads to a std::system_error being thrown and prevents higher level-code from cleaning up.

I think it would be nicer to throw a custom exception that higher-level code can catch to clean up and print useful error messages. The current error message that is printed when violating workspace limits is:

terminate called after throwing an instance of 'std::system_error
what(): Resource deadlock avoided

which is rather misleading. A potential reason for this error could be this.

See also ROS guidelines about the use of exit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant