... | ... | @@ -578,7 +578,7 @@ You should create services for `abort`, `stop`, `pause` and `resume`. They shoul |
|
|
For `abort`, `stop`, `pause` and `resume`, follow those steps:
|
|
|
|
|
|
* Create a callback function, i.e., a new function in your class with a unique name (for instance callback_abort), it should take a `request` and a `response` as argument
|
|
|
* In that callback function you can use `abort`, `stop`, `pause` and `resume` of the `TstML.Executor.Executor`/`TstML::Executor::Executor` class.
|
|
|
* In that callback function you can use `abort`, `stop`, `pause` and `resume` on the `tst_executor` object you created when starting execution of the tree.
|
|
|
* In the constructor of your ROS Node, you can use the `create_service` function to create a new service. Use the `create_service` of `execute_tst` as an example.
|
|
|
|
|
|
You should to 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.
|
... | ... | |