Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install xacro using console_scripts entrypoint #304

Merged
merged 4 commits into from
Oct 21, 2022

Conversation

wmmc88
Copy link

@wmmc88 wmmc88 commented Dec 28, 2021

This changes xacro to be install using a console_script entrypoint, which now fixes running xacro and ros2 run xacro xacro in windows. linux functionality should be unchanged.

closes #302
supersedes #303

CMakeLists.txt Outdated Show resolved Hide resolved
scripts/xacro Show resolved Hide resolved
setup.py Show resolved Hide resolved
Copy link
Contributor

@rhaschke rhaschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This looks more promising!
I was thinking about symlinking from lib/xacro to bin instead of installing the file a second time.
Symlinks are not supported in Windows.

@rhaschke
Copy link
Contributor

Looks like the new feature was only released into rolling so far. The backport to galactic was merged on Dec 8th, but not yet released.

@wmmc88
Copy link
Author

wmmc88 commented Dec 29, 2021

Looks like the new feature was only released into rolling so far. The backport to galactic was merged on Dec 8th, but not yet released.

Ah i didnt notice this because I use rolling. Does this change need to wait until backports to non-eol distros are released then?

CMakeLists.txt Outdated Show resolved Hide resolved
@rhaschke
Copy link
Contributor

Does this change need to wait until backports to non-eol distros are released then?

Yes, I cannot release in this state. I also suggested some changes: ament/ament_cmake#328 (comment)

@Tobias-Fischer
Copy link

I think the backport has been released. Could this PR be merged now?

@rhaschke
Copy link
Contributor

I think this is also blocked by ament/ament_cmake#372. Will double check...

@rhaschke
Copy link
Contributor

Closing and reopening to trigger CI.

@rhaschke rhaschke closed this Oct 21, 2022
@rhaschke rhaschke reopened this Oct 21, 2022
@rhaschke rhaschke merged commit 334589a into ros:ros2 Oct 21, 2022
@wmmc88 wmmc88 deleted the wmmc88/use-python-console_script-entrypoint branch October 21, 2022 14:03
micragz added a commit to zivid/zivid-ros that referenced this pull request Jul 11, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants