45 #ifndef FASTRACK_VALUE_VALUE_FUNCTION_H 46 #define FASTRACK_VALUE_VALUE_FUNCTION_H 59 using dynamics::Dynamics;
60 using dynamics::RelativeDynamics;
61 using state::RelativeState;
63 template <
typename TS,
typename TC,
typename TD,
typename PS,
typename PC,
64 typename PD,
typename B>
71 name_ = ros::names::append(n.getNamespace(),
"ValueFunction");
74 ROS_ERROR(
"%s: Failed to load parameters.",
name_.c_str());
79 ROS_ERROR(
"%s: Failed to register callbacks.",
name_.c_str());
88 virtual double Value(
const TS& tracker_x,
const PS& planner_x)
const = 0;
89 virtual std::unique_ptr<RelativeState<TS, PS>>
Gradient(
90 const TS& tracker_x,
const PS& planner_x)
const = 0;
95 throw std::runtime_error(
"Uninitialized call to OptimalControl.");
100 tracker_x, planner_x, *
Gradient(tracker_x, planner_x),
111 throw std::runtime_error(
"Uninitialized call to GetRelativeDynamics.");
120 virtual double Priority(
const TS& tracker_x,
const PS& planner_x)
const = 0;
virtual std::unique_ptr< RelativeState< TS, PS > > Gradient(const TS &tracker_x, const PS &planner_x) const =0
virtual double Value(const TS &tracker_x, const PS &planner_x) const =0
const B & TrackingBound() const
const RelativeDynamics< TS, TC, PS, PC > & GetRelativeDynamics() const
TC OptimalControl(const TS &tracker_x, const PS &planner_x) const
bool Initialize(const ros::NodeHandle &n)
std::unique_ptr< RelativeDynamics< TS, TC, PS, PC > > relative_dynamics_
virtual bool LoadParameters(const ros::NodeHandle &n)
const TD & TrackerDynamics() const
const PD & PlannerDynamics() const
virtual double Priority(const TS &tracker_x, const PS &planner_x) const =0
virtual bool RegisterCallbacks(const ros::NodeHandle &n)