-
Notifications
You must be signed in to change notification settings - Fork 203
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
Foxy: Cannot overlay tf2_ros over existing tf2_ros #268
Comments
Interestingly, this does not seem to be a problem in from-source builds. |
Doing some additional testing, this also doesn't work totally right on Eloquent either. The place where it fails is different, but it fails in similar ways (with similar g++ command-lines). So this isn't a regression, though it is a problem people are running into. |
Are you using a merged install or the default isolated? For the latter I would expect the problem to not show up since include directory ordering is not a problem if each include dir is a separate path anyway. |
Default isolated. But what I don't understand is why the situation would be different there. How does ament "know" that it should put the include directory path to the overlay before the underlay? In other words, how does it know it should do:
rather than:
|
In a merged install all headers are in the same include dir `ws/install/include. For an isolated install each package has a separate include dir.
Based on the order of the paths in |
OK. So fundamentally I think the problem is when you mix a merged install and an isolated installed. That is, when installing from debians, you essentially get a merged install as everything is under |
I highly doubt that. Each workspace / prefix path exists independent of each other. Maybe post the compiler command line when building |
It's in the original comment. I will point out that if I remove all dependencies except for geometry2/tf2_ros/CMakeLists.txt Line 39 in a0cd9d7
/opt/ros/foxy/include on the include path, and everything after that point will only use the underlay header if it exists.
|
Sorry, I missed that:
Debugging what The only include directory added with All other dependencies provide modern interface targets which are added with Please see ament/ament_cmake#260 which should address the problem. |
I just gave this use case another try. I still fails with Foxy and still passes with ament/ament_cmake#260 for me. |
Bug report
If you want to put a custom function into one of the geometry2 packages (let's say tf2 for the sake of this example), the obvious thing to do is to install Foxy (either from debs or the fat binary), then make a workspace with
geometry2
in it that has your custom code. The expectation here is that the custom version of geometry2 will overlay the binary installed version. However, this doesn't currently work; if you add a new method to tf2, it will fail to find that method if you try to call it from elsewhere (say in tf2_ros). This is because the include directory order is wrong; see below for more details.Required Info:
Steps to reproduce issue
sudo apt-get install ros-foxy-desktop
mkdir -p custom_tf/src
pushd custom_tf/src ; git clone https://github.com/ros2/geometry2 -b clalancette/overlay-include-problem ; popd
source /opt/ros/foxy/setup.bash
colcon build
Expected behavior
Overlay compiles successfully.
Actual behavior
Overlay fails to build with:
Additional information
Turning on additional debugging, I see the following compile line for the file in question:
It is clearly picking up the tf2 headers from /opt/ros/foxy/include before the custom ones in
/home/ubuntu/custom_tf/install/tf2/include
The text was updated successfully, but these errors were encountered: