KrisLibrary  1.0.0
Public Member Functions | Public Attributes | List of all members
CompositeObjective Class Reference

An objective that merges contributions from multiple other objective functions. More...

#include <Objective.h>

Inheritance diagram for CompositeObjective:
ObjectiveFunctionalBase

Public Member Functions

void Add (const std::shared_ptr< ObjectiveFunctionalBase > &obj, Real weight=1.0)
 Adds a new component. Note: this takes ownership of the pointer.
 
virtual const char * TypeString ()
 Subclasses: return an identifier for this goal type.
 
virtual std::string Description ()
 Subclasses: return a string for printing (optional)
 
virtual Real TerminalCost (const Vector &qend)
 
virtual Real IncrementalCost (const Interpolator *path)
 
virtual bool PathInvariant () const
 Subclasses: planners may exploit path-invariant costs for faster performance.
 
- Public Member Functions inherited from ObjectiveFunctionalBase
virtual Real IncrementalCost (const ControlInput &u, const Interpolator *path)
 
virtual Real IncrementalCost (const KinodynamicMilestonePath &path)
 
virtual Real TerminalCost (const Config &qend)
 Subclasses: return the cost of a terminal state.
 
virtual Real PathCost (const MilestonePath &path)
 
virtual Real PathCost (const KinodynamicMilestonePath &path)
 
virtual bool SaveParams (AnyCollection &collection)
 Subclasses: read and write parameters to collection.
 
virtual bool LoadParams (AnyCollection &collection)
 

Public Attributes

Real norm
 
std::vector< std::shared_ptr< ObjectiveFunctionalBase > > components
 
std::vector< Real > weights
 

Detailed Description

An objective that merges contributions from multiple other objective functions.

Member Function Documentation

Real CompositeObjective::IncrementalCost ( const Interpolator path)
virtual

Subclasses: return the incremental cost of undertaking the given path. This should be equal to the integral of the differential cost, or at least a good approximation

Reimplemented from ObjectiveFunctionalBase.


The documentation for this class was generated from the following files: