Directory: | ./ |
---|---|
File: | bindings/python/crocoddyl/core/solvers/box-fddp.cpp |
Date: | 2025-01-16 08:47:40 |
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-2023, 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<boost::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<boost::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("Quu_inv", |
30 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | make_function(&SolverBoxFDDP::get_Quu_inv, |
31 | 10 | bp::return_internal_reference<>()), | |
32 | "inverse of the Quu computed by the box QP") | ||
33 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | .def(CopyableVisitor<SolverBoxFDDP>()); |
34 | 10 | } | |
35 | |||
36 | } // namespace python | ||
37 | } // namespace crocoddyl | ||
38 |