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

Behavior Tree Goal on launch on TreeExecutionServer #70

Closed
marj3220 opened this issue May 10, 2024 · 1 comment
Closed

Behavior Tree Goal on launch on TreeExecutionServer #70

marj3220 opened this issue May 10, 2024 · 1 comment

Comments

@marj3220
Copy link
Contributor

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.

@marj3220
Copy link
Contributor Author

This was actually already possible. As referenced by @MarqRazz: #71 (comment)

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
    )
)

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

No branches or pull requests

1 participant