1 |
|
|
/////////////////////////////////////////////////////////////////////////////// |
2 |
|
|
// BSD 3-Clause License |
3 |
|
|
// |
4 |
|
|
// Copyright (C) 2019-2023, 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<boost::shared_ptr<SolverBoxDDP> >(); |
20 |
|
|
|
21 |
✓✗ |
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 |
✓✗ |
10 |
bp::init<boost::shared_ptr<ShootingProblem> >( |
27 |
|
20 |
bp::args("self", "problem"), |
28 |
|
|
"Initialize the vector dimension.\n\n" |
29 |
|
|
":param problem: shooting problem.")) |
30 |
|
|
.add_property("Quu_inv", |
31 |
✓✗ |
10 |
make_function(&SolverBoxDDP::get_Quu_inv, |
32 |
|
10 |
bp::return_internal_reference<>()), |
33 |
✓✗ |
10 |
"inverse of the Quu computed by the box QP") |
34 |
✓✗ |
10 |
.def(CopyableVisitor<SolverBoxDDP>()); |
35 |
|
10 |
} |
36 |
|
|
|
37 |
|
|
} // namespace python |
38 |
|
|
} // namespace crocoddyl |