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

python package --symlink-install is broken for config files #407

Closed
BrettRD opened this issue Nov 12, 2020 · 7 comments · Fixed by #592
Closed

python package --symlink-install is broken for config files #407

BrettRD opened this issue Nov 12, 2020 · 7 comments · Fixed by #592

Comments

@BrettRD
Copy link

BrettRD commented Nov 12, 2020

Building a python package containing launch and config files using colcon build --symlink-install results in the config and launch files getting copied into install/ instead of symlinked.
This seems to apply to anything listed under data_files in setup.py.

Doing the same with cmake results in symlinks in the install directory as expected.

There doesn't appear to be any documented way of getting config files symlinked using setup.py except for hacky workarounds involving hardcoded links in launch files that prevent clean packaging

Similar issues have been raised, but none were usefully resolved:
ros2/launch#187
#169

@martimorta
Copy link

Hi,
I have seen there was this PR #223 trying to fix this issue, but it is not resolved yet.

@bijoua29
Copy link

bijoua29 commented Nov 12, 2021

So it looks like this issue has still not been fixed. Is symlink just broken for python packages or is there a workaround? That is, for files in config folder, they are not symlinked. For cmake packages, all the files in the config folder are symlinked.

@brennand
Copy link

This still doesn't work for me either.

@Raamkishore
Copy link

Still doesn't work unfortunately.

@eMrazSVK
Copy link

Does not work until this day. I cannot even overcome this with supplying my package with CMakeLists.txt since only one build type is supported and my package is consisting purely of Python modules.

whoenig added a commit to IMRCLab/crazyswarm2 that referenced this issue Nov 15, 2022
whoenig added a commit to IMRCLab/crazyswarm2 that referenced this issue Nov 17, 2022
* examples: switch to cmake for symlink-install

Workaround for colcon/colcon-core#407

Fixes #87
@gorghino
Copy link

Any news with this issue?

@KKSTB
Copy link

KKSTB commented Sep 4, 2023

Seems converting a ament_python package to ament_cmake_python helps (example: IMRCLab/crazyswarm2@fd778f3)

boomer319 pushed a commit to boomer319/verrueckterschwarm2 that referenced this issue Nov 25, 2023
* examples: switch to cmake for symlink-install

Workaround for colcon/colcon-core#407

Fixes IMRCLab#87
bhung-bdai pushed a commit to bdaiinstitute/spot_ros2 that referenced this issue Dec 8, 2023
This PR uses node / launch arguments to specify whether the driver should operate in "mock" mode, instead of using the sentinel name `Mock_spot`. With an explicit parameter, we can have multiple mocks, with different names, and also affect whether there is an arm.


For example, with this modification you can do

```
cd spot_driver
colcon build --symlink # (`symlink` [does not apply to launch files](colcon/colcon-core#407))
source install/setup.bash
ros2 launch spot_driver spot_driver.launch.py spot_name:=AnyNameHere mock_enable:=True mock_has_arm:=True
```

and then, for example (`spot_utilities`, specifically in `bdai` repo)

```
# source so that `spot_driver` can be found
cd spot_utilities # /workspaces/bdai/ws/src/spot_utilities
colcon build
source install/setup.bash
ros2 run spot_utilities spot_teleop.py AnyNameHere
```
@cottsay cottsay linked a pull request Jan 22, 2024 that will close this issue
marlow-fawn pushed a commit to marlow-fawn/spot_ros2 that referenced this issue Aug 19, 2024
This PR uses node / launch arguments to specify whether the driver should operate in "mock" mode, instead of using the sentinel name `Mock_spot`. With an explicit parameter, we can have multiple mocks, with different names, and also affect whether there is an arm.


For example, with this modification you can do

```
cd spot_driver
colcon build --symlink # (`symlink` [does not apply to launch files](colcon/colcon-core#407))
source install/setup.bash
ros2 launch spot_driver spot_driver.launch.py spot_name:=AnyNameHere mock_enable:=True mock_has_arm:=True
```

and then, for example (`spot_utilities`, specifically in `bdai` repo)

```
# source so that `spot_driver` can be found
cd spot_utilities # /workspaces/bdai/ws/src/spot_utilities
colcon build
source install/setup.bash
ros2 run spot_utilities spot_teleop.py AnyNameHere
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

8 participants