getting_started:practical_problems:abort
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
getting_started:practical_problems:abort [2017/09/25 07:43] – graf | getting_started:practical_problems:abort [2017/11/05 13:32] – [Define Signal Handler when using ROS] graf | ||
---|---|---|---|
Line 40: | Line 40: | ||
}); | }); | ||
</ | </ | ||
- | This will cause the executor to stop running and return control to the main programm | + | This will cause the executor to stop running and return control to the main programm. Further, any running sequences will terminate and the main program |
+ | |||
+ | ===== Define Signal Handler when using ROS ===== | ||
+ | If you use ROS you have to keep in mind to register the signal handler only after the | ||
+ | <code cpp> | ||
+ | #include " | ||
+ | #include < | ||
+ | |||
+ | void signalHandler(int signum) { | ||
+ | SafetySystem:: | ||
+ | } | ||
+ | |||
+ | int main() { | ||
+ | signal(SIGINT, | ||
+ | |||
+ | ... | ||
+ | |||
+ | // Create and initialize safety system | ||
+ | double period = 1; | ||
+ | MySafetyProperties ssProperties; | ||
+ | SafetySystem safetySys(ssProperties, | ||
+ | |||
+ | ... | ||
+ | } | ||
+ | </ |
getting_started/practical_problems/abort.txt · Last modified: 2024/02/16 08:16 by ursgraf