Giter VIP home page Giter VIP logo

Comments (5)

meyerj avatar meyerj commented on July 3, 2024

hector_pose_estimation uses the hector_uav_msgs package only if it is available at build time (by find_package), without declaring a build dependency in its package.xml file. hector_uav_msgs is optional and hector_pose_estimation should be usable without the hector_quadrotor stack.

It is not possible to declare an optional dependency in package.xml. The CMake error you observed is caused by the fact that catkin wants to build hector_uav_msgs after hector_pose_estimation and both packages generate the hector_uav_msgs_generate_messages_* targets in this case.

I guess there is no simple workaround here (@dirk-thomas?). You could add hector_uav_msgs as a build_depend in hector_pose_estimation/package.xml, which makes catkin sort the packages correctly and everything runs fine, but I am not sure what consequences this would have if the package is not available. I personally build hector_localization and hector_quadrotor in separate catkin workspaces and therefore never had this problem before.

Note that you only need the hector_pose_estimation package if you want to use more realistic estimated pose information for control and tf instead of ground truth. Otherwise you could place a CATKIN_IGNORE marker file in the hector_pose_estimation package folder and omit that package. If you install ros-hydro-message-to-tf binary package from the Ubuntu repos you also could omit the whole hector_localization repo.

from hector_quadrotor.

dirk-thomas avatar dirk-thomas commented on July 3, 2024

I don't understand why multiple locations would generate the hector_uav_msgs_generate_messages_* targets. Only the hector_uav_msgs package is supposed to generate that target. Where is the other location where that gets generated?

from hector_quadrotor.

meyerj avatar meyerj commented on July 3, 2024

The cmake configuration file of package hector_uav_msgs in devel/share/hector_uav_msgs/cmake/hector_uav_msgsConfig.cmake generates these custom targets if they do not exist.

If both packages are within the same workspace with proper dependencies, the targets are defined in the message package itself, whose cmake script is parsed first. If the message package belongs to another workspace, the empty custom targets are defined to not break cmake scripts that have a add_depedencies(my_target hector_uav_msgs_generate_messages_cpp) line.

I don't have time to look into this more closely right now. Just use two separate workspaces or use hector_quadrotor without hector_pose_estimation as a workaround, if this is okay for you.

from hector_quadrotor.

dirk-thomas avatar dirk-thomas commented on July 3, 2024

catkin_make actually passes for the first invocation since hector_pose_estimation will just not find hector_uav_msgs since it is build before. But on any subsequent configure it will find hector_uav_msgs in the devel space since the CMake config file for it has been generated in the first run.

This conditional finding of hector_uav_msgs results in a non-deterministic behavior of the configure step. I can only highly recommend to not do it in this way. Just the fact that the public API of hector_pose_estimation changes is a strong indicator that this should be addressed differently. I think the right way to do that would be to make the UAV/MAV specific stuff an extension / plugin to the generic pose estimation.

from hector_quadrotor.

meyerj avatar meyerj commented on July 3, 2024

I removed all dependencies to hector_uav_msgs from hector_pose_estimation and created a new package hector_quadrotor_pose_estimation instead (only in the new catkin branch of hector_quadrotor). The catkin_make error should have vanished.

Please comment if you still have problems like this. Obviously you should run the pose_estimation node from the new package for the case you are using it (which is not the default configuration currently).

from hector_quadrotor.

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.