moveit_task_constructor/core/test
v4hn 034a155315 provide CostTerm class for all CostTerms
This pattern allows cost::Constant to override the hierarchical cost computation
for the SerialContainer and avoid traversing the graph.

I implemented the CostTerm::supports() pattern over a full double visitor pattern
with overloads for each SolutionBase specialization, because the SerialContainer
needs to know whether cost aggregation of the subsolutions should take place or whether
the SolutionSequence should be forwarded to the CostTerm.
This would not be possible with a `virtual double operator()(const SolutionSequence&)`
callback in CostTerm.

Alternatively, implementing the hierarchical aggregation in the default implementation
of this operator would be possible as well, but breaks intuition:
- the corresponding methods to handle `SubTrajectory` and `WrappedSolution` *have to*
  default to not touching the solution's cost at all so it is inappropriate to have
  the default implementation for the Sequence do something else
- The SerialContainer also aggregates costs outside the `computeCost()` interface
  (in multiple places in `onNewSolution()` to aggregate costs along partial paths)
  and thus moving the hierarchical aggregation to the CostTerm methods requires
  the aggregator to be shared between the Container and the CostTerm,

The only shortcoming of the implemented approach, by contrast, is that user implementations
that want to handle WrappedSolution or SolutionSequence differently have to ensure
the supports_ flags are set correctly. Notice that most custom CostTerms will only
ever access SubTrajectories and this case is simplified with the provided CostTerm constructors.
2020-09-21 22:50:51 +02:00
..
CMakeLists.txt add basic tests for using cost terms 2020-09-21 22:31:52 +02:00
gtest_value_printers.cpp Introduce clang-format (#102) 2019-07-18 11:04:35 +02:00
gtest_value_printers.h extended unittest for serial connection validation 2018-02-18 14:03:57 +01:00
models.cpp clang-tidy: llvm-namespace-comment 2020-06-11 11:03:50 +02:00
models.h Apply clang-format-10 (#199) 2020-08-20 11:56:53 +02:00
pick_pa10.cpp Introduce clang-format (#102) 2019-07-18 11:04:35 +02:00
pick_pa10.test fix tests 2018-10-16 23:14:58 +02:00
pick_pr2.cpp Introduce clang-format (#102) 2019-07-18 11:04:35 +02:00
pick_pr2.test cast demos as integration unit tests 2018-06-03 12:36:01 +02:00
pick_ur5.cpp Introduce clang-format (#102) 2019-07-18 11:04:35 +02:00
pick_ur5.test cast demos as integration unit tests 2018-06-03 12:36:01 +02:00
test_container.cpp clang-format: readability-identifier-naming 2020-06-11 11:03:50 +02:00
test_cost_queue.cpp replace remaining typedefs by using declaration 2020-07-22 12:57:34 +02:00
test_cost_terms.cpp provide CostTerm class for all CostTerms 2020-09-21 22:50:51 +02:00
test_interface_state.cpp replace remaining typedefs by using declaration 2020-07-22 12:57:34 +02:00
test_properties.cpp clang-tidy: modernize-use-override 2020-06-11 11:03:50 +02:00
test_stage.cpp fix stage test mock 2020-09-17 23:00:12 +02:00
test_stage.launch adapt tests to new moveit_resources layout (#200) 2020-08-20 11:04:18 +02:00