moveit_task_constructor/core
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
..
include/moveit/task_constructor provide CostTerm class for all CostTerms 2020-09-21 22:50:51 +02:00
src provide CostTerm class for all CostTerms 2020-09-21 22:50:51 +02:00
test provide CostTerm class for all CostTerms 2020-09-21 22:50:51 +02:00
CMakeLists.txt bump cmake version 2020-04-03 12:14:57 +02:00
motion_planning_stages_plugin_description.xml more exported stage plugins: CurrentState 2018-02-04 21:30:25 +01:00
package.xml adapt tests to new moveit_resources layout (#200) 2020-08-20 11:04:18 +02:00