Extended functionality for ROS 2 launch system providing additional actions, substitutions, and conditions.
Enhanced process execution action with additional features beyond the standard ExecuteProcess.
ExecuteProcessExt(
cmd=['my_command', '--arg'],
name='my_process',
output='both'
)Features:
- Extended process management capabilities
- Enhanced output handling
- Additional lifecycle management
Include launch files from packages with enhanced functionality.
IncludePackageLaunchFile(
package='my_package',
launch_file='my_launch.py'
)Parameters:
package: Name of the package containing the launch filelaunch_file: Path to the launch file within the package
Manage log file rotation to prevent disk space issues.
LogRotate(
log_file='/path/to/logfile.log',
max_size='100MB',
backup_count=5
)Parameters:
log_file: Path to the log file to rotatemax_size: Maximum size before rotationbackup_count: Number of backup files to keep
Create Linux device nodes for USB devices that are not automatically created by the kernel or when udev is not permitted.
MakeDeviceNode(
"/dev/tty-magnetometer",
"ttyUSB",
"Prolific Technology Inc.",
"USB-Serial Controller D"
)Parameters:
target_node: Path where the device node should be createddevice_type: Type of device (e.g., "ttyUSB")manufacturer: USB device manufacturer nameproduct: USB device product name
Will create a device node at /dev/tty-magnetometer if it does not already exist. The device node will be created if the USB device with the vendor name Prolific Technology Inc. and product name USB-Serial Controller D is connected.
Conditionally set launch configurations only if the value is not None.
SetLaunchConfigurationIfNotNone(
name='my_config',
value=LaunchConfiguration('optional_param')
)Parameters:
name: Configuration parameter namevalue: Value to set (only if not None)
Write content to a file during launch execution.
WriteFile(
file_path='/tmp/config.txt',
content='configuration data'
)Parameters:
file_path: Path where the file should be writtencontent: Content to write to the file
Log git repository information including branch, commit, and status.
LogRepoInfo("/path/to/repo")Parameters:
path: Path to the git repository
Verify that a repository is at a specific commit hash.
VerifyRepoCommit(
"/path/to/repo",
"abc123...",
pass_on_failure=False
)Parameters:
path: Path to the git repositorycommit: Expected commit hashpass_on_failure: Whether to continue on verification failure
Verify that a repository has no uncommitted changes.
VerifyRepoClean(
"/path/to/repo",
pass_on_failure=False
)Parameters:
path: Path to the git repositorypass_on_failure: Whether to continue on verification failure
Configure Zenoh middleware for ROS 2 communication.
ConfigureZenoh(
with_router=True,
router_config={'port': 7447},
session_config={'mode': 'peer'}
)Parameters:
with_router: Whether to start a Zenoh routerrouter_config: Router configuration overridessession_config: Session configuration overrides
Configure FastDDS middleware settings.
ConfigureFastDDS(
config_file='/path/to/fastdds.xml'
)Check if a substitution value equals a specific enum value.
from enum import Enum
class Mode(Enum):
DEBUG = "debug"
RELEASE = "release"
EnumEqual(
LaunchConfiguration('build_mode'),
Mode.DEBUG
)Parameters:
substitute: Substitution to evaluatecheck_enum_value: Enum value to compare against
Template-based string substitution using Python's string.Template.
Templated("Hello ${name}, mode is ${mode}")Uses launch configurations as template variables.
Unary operation substitution for mathematical expressions.
Unary('-', LaunchConfiguration('value'))Create a temporary file with specified content and return its path.
WriteTempFile("temporary content")Returns the path to the created temporary file.
Convert YAML content to JSON format.
YamlToJson(
FileContent(file_path),
quote_output=True
)Parameters:
file_content_substitution: Source of YAML contentquote_output: Whether to wrap JSON in quotes
Resolve hostname to IP address.
ResolveHost("example.com")Process Xacro files for robot descriptions.
Xacro("robot.urdf.xacro")