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

setup_py / --symlink-install / launch files #187

Closed
stonier opened this issue Feb 18, 2019 · 2 comments
Closed

setup_py / --symlink-install / launch files #187

stonier opened this issue Feb 18, 2019 · 2 comments

Comments

@stonier
Copy link
Contributor

stonier commented Feb 18, 2019

This came up in #83 and I'm interested in chasing it down. Only question is, where to start.

Example installation snippet for launch files in a pure setuptools python package:

    ....
    data_files=[
        ('share/' + package_name, ['package.xml', 'my.launch.py']),
    ],
    ....

Most of the heavy lifting seems to be done by colcon-python-setup-py which does not seem to do anything out of the ordinary.

Curiously though, the package.xml gets symlinked but the launch files do not. Something else must be causing this. In the installed dir:

launch/
package.bash
package.ps1
package.sh
my.launch.py
package.xml -> /my_workspace/src/my_package/package.xml
package.zsh

Any pointers on where to get started?

@wjwwood
Copy link
Member

wjwwood commented Feb 19, 2019

Symlink install for python packages doesn't actually symlink anything, it uses setuptool's develop mode. So the files being installed with data_files are not actually being placed in the install folder. Also, launch has no way of finding the build or source folders for a package, so I don't have any ideas for how to improve that right now.

@stonier
Copy link
Contributor Author

stonier commented Mar 1, 2019

Those files are actually being installed into the install folder, just not unwound and symlinked like package.xml. Talked to @dirk-thomas the other day though, he pointed to where colcon is doing the symlinking for python packages, so I'm shifting the details of this issue there (colcon/colcon-core#169).

Wrapping up, workaround in the meantime (if you want symlink installs of launchers) is to just create standalone ros2 run style scripts for launchers and pull in the launch_ros functionality via library calls rather than use the ros2 launch framework.

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

No branches or pull requests

2 participants