... | ... | @@ -626,6 +626,13 @@ For `abort`, `stop`, `pause` and `resume`, follow those steps: |
|
|
|
|
|
You should call your services with ```ros2 service call```, however you will notice that the call is hanging, and the execution is not aborted, stopped, paused or resumed. This is because, by default, ROS is single threaded and can only handle one request. We need to use a ```MultiThreadedExecutor``` with a reentrant group.
|
|
|
|
|
|
If /abort is the service name then the way to call the service from command line is:
|
|
|
|
|
|
```bash
|
|
|
ros2 service call /abort std_srvs/Empty
|
|
|
```
|
|
|
|
|
|
|
|
|
### Python
|
|
|
|
|
|
Modify your main function to look like this, instead of using `rclpy::spin(some_node)`:
|
... | ... | |