Git Product home page Git Product logo

Comments (8)

facontidavide avatar facontidavide commented on June 12, 2024 2

I will happily accept your contributions.

from behaviortree.cpp.

Ryanf55 avatar Ryanf55 commented on June 12, 2024 1

I will test for this scenaio, and probably can add a CI check for it. It should be fixed.

from behaviortree.cpp.

Ryanf55 avatar Ryanf55 commented on June 12, 2024

I ran into a blocker, sorry. Issue linked above. The decision to use BT:: as the exported namespace for conan builds is not supported yet in ament_export_targets. ament_export_targets hard codes the project name as the namespace, which is more common convention.

In order to keep the usage semantics the same (BT::BT::behaviortree_cpp everywhere), this issue will need to be put on hold till upstream has a recommendation.

If we rushed this in with a different namespace, then you'd have a support/documentation fiasco and downstream portable code would be annoying to write to account for both target names.

ROS users should continue to use ament_target_dependencies for the time being, despite it not supporting PRIVATE linkage.

I've submitted an PR upstream. Once that goes in, we can revisit this issue.

from behaviortree.cpp.

asasine avatar asasine commented on June 12, 2024

I found a related problem here that causes linking to fail if there are two installations of this library: one in system (e.g., /opt/ros/{version} via ros-{version}-behaviortree-cpp and one cloned in your workspace). Because ament_export_dependencies(ament_index_cpp) comes before ament_export_include_directories(include), the resulting ${behaviortree_cpp_INCLUDE_DIRS} has /opt/ros/{version}/include before /path/to/local/install/behaviortree_cpp/include, so downstream users of the library link to symbols in /opt/ros/{version}/include instead of /path/to/local/install/behaviortree_cpp/include.

ament_export_dependencies(ament_index_cpp)
set( BTCPP_LIB_DESTINATION lib )
set( BTCPP_INCLUDE_DESTINATION include )
set( BTCPP_BIN_DESTINATION bin )
mark_as_advanced(
BTCPP_EXTRA_LIBRARIES
BTCPP_LIB_DESTINATION
BTCPP_INCLUDE_DESTINATION
BTCPP_BIN_DESTINATION )
macro(export_btcpp_package)
ament_export_include_directories(include)
ament_export_libraries(${BTCPP_LIBRARY})
ament_package()
endmacro()

Does this get resolved with a move to ament_export_targets that also removes ament_export_include_directories, or does it remain? I'm thinking that it fixes it, because the exported target should have /path/to/local/install/behaviortree_cpp/include before /opt/ros/{version}/include in its interface include directories, but I'm unsure.

from behaviortree.cpp.

facontidavide avatar facontidavide commented on June 12, 2024

@Ryanf55 if we can fix this the next week, it would be ideal, I want to release 4.6

from behaviortree.cpp.

Ryanf55 avatar Ryanf55 commented on June 12, 2024

@Ryanf55 if we can fix this the next week, it would be ideal, I want to release 4.6

Yes. It merged to rolling last week, but CI failed on the iron/humble backport for unrelated reasons. After a re-run, it should be good (in theory). I don't have permissions for a re-run.

from behaviortree.cpp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.