From a30e2c42c71b2d193b512dc05a57ba30d350124e Mon Sep 17 00:00:00 2001 From: Gustavo Goretkin Date: Tue, 21 Nov 2023 11:18:33 -0500 Subject: [PATCH 1/2] [N/A] Clarify `prebaked` docstring --- bdai_ros2_wrappers/bdai_ros2_wrappers/process.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py b/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py index 7e6316f..b56c021 100644 --- a/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py +++ b/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py @@ -61,11 +61,13 @@ def __init__( func: a ``main``-like function to wrap ie. a callable taking a sequence of strings, an `argparse.Namespace` (if a CLI is specified), or nothing, and returning a integer exit code or nothing. - prebaked: whether to instantiate a prebaked or a bare process i.e. a process bearing - an implicit node and executor, or not. May also specificy the exact name for the implicit - node, or, if True, the current executable basename without its extension (or CLI program - name if one is specified) will be used. Note that completely bare processes do not bear a - node nor spin an executor, which brings them closest to standard ROS 2 idioms. + prebaked: whether to instantiate a prebaked process or a bare process. Defaults to True. + - a prebaked process has an implicit node and an executor + - a bare process does not bear a node nor spin an executor, which brings them closest to standard + ROS 2 idioms. + - for `prebaked=True`, the ROS node name is the the current executable basename without its extension + (or CLI program name if one is specified) + - The ROS node name can be set to `foo` with `prebaked="foo"` autospin: whether to automatically equip the underlying scope with a background executor or not. Defaults to True for prebaked processes and to False for bare processes. uses_tf: whether to instantiate a tf listener bound to the process main node. Defaults to False. From f8daf32447e9431fc782cd3a7f8b4f1e88bc53da Mon Sep 17 00:00:00 2001 From: Gustavo Nunes Goretkin <124000349+ggoretkin-bdai@users.noreply.github.com> Date: Tue, 21 Nov 2023 15:52:19 -0500 Subject: [PATCH 2/2] Update bdai_ros2_wrappers/bdai_ros2_wrappers/process.py Co-authored-by: mhidalgo-bdai <144129882+mhidalgo-bdai@users.noreply.github.com> --- bdai_ros2_wrappers/bdai_ros2_wrappers/process.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py b/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py index b56c021..2f0b175 100644 --- a/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py +++ b/bdai_ros2_wrappers/bdai_ros2_wrappers/process.py @@ -62,12 +62,11 @@ def __init__( an `argparse.Namespace` (if a CLI is specified), or nothing, and returning a integer exit code or nothing. prebaked: whether to instantiate a prebaked process or a bare process. Defaults to True. - - a prebaked process has an implicit node and an executor - - a bare process does not bear a node nor spin an executor, which brings them closest to standard - ROS 2 idioms. - - for `prebaked=True`, the ROS node name is the the current executable basename without its extension - (or CLI program name if one is specified) - - The ROS node name can be set to `foo` with `prebaked="foo"` + Note that: + - a prebaked process has an implicit node and an executor; + - a bare process has neither, which brings it the closest to standard ROS 2 idioms; + - when `prebaked=True`, the implicit node name will be the current executable basename without extension (or CLI program name if one is specified); + - when `prebaked="string"`, the given string will be used as the implicit node name. autospin: whether to automatically equip the underlying scope with a background executor or not. Defaults to True for prebaked processes and to False for bare processes. uses_tf: whether to instantiate a tf listener bound to the process main node. Defaults to False.