43 #ifndef ILQGAMES_CONSTRAINT_FINAL_TIME_CONSTRAINT_H 44 #define ILQGAMES_CONSTRAINT_FINAL_TIME_CONSTRAINT_H 46 #include <ilqgames/constraint/constraint.h> 47 #include <ilqgames/utils/types.h> 49 #include <glog/logging.h> 61 constraint_(constraint),
62 threshold_time_(threshold_time) {
63 CHECK_NOTNULL(constraint_);
67 float Evaluate(Time t,
const VectorXf& input)
const {
68 return (t < initial_time_ + threshold_time_)
70 : constraint_->Evaluate(t, input);
75 void Quadraticize(Time t,
const VectorXf& input, MatrixXf* hess,
76 VectorXf* grad)
const {
77 if (t >= initial_time_ + threshold_time_)
78 constraint_->Quadraticize(t, input, hess, grad);
83 const std::shared_ptr<Constraint> constraint_;
86 const Time threshold_time_;