Exotica
dynamic_time_indexed_shooting_problem.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2019, Wolfgang Merkt
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 //
8 // * Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of nor the names of its contributors may be used to
14 // endorse or promote products derived from this software without specific
15 // prior written permission.
16 //
17 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 // POSSIBILITY OF SUCH DAMAGE.
28 //
29 
30 #ifndef EXOTICA_CORE_DYNAMIC_TIME_INDEXED_SHOOTING_PROBLEM_H_
31 #define EXOTICA_CORE_DYNAMIC_TIME_INDEXED_SHOOTING_PROBLEM_H_
32 
35 #include <exotica_core/tasks.h>
36 
37 #include <exotica_core/dynamic_time_indexed_shooting_problem_initializer.h>
38 
39 namespace exotica
40 {
42 {
43  Undefined = -1,
44  L2 = 0,
45  SmoothL1 = 1,
46  Huber = 2,
48 };
49 
50 class DynamicTimeIndexedShootingProblem : public PlanningProblem, public Instantiable<DynamicTimeIndexedShootingProblemInitializer>
51 {
52 public:
55 
56  void Instantiate(const DynamicTimeIndexedShootingProblemInitializer& init) override;
57 
58  Eigen::VectorXd ApplyStartState(bool update_traj = true) override;
59  void PreUpdate() override;
60  void Update(Eigen::VectorXdRefConst u, int t);
62  void UpdateTerminalState(Eigen::VectorXdRefConst x); // Updates the terminal state and recomputes the terminal cost - this is required e.g. when considering defects in the dynamics
63 
64  const int& get_T() const;
65  void set_T(const int& T_in);
66 
67  const double& get_tau() const;
68 
69  const Eigen::MatrixXd& get_X() const;
70  Eigen::VectorXd get_X(int t) const;
71  void set_X(Eigen::MatrixXdRefConst X_in);
72 
73  const Eigen::MatrixXd& get_U() const;
74  Eigen::VectorXd get_U(int t) const;
75  void set_U(Eigen::MatrixXdRefConst U_in);
76 
77  const Eigen::MatrixXd& get_X_star() const;
78  void set_X_star(Eigen::MatrixXdRefConst X_star_in);
79 
80  const Eigen::MatrixXd& get_Q(int t) const;
81  void set_Q(Eigen::MatrixXdRefConst Q_in, int t);
82 
83  const Eigen::MatrixXd& get_Qf() const;
84  void set_Qf(Eigen::MatrixXdRefConst Q_in);
85 
86  const Eigen::MatrixXd& get_R() const;
87  Eigen::MatrixXd get_F(int t) const;
88 
89  const Eigen::MatrixXd& GetControlNoiseJacobian(int column_idx) const;
90 
93 
94  // TODO: Make private and add getter (no need to be public!)
96  std::vector<TaskSpaceVector> Phi;
97  std::vector<Eigen::MatrixXd> dPhi_dx;
98  std::vector<Eigen::MatrixXd> dPhi_du;
99  std::vector<Hessian> ddPhi_ddx;
100  std::vector<Hessian> ddPhi_ddu;
101  std::vector<Hessian> ddPhi_dxdu;
102 
103  // TODO: Make private and add getter/setter
106  int num_tasks;
107 
108  double GetStateCost(int t) const;
109  double GetControlCost(int t) const;
110 
111  Eigen::VectorXd GetStateCostJacobian(int t);
112  Eigen::VectorXd GetControlCostJacobian(int t);
113  Eigen::MatrixXd GetStateCostHessian(int t);
114  Eigen::MatrixXd GetControlCostHessian(int t);
115  Eigen::MatrixXd GetStateControlCostHessian()
116  {
117  // NOTE: For quadratic costs this is always 0
118  // thus we return a scalar of size 1 and value 0
119  // This is the same as returning an (int)0 but for type safety
120  // we instantiate eigen vectors instead.
121  return Eigen::MatrixXd::Zero(scene_->get_num_controls(), scene_->get_num_state_derivative());
122  };
123 
125  {
126  if (parameters_.LossType == "AdaptiveSmoothL1")
127  {
128  // Adaptive SmoothL1 Rule
129  // from "RetinaMask: Learning to predict masks improves state-of-the-art single-shot detection for free"
130  const double momentum = 0.9;
131 
132  Eigen::VectorXd new_smooth_l1_mean_ = Eigen::VectorXd::Zero(scene_->get_num_controls());
133  Eigen::VectorXd new_smooth_l1_std_ = Eigen::VectorXd::Zero(scene_->get_num_controls());
134 
135  for (int t = 0; t < T_; ++t)
136  {
137  for (int ui = 0; ui < scene_->get_num_controls(); ++ui)
138  {
139  new_smooth_l1_mean_[ui] += std::abs(U_.col(t)[ui]);
140  }
141  }
142 
143  new_smooth_l1_mean_ /= T_;
144 
145  for (int t = 0; t < T_; ++t)
146  {
147  for (int ui = 0; ui < scene_->get_num_controls(); ++ui)
148  {
149  new_smooth_l1_std_[ui] += (std::abs(U_.col(t)[ui]) - new_smooth_l1_mean_[ui]) * (std::abs(U_.col(t)[ui]) - new_smooth_l1_mean_[ui]);
150  }
151  }
152 
153  new_smooth_l1_std_ /= T_;
154 
155  smooth_l1_mean_ = smooth_l1_mean_ * momentum + new_smooth_l1_mean_ * (1 - momentum);
156  smooth_l1_std_ = smooth_l1_std_ * momentum + new_smooth_l1_std_ * (1 - momentum);
157 
158  for (int ui = 0; ui < scene_->get_num_controls(); ++ui)
159  {
160  l1_rate_[ui] = std::max(0.0, std::min(l1_rate_[ui], smooth_l1_mean_[ui] - smooth_l1_std_[ui]));
161  }
162  }
163  }
164 
166  void set_loss_type(const ControlCostLossTermType& loss_type_in) { loss_type_ = loss_type_in; }
168  void set_control_cost_weight(const double control_cost_weight_in) { control_cost_weight_ = control_cost_weight_in; }
169 
170 protected:
172  inline void ValidateTimeIndex(int& t_in) const
173  {
174  if (t_in >= T_ || t_in < -1)
175  {
176  ThrowPretty("Requested t=" << t_in << " out of range, needs to be 0 =< t < " << T_);
177  }
178  else if (t_in == -1)
179  {
180  t_in = (T_ - 1);
181  }
182  }
183  void ReinitializeVariables();
184 
186 
187  int T_;
188  double tau_;
191 
192  Eigen::MatrixXd X_;
193  Eigen::MatrixXd U_;
194  Eigen::MatrixXd X_star_;
195  Eigen::MatrixXd X_diff_;
196 
197  Eigen::MatrixXd Qf_;
198  std::vector<Eigen::MatrixXd> Q_;
199  Eigen::MatrixXd R_;
200 
201  std::vector<Eigen::MatrixXd> Ci_;
202  Eigen::MatrixXd CW_;
203 
204  // Pre-allocated variables
205  std::vector<Eigen::MatrixXd> dxdiff_;
206  std::vector<Eigen::VectorXd> state_cost_jacobian_;
207  std::vector<Eigen::MatrixXd> state_cost_hessian_;
208  std::vector<Eigen::VectorXd> general_cost_jacobian_;
209  std::vector<Eigen::MatrixXd> general_cost_hessian_;
210  std::vector<Eigen::VectorXd> control_cost_jacobian_;
211  std::vector<Eigen::MatrixXd> control_cost_hessian_;
212 
213  std::vector<std::shared_ptr<KinematicResponse>> kinematic_solutions_;
214 
215  std::mt19937 generator_;
216  std::normal_distribution<double> standard_normal_noise_{0, 1};
217 
219 
222  void InstantiateCostTerms(const DynamicTimeIndexedShootingProblemInitializer& init);
223 
224  // sparsity costs
225  Eigen::VectorXd l1_rate_;
226  Eigen::VectorXd huber_rate_;
228 
229  Eigen::VectorXd smooth_l1_mean_, smooth_l1_std_;
230 };
231 typedef std::shared_ptr<exotica::DynamicTimeIndexedShootingProblem> DynamicTimeIndexedShootingProblemPtr;
232 } // namespace exotica
233 
234 #endif // EXOTICA_CORE_DYNAMIC_TIME_INDEXED_SHOOTING_PROBLEM_H_
exotica::DynamicTimeIndexedShootingProblem::Update
void Update(Eigen::VectorXdRefConst u, int t)
exotica::DynamicTimeIndexedShootingProblem::ApplyStartState
Eigen::VectorXd ApplyStartState(bool update_traj=true) override
exotica::DynamicTimeIndexedShootingProblem::generator_
std::mt19937 generator_
Definition: dynamic_time_indexed_shooting_problem.h:215
exotica::DynamicTimeIndexedShootingProblem::l1_rate_
Eigen::VectorXd l1_rate_
Definition: dynamic_time_indexed_shooting_problem.h:225
exotica::Instantiable< DynamicTimeIndexedShootingProblemInitializer >::parameters_
DynamicTimeIndexedShootingProblemInitializer parameters_
Definition: property.h:139
exotica::DynamicTimeIndexedShootingProblem::get_tau
const double & get_tau() const
Returns the discretization timestep tau.
exotica::DynamicTimeIndexedShootingProblem::smooth_l1_std_
Eigen::VectorXd smooth_l1_std_
Definition: dynamic_time_indexed_shooting_problem.h:229
exotica::DynamicTimeIndexedShootingProblem::control_cost_jacobian_
std::vector< Eigen::VectorXd > control_cost_jacobian_
Definition: dynamic_time_indexed_shooting_problem.h:210
exotica::DynamicTimeIndexedShootingProblem::~DynamicTimeIndexedShootingProblem
virtual ~DynamicTimeIndexedShootingProblem()
planning_problem.h
exotica::DynamicTimeIndexedShootingProblem::set_X
void set_X(Eigen::MatrixXdRefConst X_in)
Sets the state trajectory X (can be used as the initial guess)
exotica::DynamicTimeIndexedShootingProblem::control_cost_weight_
double control_cost_weight_
Definition: dynamic_time_indexed_shooting_problem.h:220
exotica::DynamicTimeIndexedShootingProblem::get_control_cost_weight
double get_control_cost_weight() const
Definition: dynamic_time_indexed_shooting_problem.h:167
exotica::DynamicTimeIndexedShootingProblem::GetStateCostHessian
Eigen::MatrixXd GetStateCostHessian(int t)
lxx
exotica::DynamicTimeIndexedShootingProblem::length_jacobian
int length_jacobian
Length of tangent vector to Phi.
Definition: dynamic_time_indexed_shooting_problem.h:105
exotica::DynamicTimeIndexedShootingProblem::general_cost_hessian_
std::vector< Eigen::MatrixXd > general_cost_hessian_
Definition: dynamic_time_indexed_shooting_problem.h:209
exotica::DynamicTimeIndexedShootingProblem::standard_normal_noise_
std::normal_distribution< double > standard_normal_noise_
Definition: dynamic_time_indexed_shooting_problem.h:216
exotica::DynamicTimeIndexedShootingProblem::get_T
const int & get_T() const
Returns the number of timesteps in the state trajectory.
exotica::DynamicTimeIndexedShootingProblem::ValidateTimeIndex
void ValidateTimeIndex(int &t_in) const
Checks the desired time index for bounds and supports -1 indexing.
Definition: dynamic_time_indexed_shooting_problem.h:172
exotica::DynamicTimeIndexedShootingProblem::general_cost_jacobian_
std::vector< Eigen::VectorXd > general_cost_jacobian_
Definition: dynamic_time_indexed_shooting_problem.h:208
exotica::SmoothL1
@ SmoothL1
Definition: dynamic_time_indexed_shooting_problem.h:45
exotica::DynamicTimeIndexedShootingProblem::Instantiate
void Instantiate(const DynamicTimeIndexedShootingProblemInitializer &init) override
exotica::DynamicTimeIndexedShootingProblem::get_X
const Eigen::MatrixXd & get_X() const
Returns the state trajectory X.
exotica::Undefined
@ Undefined
Definition: dynamic_time_indexed_shooting_problem.h:43
exotica::DynamicTimeIndexedShootingProblem::set_Q
void set_Q(Eigen::MatrixXdRefConst Q_in, int t)
Sets the precision matrix for time step t.
exotica::DynamicTimeIndexedShootingProblem::loss_type_
ControlCostLossTermType loss_type_
Definition: dynamic_time_indexed_shooting_problem.h:221
exotica::DynamicTimeIndexedShootingProblem::EnableStochasticUpdates
void EnableStochasticUpdates()
exotica::DynamicTimeIndexedShootingProblem::dxdiff_
std::vector< Eigen::MatrixXd > dxdiff_
Definition: dynamic_time_indexed_shooting_problem.h:205
exotica::Instantiable
Definition: property.h:110
exotica::DynamicTimeIndexedShootingProblem::set_X_star
void set_X_star(Eigen::MatrixXdRefConst X_star_in)
Sets the target state trajectory X.
exotica
Definition: cartpole_dynamics_solver.h:38
exotica::DynamicTimeIndexedShootingProblem::X_star_
Eigen::MatrixXd X_star_
Goal state trajectory (i.e., positions, velocities). Size: num-states x T.
Definition: dynamic_time_indexed_shooting_problem.h:194
exotica::ControlCostLossTermType
ControlCostLossTermType
Definition: dynamic_time_indexed_shooting_problem.h:41
exotica::DynamicTimeIndexedShootingProblem::DynamicTimeIndexedShootingProblem
DynamicTimeIndexedShootingProblem()
exotica::DynamicTimeIndexedShootingProblem::GetControlNoiseJacobian
const Eigen::MatrixXd & GetControlNoiseJacobian(int column_idx) const
F[i]_u.
exotica::DynamicTimeIndexedShootingProblem::get_Qf
const Eigen::MatrixXd & get_Qf() const
Returns the cost weight matrix at time N.
exotica::DynamicTimeIndexedShootingProblem::bimodal_huber_mode1_
Eigen::VectorXd bimodal_huber_mode1_
Definition: dynamic_time_indexed_shooting_problem.h:227
exotica::DynamicTimeIndexedShootingProblem::ddPhi_ddu
std::vector< Hessian > ddPhi_ddu
Stacked TaskMap Hessian w.r.t. control.
Definition: dynamic_time_indexed_shooting_problem.h:100
exotica::DynamicTimeIndexedShootingProblem::get_Q
const Eigen::MatrixXd & get_Q(int t) const
Returns the precision matrix at time step t.
exotica::DynamicTimeIndexedShootingProblem::dPhi_du
std::vector< Eigen::MatrixXd > dPhi_du
Stacked TaskMap Jacobian w.r.t. control.
Definition: dynamic_time_indexed_shooting_problem.h:98
exotica::DynamicTimeIndexedShootingProblem::Qf_
Eigen::MatrixXd Qf_
Final state cost.
Definition: dynamic_time_indexed_shooting_problem.h:197
exotica::DynamicTimeIndexedShootingProblem::get_U
const Eigen::MatrixXd & get_U() const
Returns the control trajectory U.
exotica::DynamicTimeIndexedShootingProblem::state_cost_hessian_
std::vector< Eigen::MatrixXd > state_cost_hessian_
Definition: dynamic_time_indexed_shooting_problem.h:207
exotica::PlanningProblem::scene_
ScenePtr scene_
Definition: planning_problem.h:106
exotica::DynamicTimeIndexedShootingProblem::CW_
Eigen::MatrixXd CW_
White noise covariance.
Definition: dynamic_time_indexed_shooting_problem.h:202
exotica::DynamicTimeIndexedShootingProblem::stochastic_matrices_specified_
bool stochastic_matrices_specified_
Definition: dynamic_time_indexed_shooting_problem.h:189
exotica::DynamicTimeIndexedShootingProblem::control_cost_hessian_
std::vector< Eigen::MatrixXd > control_cost_hessian_
Definition: dynamic_time_indexed_shooting_problem.h:211
exotica::DynamicTimeIndexedShootingProblem::GetControlCost
double GetControlCost(int t) const
Eigen::VectorXdRefConst
const typedef Eigen::Ref< const Eigen::VectorXd > & VectorXdRefConst
Convenience wrapper for storing references to sub-matrices/vectors.
Definition: conversions.h:52
exotica::Huber
@ Huber
Definition: dynamic_time_indexed_shooting_problem.h:46
exotica::DynamicTimeIndexedShootingProblem::Phi
std::vector< TaskSpaceVector > Phi
Stacked TaskMap vector.
Definition: dynamic_time_indexed_shooting_problem.h:96
exotica::DynamicTimeIndexedShootingProblem::kinematic_solutions_
std::vector< std::shared_ptr< KinematicResponse > > kinematic_solutions_
Definition: dynamic_time_indexed_shooting_problem.h:213
exotica::DynamicTimeIndexedShootingProblem::ddPhi_dxdu
std::vector< Hessian > ddPhi_dxdu
Stacked TaskMap Hessian w.r.t. state and control.
Definition: dynamic_time_indexed_shooting_problem.h:101
exotica::DynamicTimeIndexedShootingProblem::set_Qf
void set_Qf(Eigen::MatrixXdRefConst Q_in)
Sets the cost weight matrix for time N.
exotica::TaskSpaceVector
Definition: task_space_vector.h:50
exotica::DynamicTimeIndexedShootingProblem::OnSolverIterationEnd
void OnSolverIterationEnd()
lxu == lux
Definition: dynamic_time_indexed_shooting_problem.h:124
Eigen::MatrixXdRefConst
const typedef Eigen::Ref< const Eigen::MatrixXd > & MatrixXdRefConst
Definition: conversions.h:53
exotica::TimeIndexedTask
Definition: tasks.h:75
exotica::L2
@ L2
Definition: dynamic_time_indexed_shooting_problem.h:44
exotica::DynamicTimeIndexedShootingProblem::set_U
void set_U(Eigen::MatrixXdRefConst U_in)
Sets the control trajectory U (can be used as the initial guess)
exotica::DynamicTimeIndexedShootingProblemPtr
std::shared_ptr< exotica::DynamicTimeIndexedShootingProblem > DynamicTimeIndexedShootingProblemPtr
Definition: dynamic_time_indexed_shooting_problem.h:231
tasks.h
exotica::DynamicTimeIndexedShootingProblem::cost
TimeIndexedTask cost
Cost task.
Definition: dynamic_time_indexed_shooting_problem.h:95
exotica::DynamicTimeIndexedShootingProblem::DisableStochasticUpdates
void DisableStochasticUpdates()
exotica::DynamicTimeIndexedShootingProblem::set_loss_type
void set_loss_type(const ControlCostLossTermType &loss_type_in)
Definition: dynamic_time_indexed_shooting_problem.h:166
exotica::DynamicTimeIndexedShootingProblem::GetControlCostJacobian
Eigen::VectorXd GetControlCostJacobian(int t)
lu
exotica::DynamicTimeIndexedShootingProblem
Definition: dynamic_time_indexed_shooting_problem.h:50
exotica::DynamicTimeIndexedShootingProblem::GetStateCostJacobian
Eigen::VectorXd GetStateCostJacobian(int t)
lx
exotica::DynamicTimeIndexedShootingProblem::dPhi_dx
std::vector< Eigen::MatrixXd > dPhi_dx
Stacked TaskMap Jacobian w.r.t. state.
Definition: dynamic_time_indexed_shooting_problem.h:97
exotica::DynamicTimeIndexedShootingProblem::length_Phi
int length_Phi
Length of TaskSpaceVector (Phi => stacked task-maps)
Definition: dynamic_time_indexed_shooting_problem.h:104
exotica::DynamicTimeIndexedShootingProblem::U_
Eigen::MatrixXd U_
Control trajectory. Size: num-controls x (T-1)
Definition: dynamic_time_indexed_shooting_problem.h:193
exotica::DynamicTimeIndexedShootingProblem::UpdateTerminalState
void UpdateTerminalState(Eigen::VectorXdRefConst x)
exotica::PseudoHuber
@ PseudoHuber
Definition: dynamic_time_indexed_shooting_problem.h:47
exotica::DynamicTimeIndexedShootingProblem::get_loss_type
const ControlCostLossTermType & get_loss_type() const
Definition: dynamic_time_indexed_shooting_problem.h:165
exotica::DynamicTimeIndexedShootingProblem::ReinitializeVariables
void ReinitializeVariables()
ThrowPretty
#define ThrowPretty(m)
Definition: exception.h:36
exotica::DynamicTimeIndexedShootingProblem::PreUpdate
void PreUpdate() override
exotica::PlanningProblem
Definition: planning_problem.h:64
exotica::DynamicTimeIndexedShootingProblem::tau_
double tau_
Time step duration.
Definition: dynamic_time_indexed_shooting_problem.h:188
exotica::DynamicTimeIndexedShootingProblem::GetControlCostHessian
Eigen::MatrixXd GetControlCostHessian(int t)
luu
exotica::DynamicTimeIndexedShootingProblem::smooth_l1_mean_
Eigen::VectorXd smooth_l1_mean_
Definition: dynamic_time_indexed_shooting_problem.h:229
exotica::DynamicTimeIndexedShootingProblem::X_
Eigen::MatrixXd X_
State trajectory (i.e., positions, velocities). Size: num-states x T.
Definition: dynamic_time_indexed_shooting_problem.h:192
exotica::DynamicTimeIndexedShootingProblem::T_
int T_
Number of time steps.
Definition: dynamic_time_indexed_shooting_problem.h:187
exotica::DynamicTimeIndexedShootingProblem::get_R
const Eigen::MatrixXd & get_R() const
Returns the control weight matrix.
exotica::DynamicTimeIndexedShootingProblem::InstantiateCostTerms
void InstantiateCostTerms(const DynamicTimeIndexedShootingProblemInitializer &init)
exotica::DynamicTimeIndexedShootingProblem::Q_
std::vector< Eigen::MatrixXd > Q_
State space penalty matrix (precision matrix), per time index.
Definition: dynamic_time_indexed_shooting_problem.h:198
exotica::DynamicTimeIndexedShootingProblem::GetStateControlCostHessian
Eigen::MatrixXd GetStateControlCostHessian()
Definition: dynamic_time_indexed_shooting_problem.h:115
exotica::DynamicTimeIndexedShootingProblem::set_T
void set_T(const int &T_in)
Sets the number of timesteps in the state trajectory.
exotica::DynamicTimeIndexedShootingProblem::num_tasks
int num_tasks
Number of TaskMaps.
Definition: dynamic_time_indexed_shooting_problem.h:106
dynamics_solver.h
exotica::DynamicTimeIndexedShootingProblem::R_
Eigen::MatrixXd R_
Control space penalty matrix.
Definition: dynamic_time_indexed_shooting_problem.h:199
exotica::DynamicTimeIndexedShootingProblem::state_cost_jacobian_
std::vector< Eigen::VectorXd > state_cost_jacobian_
Definition: dynamic_time_indexed_shooting_problem.h:206
exotica::DynamicTimeIndexedShootingProblem::get_F
Eigen::MatrixXd get_F(int t) const
Returns the noise weight matrix at time t.
exotica::DynamicTimeIndexedShootingProblem::huber_rate_
Eigen::VectorXd huber_rate_
Definition: dynamic_time_indexed_shooting_problem.h:226
exotica::DynamicTimeIndexedShootingProblem::Ci_
std::vector< Eigen::MatrixXd > Ci_
Noise weight terms.
Definition: dynamic_time_indexed_shooting_problem.h:201
exotica::DynamicTimeIndexedShootingProblem::get_X_star
const Eigen::MatrixXd & get_X_star() const
Returns the target state trajectory X.
exotica::DynamicTimeIndexedShootingProblem::cost_Phi
TaskSpaceVector cost_Phi
Definition: dynamic_time_indexed_shooting_problem.h:218
exotica::DynamicTimeIndexedShootingProblem::stochastic_updates_enabled_
bool stochastic_updates_enabled_
Definition: dynamic_time_indexed_shooting_problem.h:190
exotica::DynamicTimeIndexedShootingProblem::GetStateCost
double GetStateCost(int t) const
exotica::DynamicTimeIndexedShootingProblem::set_control_cost_weight
void set_control_cost_weight(const double control_cost_weight_in)
Definition: dynamic_time_indexed_shooting_problem.h:168
exotica::DynamicTimeIndexedShootingProblem::UpdateTaskMaps
void UpdateTaskMaps(Eigen::VectorXdRefConst x, Eigen::VectorXdRefConst u, int t)
exotica::DynamicTimeIndexedShootingProblem::bimodal_huber_mode2_
Eigen::VectorXd bimodal_huber_mode2_
Definition: dynamic_time_indexed_shooting_problem.h:227
exotica::DynamicTimeIndexedShootingProblem::ddPhi_ddx
std::vector< Hessian > ddPhi_ddx
Stacked TaskMap Hessian w.r.t. state.
Definition: dynamic_time_indexed_shooting_problem.h:99
exotica::DynamicTimeIndexedShootingProblem::X_diff_
Eigen::MatrixXd X_diff_
Difference between X_ and X_star_. Size: ndx x T.
Definition: dynamic_time_indexed_shooting_problem.h:195