| Directory: | ./ |
|---|---|
| File: | bindings/python/crocoddyl/core/solvers/box-ddp.cpp |
| Date: | 2025-03-26 19:23:43 |
| 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, LAAS-CNRS, University of Edinburgh | ||
| 5 | // Heriot-Watt University | ||
| 6 | // Copyright note valid unless otherwise stated in individual files. | ||
| 7 | // All rights reserved. | ||
| 8 | /////////////////////////////////////////////////////////////////////////////// | ||
| 9 | |||
| 10 | #include "crocoddyl/core/solvers/box-ddp.hpp" | ||
| 11 | |||
| 12 | #include "python/crocoddyl/core/core.hpp" | ||
| 13 | #include "python/crocoddyl/utils/copyable.hpp" | ||
| 14 | |||
| 15 | namespace crocoddyl { | ||
| 16 | namespace python { | ||
| 17 | |||
| 18 | 10 | void exposeSolverBoxDDP() { | |
| 19 | 10 | bp::register_ptr_to_python<std::shared_ptr<SolverBoxDDP> >(); | |
| 20 | |||
| 21 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | bp::class_<SolverBoxDDP, bp::bases<SolverDDP> >( |
| 22 | "SolverBoxDDP", | ||
| 23 | "Box-constrained DDP solver.\n\n" | ||
| 24 | ":param shootingProblem: shooting problem (list of action models along " | ||
| 25 | "trajectory.)", | ||
| 26 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | bp::init<std::shared_ptr<ShootingProblem> >( |
| 27 | 20 | bp::args("self", "problem"), | |
| 28 | "Initialize the vector dimension.\n\n" | ||
| 29 | ":param problem: shooting problem.")) | ||
| 30 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | .add_property( |
| 31 | "Quu_inv", | ||
| 32 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | make_function( |
| 33 | &SolverBoxDDP::get_Quu_inv, | ||
| 34 | 10 | bp::return_value_policy<bp::reference_existing_object>()), | |
| 35 | "inverse of the Quu computed by the box QP") | ||
| 36 |
1/2✓ Branch 1 taken 10 times.
✗ Branch 2 not taken.
|
10 | .def(CopyableVisitor<SolverBoxDDP>()); |
| 37 | 10 | } | |
| 38 | |||
| 39 | } // namespace python | ||
| 40 | } // namespace crocoddyl | ||
| 41 |