flexbe_behavior_engine icon indicating copy to clipboard operation
flexbe_behavior_engine copied to clipboard

cyclic dependency between flexbe_testing and flexbe_states

Open fmessmer opened this issue 5 years ago • 1 comments

ref https://github.com/mojin-robotics/flexbe_behavior_engine/issues/9

found this while running tests under noetic with colcon:

  • flexbe_states
    • uses flexbe_testing e.g. https://github.com/team-vigir/flexbe_behavior_engine/blob/develop/flexbe_states/tests/run_tests.launch#L8
    • declares dependency on flexbe_testing: https://github.com/team-vigir/flexbe_behavior_engine/blob/develop/flexbe_states/package.xml#L22
  • flexbe_testing
    • uses flexbe_states e.g. https://github.com/team-vigir/flexbe_behavior_engine/blob/develop/flexbe_testing/src/flexbe_testing/test/selftest_behavior_sm.py#L11-L12
    • does not declare a dependency on flexbe_states:https://github.com/team-vigir/flexbe_behavior_engine/blob/develop/flexbe_testing/package.xml

without the dependency, colcon complains about not being able to import the flexbe_states in flexbe_testing - as colcon is very strict in separating/isolating packages with the dependency, you have a cyclic dependency and the repo cannot be compiled anymore

flexbe_testing should only use very light-weight states for self-testing and not states from further down-stream packages brute-force solution could be to copy-paste (duplicate) the imported states from flexbe_states into flexbe_testing better solution would be to implement different light-weight states in flexbe_testing

fmessmer avatar Jan 15 '21 16:01 fmessmer

Good catch, thanks for reporting! I think I created this dependency unintentionally when I added the sefttest behavior simply as generated by flexbe_app.

Also thanks for the PR! I now also merged the copied state files with the behavior to avoid accidental external use. So the issue should be fixed.

pschillinger avatar Jan 18 '21 15:01 pschillinger