Directory: | ./ |
---|---|
File: | bindings/python/crocoddyl/core/solvers/box-fddp.cpp |
Date: | 2025-02-24 23:41:29 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 10 | 10 | 100.0% |
Branches: | 5 | 10 | 50.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | /////////////////////////////////////////////////////////////////////////////// | ||
2 | // BSD 3-Clause License | ||
3 | // | ||
4 | // Copyright (C) 2019-2025, University of Edinburgh, Heriot-Watt University | ||
5 | // Copyright note valid unless otherwise stated in individual files. | ||
6 | // All rights reserved. | ||
7 | /////////////////////////////////////////////////////////////////////////////// | ||
8 | |||
9 | #include "crocoddyl/core/solvers/box-fddp.hpp" | ||
10 | |||
11 | #include "python/crocoddyl/core/core.hpp" | ||
12 | #include "python/crocoddyl/utils/copyable.hpp" | ||
13 | |||
14 | namespace crocoddyl { | ||
15 | namespace python { | ||
16 | |||
17 | 10 | void exposeSolverBoxFDDP() { | |
18 | 10 | bp::register_ptr_to_python<std::shared_ptr<SolverBoxFDDP> >(); | |
19 | |||
20 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | bp::class_<SolverBoxFDDP, bp::bases<SolverFDDP> >( |
21 | "SolverBoxFDDP", | ||
22 | "Box-constrained FDDP solver.\n\n" | ||
23 | ":param shootingProblem: shooting problem (list of action models along " | ||
24 | "trajectory.)", | ||
25 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | bp::init<std::shared_ptr<ShootingProblem> >( |
26 | 20 | bp::args("self", "problem"), | |
27 | "Initialize the vector dimension.\n\n" | ||
28 | ":param problem: shooting problem.")) | ||
29 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | .add_property( |
30 | "Quu_inv", | ||
31 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | make_function( |
32 | &SolverBoxFDDP::get_Quu_inv, | ||
33 | 10 | bp::return_value_policy<bp::reference_existing_object>()), | |
34 | "inverse of the Quu computed by the box QP") | ||
35 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | .def(CopyableVisitor<SolverBoxFDDP>()); |
36 | 10 | } | |
37 | |||
38 | } // namespace python | ||
39 | } // namespace crocoddyl | ||
40 |