Skip to content

Commit 476a6df

Browse files
author
Roger Strain
committed
Cleanup; removing IsExecutable trait
Distro A; OPSEC #2893 Signed-off-by: Roger Strain <[email protected]>
1 parent ee6bd35 commit 476a6df

File tree

1 file changed

+12
-34
lines changed

1 file changed

+12
-34
lines changed

articles/execute_process_refactor.md

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Refactoring ExecuteProcess in ROS2
22

33
Initially proposed in [114](https://github.com/ros2/launch/issues/114), this document describes changes to `ExecuteProcess` and related classes.
4-
As initially implemented, some aspects of this are tightly coupled to both the implementation chosen and the assumption that processes will execute only in the local environment of the launch process itself.
5-
The following changes are designed to provide a more decoupled architecture that will ease support of launching processes locally, remotely, or potentially in containerized environments.
4+
As initially implemented, some aspects of this class are tightly coupled to both the implementation chosen and the assumption that processes will execute only in the local environment of the launch process itself.
5+
The following changes are designed to provide a more decoupled architecture that will ease support of launching processes locally, remotely, and potentially in containerized environments.
66
Additionally, these changes will support the goal of decoupling the description of an executable from the actual action of executing it.
77
These changes are designed so that existing systems may continue to use the interface before these changes without modification; newer systems may find benefits from adapting to the newer syntax, particularly when composing more complicated environments.
88

@@ -282,7 +282,7 @@ No events would be handled nor emitted.
282282

283283
Extends the `launch.actions.Action` class.
284284
This class would represent the execution-time aspects of `launch.actions.ExecuteProcess`.
285-
The new `process_description` constructor parameter could be a `launch.descriptions.Executable`, a `launch_ros.descriptions.Node`, or one of the other subclasses.
285+
The new `process_description` constructor parameter could be a `launch.descriptions.Executable` or a subclass.
286286

287287
This class is simplified from the current `launch.actions.ExecuteProcess` by removing the logic relating to process definition/configuration, and by removing the logic regarding substitutions thereof.
288288

@@ -351,7 +351,6 @@ These parameters are drawn from the shared parameters of the current `launch_ros
351351

352352
| Argument | Description |
353353
| -------------- | ------------------------------------------------------------ |
354-
| package | name of the ROS package the node executable lives in |
355354
| node_name | Name the node should have |
356355
| node_namespace | Namespace the node should create topics/services/etc in |
357356
| parameters | List of either paths to yaml files or dictionaries of parameters |
@@ -361,7 +360,7 @@ These parameters are drawn from the shared parameters of the current `launch_ros
361360

362361
#### Properties
363362

364-
Accessors would be provided for the various constructor parameters: `package`, `node_name`, `node_namespace`, `parameters`, `remappings`, `arguments`, and `traits`.
363+
Accessors would be provided for the various constructor parameters: `node_name`, `node_namespace`, `parameters`, `remappings`, `arguments`, and `traits`.
365364

366365
#### Methods
367366

@@ -388,14 +387,15 @@ Most parameters would be passed to the superclass.
388387

389388
|Argument|Description|
390389
|---|---|
390+
| package | Optional. Name of the ROS package the node plugin lives in. If not specified, the package of the containing executable will be assumed. |
391391
|node_plugin|Name of the plugin to be loaded|
392392

393-
Additional parameters that may be passed, which are handled by `launch_ros.descriptions.NodeBase`: `package`, `node_name`, `node_namespace`, `parameters`, `remappings`, `arguments`, `traits`.
393+
Additional parameters that may be passed, which are handled by `launch_ros.descriptions.NodeBase`: `node_name`, `node_namespace`, `parameters`, `remappings`, `arguments`, `traits`.
394394

395395
#### Properties
396396

397-
Accessors would be provided for the additional constructor parameter: `node_plugin`.
398-
Inherited accessors would also be available: `package`, `node_name`, `node_namespace`, `parameters`, `remappings`, `arguments`, and `traits`.
397+
Accessors would be provided for the additional constructor parameters: `package`, `node_plugin`.
398+
Inherited accessors would also be available: `node_name`, `node_namespace`, `parameters`, `remappings`, `arguments`, and `traits`.
399399

400400
#### Methods
401401

@@ -486,30 +486,6 @@ Accessors would be provided for the constructor parameter: `nodes`.
486486

487487
No events would be handled or emitted.
488488

489-
### launch_ros.traits.IsExecutable
490-
491-
This class would extend the `launch_ros.traits.NodeTrait` class, and provide the additional information required for launching executable nodes that are currently defined in `launch_ros.actions.Node`.
492-
493-
#### Constructor
494-
495-
Most parameters would be passed to the new superclass.
496-
497-
|Argument|Description|
498-
|---|---|
499-
|node_executable|Name of the executable to find|
500-
501-
#### Properties
502-
503-
Accessors would be provided for the constructor parameter: `node_exectuable`.
504-
505-
#### Methods
506-
507-
No custom methods would be defined or overridden.
508-
509-
#### Events
510-
511-
No events would be handled or emitted.
512-
513489
### launch_ros.descriptions.RosExecutable
514490

515491
This class would represent the information required to run a ROS-aware process and inherit from `launch.descriptions.Executable`.
@@ -519,14 +495,16 @@ It would not include execution-time details, nor provide monitoring of the proce
519495

520496
| Argument | Description |
521497
| --------------- | ------------------------------------------------------------ |
498+
| package | name of the ROS package the node executable lives in |
499+
|node_executable|Name of the executable to find|
522500
| nodes | A list of `launch_ros.descriptions.Node` objects which are part of the executable. |
523501

524502
Additional parameters that may be passed, which are handled by `launch.actions.ExecuteProcess`: `cmd`, `name`, `cwd`, `env`, `additional_env`.
525503
NOTE: To allow ROS to determine the appropriate executable based on the package and executable name, the `cmd` parameter should *NOT* be specified. When `cmd` is not specified, this class will determine the appropriate executable if and only if exactly one of the nodes it contains has the `launch_ros.traits.IsExecutable` trait.
526504

527505
#### Properties
528506

529-
Accessors would be provided for the constructor parameter: `nodes`.
507+
Accessors would be provided for the constructor parameters: `package`, `node_executable`, `nodes`.
530508
Inherited accessors would also be available: `cmd`, `name`, `cwd`, `env`, and `additional_env`.
531509

532510
#### Methods
@@ -559,7 +537,7 @@ If this is attempted, several features such as input/output pipes would likely n
559537

560538
| Argument | Description |
561539
| ---------------------- | ------------------------------------------------------------ |
562-
| process\_description | The `launch.descriptions.Executable` to execute as a local process |
540+
| process\_description | The `launch.descriptions.Executable` to execute as a remote process |
563541
| connection_description | An object defining the SSH connection information, such as host, port, user, etc. |
564542
| prefix | A set of commands/arguments to preceed the `cmd`, used for things like `gdb`/`valgrind` and defaults to the `LaunchConfiguration` called `launch-prefix` |
565543
| output | Configuration for process output logging. Defaults to `log` i.e. log both `stdout` and `stderr` to launch main log file and stderr to the screen. |

0 commit comments

Comments
 (0)