Crocoddyl
Loading...
Searching...
No Matches
fwd.hpp
1
2// BSD 3-Clause License
3//
4// Copyright (C) 2019-2025, 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// action
29template <typename Scalar>
31
32template <typename Scalar>
34
35template <typename Scalar>
37template <typename Scalar>
39
40template <typename Scalar>
42template <typename Scalar>
44
45// differential action
46template <typename Scalar>
48template <typename Scalar>
50
51template <typename Scalar>
53template <typename Scalar>
55
56// integrated action
57template <typename Scalar>
59template <typename Scalar>
61
62template <typename Scalar>
64template <typename Scalar>
66
67template <typename Scalar>
69template <typename Scalar>
71
72// residual
73template <typename Scalar>
75template <typename Scalar>
77
78// activation
79template <typename Scalar>
81template <typename Scalar>
83template <typename Scalar>
85
86template <typename Scalar>
88
89template <typename Scalar>
91
92template <typename Scalar>
94template <typename Scalar>
96
97template <typename Scalar>
99template <typename Scalar>
101
102template <typename Scalar>
104template <typename Scalar>
106
107template <typename Scalar>
109template <typename Scalar>
111
112template <typename Scalar>
114template <typename Scalar>
116
117template <typename Scalar>
119template <typename Scalar>
121
122template <typename Scalar>
124template <typename Scalar>
126
127// state
128template <typename Scalar>
130
131template <typename Scalar>
132class StateVectorTpl;
133
134// control
135template <typename Scalar>
137template <typename Scalar>
139
140template <typename Scalar>
142
143template <typename Scalar>
145template <typename Scalar>
147
148template <typename Scalar>
150template <typename Scalar>
152
153// actuation
154template <typename Scalar>
156template <typename Scalar>
158
159template <typename Scalar>
161template <typename Scalar>
163
164// squashing
165template <typename Scalar>
167template <typename Scalar>
169
170template <typename Scalar>
172
173// joint
174template <typename Scalar>
176
177// data collector
178template <typename Scalar>
180
181template <typename Scalar>
183
184template <typename Scalar>
186
187template <typename Scalar>
189
190// residual
191template <typename Scalar>
193template <typename Scalar>
195
196template <typename Scalar>
198template <typename Scalar>
200
201template <typename Scalar>
203template <typename Scalar>
205
206// cost
207template <typename Scalar>
209template <typename Scalar>
211
212template <typename Scalar>
213struct CostItemTpl;
214template <typename Scalar>
215class CostModelSumTpl;
216template <typename Scalar>
217struct CostDataSumTpl;
218
219template <typename Scalar>
221template <typename Scalar>
223
224// constraint
225template <typename Scalar>
227template <typename Scalar>
229
230template <typename Scalar>
232template <typename Scalar>
234template <typename Scalar>
236
237template <typename Scalar>
239template <typename Scalar>
241
242// shooting
243template <typename Scalar>
245
246// Numdiff
247template <typename Scalar>
249template <typename Scalar>
251
252template <typename Scalar>
254template <typename Scalar>
256
257template <typename Scalar>
259template <typename Scalar>
261
262template <typename Scalar>
264template <typename Scalar>
266
267template <typename Scalar>
269template <typename Scalar>
271
272template <typename Scalar>
274template <typename Scalar>
276
277template <typename Scalar>
278class StateNumDiffTpl;
279
280template <typename Scalar>
282template <typename Scalar>
284
285template <typename Scalar>
287template <typename Scalar>
289
290template <typename Scalar>
292
293template <typename Scalar>
295
296/********************Template Instantiation*************/
297typedef ActionModelAbstractTpl<double> ActionModelAbstract;
298typedef ActionDataAbstractTpl<double> ActionDataAbstract;
299typedef ActionModelUnicycleTpl<double> ActionModelUnicycle;
300typedef ActionDataUnicycleTpl<double> ActionDataUnicycle;
301typedef ActionModelLQRTpl<double> ActionModelLQR;
302typedef ActionDataLQRTpl<double> ActionDataLQR;
303
305 DifferentialActionModelAbstract;
307 DifferentialActionDataAbstract;
308typedef DifferentialActionModelLQRTpl<double> DifferentialActionModelLQR;
309typedef DifferentialActionDataLQRTpl<double> DifferentialActionDataLQR;
310
311typedef IntegratedActionModelAbstractTpl<double> IntegratedActionModelAbstract;
312typedef IntegratedActionDataAbstractTpl<double> IntegratedActionDataAbstract;
313typedef IntegratedActionModelEulerTpl<double> IntegratedActionModelEuler;
314typedef IntegratedActionDataEulerTpl<double> IntegratedActionDataEuler;
315typedef IntegratedActionModelRKTpl<double> IntegratedActionModelRK;
316typedef IntegratedActionDataRKTpl<double> IntegratedActionDataRK;
317
318typedef ResidualModelAbstractTpl<double> ResidualModelAbstract;
319typedef ResidualDataAbstractTpl<double> ResidualDataAbstract;
320typedef ResidualModelControlTpl<double> ResidualModelControl;
321typedef ResidualDataControlTpl<double> ResidualDataControl;
322typedef ResidualModelJointEffortTpl<double> ResidualModelJointEffort;
323typedef ResidualDataJointEffortTpl<double> ResidualDataJointEffort;
325 ResidualModelJointAcceleration;
326typedef ResidualDataJointAccelerationTpl<double> ResidualDataJointAcceleration;
327
329 ActivationDataQuadraticBarrier;
331 ActivationModelQuadraticBarrier;
332typedef ActivationBoundsTpl<double> ActivationBounds;
334 ActivationModelWeightedQuadraticBarrier;
335typedef ActivationModelQuadTpl<double> ActivationModelQuad;
336typedef ActivationModelQuadFlatExpTpl<double> ActivationModelQuadFlatExp;
337typedef ActivationDataQuadFlatExpTpl<double> ActivationDataQuadFlatExp;
338typedef ActivationModelQuadFlatLogTpl<double> ActivationModelQuadFlatLog;
339typedef ActivationDataQuadFlatLogTpl<double> ActivationDataQuadFlatLog;
340typedef ActivationModelWeightedQuadTpl<double> ActivationModelWeightedQuad;
341typedef ActivationDataWeightedQuadTpl<double> ActivationDataWeightedQuad;
342DEPRECATED(
343 "Use ActivationModelSmooth1Norm",
344 typedef ActivationModelSmooth1NormTpl<double> ActivationModelSmoothAbs;)
345DEPRECATED(
346 "Use ActivationDataSmooth1Norm",
347 typedef ActivationDataSmooth1NormTpl<double> ActivationDataSmoothAbs;)
348typedef ActivationModelSmooth1NormTpl<double> ActivationModelSmooth1Norm;
349typedef ActivationDataSmooth1NormTpl<double> ActivationDataSmooth1Norm;
350typedef ActivationModelSmooth2NormTpl<double> ActivationModelSmooth2Norm;
351typedef ActivationDataSmooth2NormTpl<double> ActivationDataSmooth2Norm;
352typedef ActivationModel2NormBarrierTpl<double> ActivationModel2NormBarrier;
353typedef ActivationData2NormBarrierTpl<double> ActivationData2NormBarrier;
354typedef ActivationModelAbstractTpl<double> ActivationModelAbstract;
355typedef ActivationDataAbstractTpl<double> ActivationDataAbstract;
356
357typedef StateAbstractTpl<double> StateAbstract;
358typedef StateVectorTpl<double> StateVector;
359
361 ControlParametrizationModelAbstract;
363 ControlParametrizationDataAbstract;
365 ControlParametrizationModelPolyZero;
367 ControlParametrizationModelPolyOne;
369 ControlParametrizationDataPolyOne;
371 ControlParametrizationModelPolyTwoRK;
373 ControlParametrizationDataPolyTwoRK;
374
375typedef ActuationDataAbstractTpl<double> ActuationDataAbstract;
376typedef ActuationModelAbstractTpl<double> ActuationModelAbstract;
377typedef ActuationSquashingDataTpl<double> ActuationSquashingData;
378typedef ActuationSquashingModelTpl<double> ActuationSquashingModel;
379
380typedef SquashingDataAbstractTpl<double> SquashingDataAbstract;
381typedef SquashingModelAbstractTpl<double> SquashingModelAbstract;
382typedef SquashingModelSmoothSatTpl<double> SquashingModelSmoothSat;
383
384typedef JointDataAbstractTpl<double> JointDataAbstract;
385
386typedef DataCollectorAbstractTpl<double> DataCollectorAbstract;
387typedef DataCollectorActuationTpl<double> DataCollectorActuation;
388typedef DataCollectorJointTpl<double> DataCollectorJoint;
389typedef DataCollectorJointActuationTpl<double> DataCollectorJointActuation;
390
391typedef CostModelAbstractTpl<double> CostModelAbstract;
392typedef CostDataAbstractTpl<double> CostDataAbstract;
393typedef CostItemTpl<double> CostItem;
394typedef CostModelSumTpl<double> CostModelSum;
395typedef CostDataSumTpl<double> CostDataSum;
396typedef CostModelResidualTpl<double> CostModelResidual;
397typedef CostDataResidualTpl<double> CostDataResidual;
398
399typedef ConstraintModelAbstractTpl<double> ConstraintModelAbstract;
400typedef ConstraintDataAbstractTpl<double> ConstraintDataAbstract;
401typedef ConstraintItemTpl<double> ConstraintItem;
402typedef ConstraintModelManagerTpl<double> ConstraintModelManager;
403typedef ConstraintDataManagerTpl<double> ConstraintDataManager;
404typedef ConstraintModelResidualTpl<double> ConstraintModelResidual;
405typedef ConstraintDataResidualTpl<double> ConstraintDataResidual;
406
407typedef ShootingProblemTpl<double> ShootingProblem;
408
409typedef ActionModelNumDiffTpl<double> ActionModelNumDiff;
410typedef ActionDataNumDiffTpl<double> ActionDataNumDiff;
412 ControlParametrizationModelNumDiff;
414 ControlParametrizationDataNumDiff;
416 DifferentialActionModelNumDiff;
417typedef ActuationModelNumDiffTpl<double> ActuationModelNumDiff;
418typedef ActuationDataNumDiffTpl<double> ActuationDataNumDiff;
419typedef DifferentialActionDataNumDiffTpl<double> DifferentialActionDataNumDiff;
420typedef ActivationModelNumDiffTpl<double> ActivationModelNumDiff;
421typedef ActivationDataNumDiffTpl<double> ActivationDataNumDiff;
422typedef ResidualModelNumDiffTpl<double> ResidualModelNumDiff;
423typedef ResidualDataNumDiffTpl<double> ResidualDataNumDiff;
424typedef ConstraintModelNumDiffTpl<double> ConstraintModelNumDiff;
425typedef ConstraintDataNumDiffTpl<double> ConstraintDataNumDiff;
426typedef StateNumDiffTpl<double> StateNumDiff;
427typedef ActuationModelNumDiffTpl<double> ActuationModelNumDiff;
428typedef ActuationDataNumDiffTpl<double> ActuationDataNumDiff;
429
430typedef ActionModelCodeGenTpl<double> ActionModelCodeGen;
431typedef ActionDataCodeGenTpl<double> ActionDataCodeGen;
432
433} // namespace crocoddyl
434
435#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
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.
Abstract class for an integrated action model.
Symplectic Euler integrator.
Definition euler.hpp:38
Standard RK integrator.
Definition rk.hpp:40
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
This class encapsulates a shooting problem.
Definition shooting.hpp:32
Abstract class for the state representation.