Crocoddyl
Loading...
Searching...
No Matches
fwd.hpp
1
2// BSD 3-Clause License
3//
4// Copyright (C) 2019-2026, LAAS-CNRS, University of Edinburgh,
5// Heriot-Watt University
6// Copyright note valid unless otherwise stated in individual files.
7// All rights reserved.
9
10#ifndef CROCODDYL_CORE_FWD_HPP_
11#define CROCODDYL_CORE_FWD_HPP_
12
13#include "crocoddyl/core/pch.hpp"
14
15namespace crocoddyl {
16
17inline bool& enableMultithreading() {
18 static bool enable = true;
19 return enable;
20}
21
22enum AssignmentOp { setto, addto, rmfrom };
23
24inline bool is_a_AssignmentOp(AssignmentOp op) {
25 return (op == setto || op == addto || op == rmfrom);
26}
27
28// solver and problem
29template <typename Scalar>
31
32template <typename Scalar>
34
35template <typename Scalar>
36class SolverFDDPTpl;
37
38template <typename Scalar>
40
41#ifdef CROCODDYL_WITH_ODYN
42template <typename Scalar>
44#endif
45
46template <typename Scalar>
48
49template <typename Scalar>
50class SolverKKTTpl;
51
52template <typename Scalar>
53class BoxQPTpl;
54
55template <typename Scalar>
57
58#ifdef CROCODDYL_WITH_IPOPT
59class SolverIpopt;
60
61template <typename Scalar>
63
64template <typename Scalar>
66#endif
67
68template <typename Scalar>
70
71template <typename Scalar>
73
74// action
75template <typename Scalar>
77
78template <typename Scalar>
80
81template <typename Scalar>
83template <typename Scalar>
85
86template <typename Scalar>
88template <typename Scalar>
90
91// differential action
92template <typename Scalar>
94template <typename Scalar>
96
97template <typename Scalar>
99template <typename Scalar>
101
102// integrated action
103template <typename Scalar>
105template <typename Scalar>
107
108template <typename Scalar>
110template <typename Scalar>
112
113template <typename Scalar>
115template <typename Scalar>
117
118// residual
119template <typename Scalar>
121template <typename Scalar>
123
124// task
125template <typename Scalar>
127template <typename Scalar>
129
130template <typename Scalar>
132template <typename Scalar>
134template <typename Scalar>
136template <typename Scalar>
138template <typename Scalar>
140template <typename Scalar>
142template <typename Scalar>
144
145// activation
146template <typename Scalar>
148template <typename Scalar>
150template <typename Scalar>
152
153template <typename Scalar>
155
156template <typename Scalar>
158
159template <typename Scalar>
161template <typename Scalar>
163
164template <typename Scalar>
166template <typename Scalar>
168
169template <typename Scalar>
171template <typename Scalar>
173
174template <typename Scalar>
176template <typename Scalar>
178
179template <typename Scalar>
181template <typename Scalar>
183
184template <typename Scalar>
186template <typename Scalar>
188
189template <typename Scalar>
191template <typename Scalar>
193
194template <typename Scalar>
196template <typename Scalar>
198
199// state
200template <typename Scalar>
202
203template <typename Scalar>
204class StateVectorTpl;
205
206// control
207template <typename Scalar>
209template <typename Scalar>
211
212template <typename Scalar>
214
215template <typename Scalar>
217template <typename Scalar>
219
220template <typename Scalar>
222template <typename Scalar>
224
225// actuation
226template <typename Scalar>
228template <typename Scalar>
230
231template <typename Scalar>
233template <typename Scalar>
235
236// squashing
237template <typename Scalar>
239template <typename Scalar>
241
242template <typename Scalar>
244
245// joint
246template <typename Scalar>
248
249// data collector
250template <typename Scalar>
252
253template <typename Scalar>
255
256template <typename Scalar>
258
259template <typename Scalar>
261
262// residual
263template <typename Scalar>
265template <typename Scalar>
267
268template <typename Scalar>
270template <typename Scalar>
272
273template <typename Scalar>
275template <typename Scalar>
277
278template <typename Scalar>
280template <typename Scalar>
282
283template <typename Scalar>
285template <typename Scalar>
287
288// cost
289template <typename Scalar>
291template <typename Scalar>
293
294template <typename Scalar>
295struct CostItemTpl;
296template <typename Scalar>
297class CostModelSumTpl;
298template <typename Scalar>
299struct CostDataSumTpl;
300
301template <typename Scalar>
303template <typename Scalar>
305
306// constraint
307template <typename Scalar>
309template <typename Scalar>
311
312template <typename Scalar>
314template <typename Scalar>
316template <typename Scalar>
318
319template <typename Scalar>
321template <typename Scalar>
323
324// Numdiff
325template <typename Scalar>
327template <typename Scalar>
329
330template <typename Scalar>
332template <typename Scalar>
334
335template <typename Scalar>
337template <typename Scalar>
339
340template <typename Scalar>
342template <typename Scalar>
344
345template <typename Scalar>
347template <typename Scalar>
349
350template <typename Scalar>
352template <typename Scalar>
354
355template <typename Scalar>
356class StateNumDiffTpl;
357
358template <typename Scalar>
360template <typename Scalar>
362
363template <typename Scalar>
365template <typename Scalar>
367
368template <typename Scalar>
370
371template <typename Scalar>
373
374/********************Template Instantiation*************/
375typedef ShootingProblemTpl<double> ShootingProblem;
376typedef SolverAbstractTpl<double> SolverAbstract;
377typedef SolverFDDPTpl<double> SolverFDDP;
378typedef SolverIntroTpl<double> SolverIntro;
379#ifdef CROCODDYL_WITH_ODYN
380typedef SolverOdynSQPTpl<double> SolverOdynSQP;
381#endif
382typedef SolverBoxFDDPTpl<double> SolverBoxFDDP;
383typedef SolverKKTTpl<double> SolverKKT;
384typedef BoxQPTpl<double> BoxQP;
385typedef BoxQPSolutionTpl<double> BoxQPSolution;
386typedef CallbackAbstractTpl<double> CallbackAbstract;
387typedef CallbackVerboseTpl<double> CallbackVerbose;
388
389#ifdef CROCODDYL_WITH_IPOPT
390typedef IpoptInterfaceTpl<double> IpoptInterface;
391typedef IpoptInterfaceDataTpl<double> IpoptInterfaceData;
392#endif
393
394typedef ActionModelAbstractTpl<double> ActionModelAbstract;
395typedef ActionDataAbstractTpl<double> ActionDataAbstract;
396typedef ActionModelUnicycleTpl<double> ActionModelUnicycle;
397typedef ActionDataUnicycleTpl<double> ActionDataUnicycle;
398typedef ActionModelLQRTpl<double> ActionModelLQR;
399typedef ActionDataLQRTpl<double> ActionDataLQR;
400
402 DifferentialActionModelAbstract;
404 DifferentialActionDataAbstract;
405typedef DifferentialActionModelLQRTpl<double> DifferentialActionModelLQR;
406typedef DifferentialActionDataLQRTpl<double> DifferentialActionDataLQR;
407
408typedef IntegratedActionModelAbstractTpl<double> IntegratedActionModelAbstract;
409typedef IntegratedActionDataAbstractTpl<double> IntegratedActionDataAbstract;
410typedef IntegratedActionModelEulerTpl<double> IntegratedActionModelEuler;
411typedef IntegratedActionDataEulerTpl<double> IntegratedActionDataEuler;
412typedef IntegratedActionModelRKTpl<double> IntegratedActionModelRK;
413typedef IntegratedActionDataRKTpl<double> IntegratedActionDataRK;
414
415typedef ResidualModelAbstractTpl<double> ResidualModelAbstract;
416typedef ResidualDataAbstractTpl<double> ResidualDataAbstract;
417typedef ResidualModelControlTpl<double> ResidualModelControl;
418typedef ResidualDataControlTpl<double> ResidualDataControl;
419typedef ResidualModelJointEffortTpl<double> ResidualModelJointEffort;
420typedef ResidualDataJointEffortTpl<double> ResidualDataJointEffort;
422 ResidualModelJointAcceleration;
423typedef ResidualDataJointAccelerationTpl<double> ResidualDataJointAcceleration;
424typedef ResidualModelTaskFirstOrderTpl<double> ResidualModelTaskFirstOrder;
425typedef ResidualDataTaskFirstOrderTpl<double> ResidualDataTaskFirstOrder;
426typedef ResidualModelTaskSecondOrderTpl<double> ResidualModelTaskSecondOrder;
427typedef ResidualDataTaskSecondOrderTpl<double> ResidualDataTaskSecondOrder;
428
429typedef TaskModelAbstractTpl<double> TaskModelAbstract;
430typedef TaskDataAbstractTpl<double> TaskDataAbstract;
431
432typedef GuidanceModelAbstractTpl<double> GuidanceModelAbstract;
433typedef GuidanceDataAbstractTpl<double> GuidanceDataAbstract;
434typedef GuidanceModelLinearTpl<double> GuidanceModelLinear;
435typedef GuidanceModelSmoothSaturationTpl<double> GuidanceModelSmoothSaturation;
436typedef GuidanceDataSmoothSaturationTpl<double> GuidanceDataSmoothSaturation;
438 GuidanceModelComponentwiseSaturation;
440 GuidanceDataComponentwiseSaturation;
441
443 ActivationDataQuadraticBarrier;
445 ActivationModelQuadraticBarrier;
446typedef ActivationBoundsTpl<double> ActivationBounds;
448 ActivationModelWeightedQuadraticBarrier;
449typedef ActivationModelQuadTpl<double> ActivationModelQuad;
450typedef ActivationModelQuadFlatExpTpl<double> ActivationModelQuadFlatExp;
451typedef ActivationDataQuadFlatExpTpl<double> ActivationDataQuadFlatExp;
452typedef ActivationModelQuadFlatLogTpl<double> ActivationModelQuadFlatLog;
453typedef ActivationDataQuadFlatLogTpl<double> ActivationDataQuadFlatLog;
454typedef ActivationModelWeightedQuadTpl<double> ActivationModelWeightedQuad;
455typedef ActivationDataWeightedQuadTpl<double> ActivationDataWeightedQuad;
456DEPRECATED(
457 "Use ActivationModelSmooth1Norm",
458 typedef ActivationModelSmooth1NormTpl<double> ActivationModelSmoothAbs;)
459DEPRECATED(
460 "Use ActivationDataSmooth1Norm",
461 typedef ActivationDataSmooth1NormTpl<double> ActivationDataSmoothAbs;)
462typedef ActivationModelSmooth1NormTpl<double> ActivationModelSmooth1Norm;
463typedef ActivationDataSmooth1NormTpl<double> ActivationDataSmooth1Norm;
465 ActivationModelWeightedSmooth1Norm;
467 ActivationDataWeightedSmooth1Norm;
468typedef ActivationModelSmooth2NormTpl<double> ActivationModelSmooth2Norm;
469typedef ActivationDataSmooth2NormTpl<double> ActivationDataSmooth2Norm;
470typedef ActivationModel2NormBarrierTpl<double> ActivationModel2NormBarrier;
471typedef ActivationData2NormBarrierTpl<double> ActivationData2NormBarrier;
472typedef ActivationModelAbstractTpl<double> ActivationModelAbstract;
473typedef ActivationDataAbstractTpl<double> ActivationDataAbstract;
474
475typedef StateAbstractTpl<double> StateAbstract;
476typedef StateVectorTpl<double> StateVector;
477
479 ControlParametrizationModelAbstract;
481 ControlParametrizationDataAbstract;
483 ControlParametrizationModelPolyZero;
485 ControlParametrizationModelPolyOne;
487 ControlParametrizationDataPolyOne;
489 ControlParametrizationModelPolyTwoRK;
491 ControlParametrizationDataPolyTwoRK;
492
493typedef ActuationDataAbstractTpl<double> ActuationDataAbstract;
494typedef ActuationModelAbstractTpl<double> ActuationModelAbstract;
495typedef ActuationSquashingDataTpl<double> ActuationSquashingData;
496typedef ActuationSquashingModelTpl<double> ActuationSquashingModel;
497
498typedef SquashingDataAbstractTpl<double> SquashingDataAbstract;
499typedef SquashingModelAbstractTpl<double> SquashingModelAbstract;
500typedef SquashingModelSmoothSatTpl<double> SquashingModelSmoothSat;
501
502typedef JointDataAbstractTpl<double> JointDataAbstract;
503
504typedef DataCollectorAbstractTpl<double> DataCollectorAbstract;
505typedef DataCollectorActuationTpl<double> DataCollectorActuation;
506typedef DataCollectorJointTpl<double> DataCollectorJoint;
507typedef DataCollectorJointActuationTpl<double> DataCollectorJointActuation;
508
509typedef CostModelAbstractTpl<double> CostModelAbstract;
510typedef CostDataAbstractTpl<double> CostDataAbstract;
511typedef CostItemTpl<double> CostItem;
512typedef CostModelSumTpl<double> CostModelSum;
513typedef CostDataSumTpl<double> CostDataSum;
514typedef CostModelResidualTpl<double> CostModelResidual;
515typedef CostDataResidualTpl<double> CostDataResidual;
516
517typedef ConstraintModelAbstractTpl<double> ConstraintModelAbstract;
518typedef ConstraintDataAbstractTpl<double> ConstraintDataAbstract;
519typedef ConstraintItemTpl<double> ConstraintItem;
520typedef ConstraintModelManagerTpl<double> ConstraintModelManager;
521typedef ConstraintDataManagerTpl<double> ConstraintDataManager;
522typedef ConstraintModelResidualTpl<double> ConstraintModelResidual;
523typedef ConstraintDataResidualTpl<double> ConstraintDataResidual;
524
525typedef ActionModelNumDiffTpl<double> ActionModelNumDiff;
526typedef ActionDataNumDiffTpl<double> ActionDataNumDiff;
528 ControlParametrizationModelNumDiff;
530 ControlParametrizationDataNumDiff;
532 DifferentialActionModelNumDiff;
533typedef ActuationModelNumDiffTpl<double> ActuationModelNumDiff;
534typedef ActuationDataNumDiffTpl<double> ActuationDataNumDiff;
535typedef DifferentialActionDataNumDiffTpl<double> DifferentialActionDataNumDiff;
536typedef ActivationModelNumDiffTpl<double> ActivationModelNumDiff;
537typedef ActivationDataNumDiffTpl<double> ActivationDataNumDiff;
538typedef ResidualModelNumDiffTpl<double> ResidualModelNumDiff;
539typedef ResidualDataNumDiffTpl<double> ResidualDataNumDiff;
540typedef ConstraintModelNumDiffTpl<double> ConstraintModelNumDiff;
541typedef ConstraintDataNumDiffTpl<double> ConstraintDataNumDiff;
542typedef StateNumDiffTpl<double> StateNumDiff;
543typedef ActuationModelNumDiffTpl<double> ActuationModelNumDiff;
544typedef ActuationDataNumDiffTpl<double> ActuationDataNumDiff;
545
546typedef ActionModelCodeGenTpl<double> ActionModelCodeGen;
547typedef ActionDataCodeGenTpl<double> ActionDataCodeGen;
548
549} // namespace crocoddyl
550
551#endif // CROCODDYL_CORE_FWD_HPP_
Abstract class for action model.
Linear-quadratic regulator (LQR) action model.
Definition lqr.hpp:45
This class computes the numerical differentiation of an action model.
Definition action.hpp:44
Abstract class for the actuation-mapping model.
This class computes the numerical differentiation of an actuation model.
Definition actuation.hpp:31
This class implements a Box QP solver based on a Projected Newton method.
Definition box-qp.hpp:103
Abstract class for solver callbacks.
Abstract class for constraint models.
Manage the individual constraint models.
This class computes the numerical differentiation of a constraint model.
Residual-based constraint.
Definition residual.hpp:47
Abstract class for the control trajectory parametrization.
A polynomial function of time of degree one, that is a linear function.
Definition poly-one.hpp:42
A polynomial function of time of degree two, that is a quadratic function.
A polynomial function of time of degree zero, that is a constant.
Definition poly-zero.hpp:37
Abstract class for cost models.
Definition cost-base.hpp:64
Residual-based cost.
Definition residual.hpp:39
Summation of individual cost models.
Definition cost-sum.hpp:75
Abstract class for differential action model.
Linear-quadratic regulator (LQR) differential action model.
Definition diff-lqr.hpp:46
This class computes the numerical differentiation of a differential action model.
Differentiable mapping from a task error to a desired task rate.
Independently bounded guidance model for heterogeneous task channels.
Linear converging guidance model.
Definition linear.hpp:26
Direction-preserving, smoothly bounded guidance model.
Abstract class for an integrated action model.
Symplectic Euler integrator.
Definition euler.hpp:38
Standard RK integrator.
Definition rk.hpp:40
Class for interfacing a crocoddyl::ShootingProblem with IPOPT.
Abstract class for residual models.
Define a control residual.
Definition control.hpp:35
Define a joint-acceleration residual.
Define a joint-effort residual.
This class computes the numerical differentiation of a residual model.
Definition residual.hpp:29
First-order task residual for a generic task and guidance model.
Second-order task residual for a generic task and guidance model.
This class encapsulates a shooting problem.
Definition shooting.hpp:32
Abstract class for optimal control solvers.
Feasibility-driven Differential Dynamic Programming (FDDP) solver.
Definition fddp.hpp:70
Ipopt solver.
Definition ipopt.hpp:30
Odyn-based Sequential Quadratic Programming (SQP) solver.
Definition odyn-sqp.hpp:38
Abstract class for the state representation.
Abstract task model for convergence residuals.
Definition task-base.hpp:47
Box QP solution.
Definition box-qp.hpp:27
Preallocated values and derivatives produced by a guidance model.
Cached values for the componentwise saturation guidance model.
Cached values for the smooth saturation guidance model.
Data for the first-order task residual.
Data for the second-order task residual.
Preallocated values and derivatives produced by a task model.