Closed marj3220 closed 4 months ago
This was actually already possible. As referenced by @MarqRazz: https://github.com/BehaviorTree/BehaviorTree.ROS2/pull/71#issuecomment-2111379917
Why not just call the Server from your launch file?
Here is an example on calling a service from a python launch file.
from launch.substitutions import FindExecutable from launch.actions import ExecuteProcess ... ld.add_action( ExecuteProcess( cmd=[[ FindExecutable(name='ros2'), " service call ", "/namespace/service_to_call ", "example_msgs/srv/ExampleMsg ", '"{param_1: True, param_2: 0.0}"', ]], shell=True ) )
It would be useful to launch a tree with the TreeExecutionServer from it's launch. This would bypass the secondary node that needs to be created to send a goal to the TreeExecutionServer.