-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This was an attempt at making the ROS2 launch files work with the Python samples on Windows. The issue is that, if we simply try to launch the python script directly, we get the following error: ``` OSError: [WinError 193] %1 is not a valid Win32 application ``` In this commit, we try to make a Python module out of the samples, install them using `ament_cmake_python`, and use a `setup.cfg` to add a console script entry point. This way, we can launch the samples using both `ros2 run` and `ros2 launch` commands. This approach was modeled after: ros/xacro#304 This seemed to work. However, a new issue emerged. While `ros2 run` still works fine, now we are not getting any log output when launching it with `ros2 launch`. We seem to be encountering this issue: MISC-2024-06-19-ros2-testing
- Loading branch information
Showing
8 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
launch_description = LaunchDescription() | ||
|
||
launch_description.add_action( | ||
Node(package="zivid_camera", executable="zivid_camera", name="zivid_camera") | ||
) | ||
|
||
launch_description.add_action( | ||
Node( | ||
package="zivid_samples", | ||
executable="sample_capture_py", | ||
name="zivid_sample", | ||
output="screen", | ||
emulate_tty=True, | ||
), | ||
) | ||
|
||
return launch_description |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[options.entry_points] | ||
console_scripts = | ||
sample_capture_py = zivid_samples.sample_capture:main |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters