Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions patch/ros-jazzy-launch-ros.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/launch_ros/launch_ros/substitutions/executable_in_package.py b/launch_ros/launch_ros/substitutions/executable_in_package.py
index f300c39..5b77ffc 100644
--- a/launch_ros/launch_ros/substitutions/executable_in_package.py
+++ b/launch_ros/launch_ros/substitutions/executable_in_package.py
@@ -80,6 +80,12 @@ class ExecutableInPackage(FindPackagePrefix):
"package '{}' found at '{}', but libexec directory '{}' does not exist".format(
package, package_prefix, package_libexec))
result = which(executable, path=package_libexec)
+
+ if result is None and os.name == 'nt' and executable.lower().endswith('.py'):
+ candidate = os.path.join(package_libexec, executable)
+ if os.path.isfile(candidate):
+ result = candidate
+
if result is None:
raise SubstitutionFailure(
"executable '{}' not found on the libexec directory '{}' ".format(
23 changes: 23 additions & 0 deletions patch/ros-jazzy-launch.win.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
diff --git a/launch/launch/actions/execute_local.py b/launch/launch/actions/execute_local.py
index 487ae90..4a9fdb8 100644
--- a/launch/launch/actions/execute_local.py
+++ b/launch/launch/actions/execute_local.py
@@ -14,6 +14,7 @@

"""Module for the ExecuteLocal action."""

+import sys
import asyncio
import io
import logging
@@ -566,6 +567,10 @@ class ExecuteLocal(Action):
)

try:
+ # On Windows, Python scripts cannot be passed directly to CreateProcess().
+ # Invoke them through the Python interpreter, matching ros2run behavior.
+ if os.name == 'nt' and cmd and cmd[0].lower().endswith('.py'):
+ cmd.insert(0, sys.executable)
transport, self._subprocess_protocol = await async_execute_process(
lambda **kwargs: self.__ProcessProtocol(
self, context, process_event_args, **kwargs
4 changes: 4 additions & 0 deletions pkg_additional_info.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ coal:
override_version: '3.0.4'
# Remove on next full rebuild: bumped so main rebuilds the 3.0.4 dummy
build_number: 22
launch:
build_number: 22
launch_ros:
build_number: 22
nav2_mppi_controller:
build_number: 22
pinocchio:
Expand Down
Loading