Skip to content
Snippets Groups Projects

c++ implementation and bidings of the frame placement cost + unit-tests

Merged Carlos Mastalli requested to merge cmastall/crocoddyl:topic/cpp-cost-frame into cpp_devel
13 files
+ 356
125
Compare changes
  • Side-by-side
  • Inline
Files
13
@@ -18,41 +18,37 @@ namespace bp = boost::python;
void exposeCostControl() {
bp::class_<CostModelControl, bp::bases<CostModelAbstract> >(
"CostModelControl", bp::init<pinocchio::Model*, ActivationModelAbstract*, Eigen::VectorXd, int>(
bp::args(" self", " model", " activation=crocoddyl.ActivationModelQuad(nu)",
" uref=np.zero(nu)", " nu=model.nv"),
"CostModelControl", bp::init<pinocchio::Model*, ActivationModelAbstract*, Eigen::VectorXd>(
bp::args(" self", " model", " activation", " uref"),
"Initialize the control cost model.\n\n"
":param model: Pinocchio model of the multibody system\n"
":param activation: activation model\n"
":param uref: reference control\n"
":param nu: dimension of control vector")[bp::with_custodian_and_ward<1, 3>()])
.def(bp::init<pinocchio::Model*, Eigen::VectorXd, int>(
bp::args(" self", " model", " uref", " nu"),
":param uref: reference control")[bp::with_custodian_and_ward<1, 3>()])
.def(bp::init<pinocchio::Model*, ActivationModelAbstract*>(
bp::args(" self", " model", " activation"),
"Initialize the control cost model.\n\n"
"For this case the default activation model is quadratic, i.e. crocoddyl.ActivationModelQuad(nu).\n"
"For this case the default uref is the zeros state, i.e. np.zero(nu), where nu is equals to activation.nr.\n"
":param model: Pinocchio model of the multibody system\n"
":param uref: reference control\n"
":param nu: dimension of control vector")[bp::with_custodian_and_ward<1, 2>()])
.def(bp::init<pinocchio::Model*, ActivationModelAbstract*, Eigen::VectorXd>(
bp::args(" self", " model", " activation", " uref"),
":param activation: activation model")[bp::with_custodian_and_ward<1, 3>()])
.def(bp::init<pinocchio::Model*, ActivationModelAbstract*, int>(
bp::args(" self", " model", " activation", " nu"),
"Initialize the control cost model.\n\n"
"For this case the default nu values is model.nv.\n"
"For this case the default uref is the zeros state, i.e. np.zero(nu).\n"
":param model: Pinocchio model of the multibody system\n"
":param activation: activation model\n"
":param uref: reference control")[bp::with_custodian_and_ward<1, 3>()])
":param nu: dimension of control vector")[bp::with_custodian_and_ward<1, 3>()])
.def(bp::init<pinocchio::Model*, Eigen::VectorXd>(
bp::args(" self", " model", " uref"),
"Initialize the control cost model.\n\n"
"For this case the default activation model is quadratic, i.e. crocoddyl.ActivationModelQuad(uref.size()).\n"
":param model: Pinocchio model of the multibody system\n"
":param uref: reference control")[bp::with_custodian_and_ward<1, 2>()])
.def(bp::init<pinocchio::Model*, ActivationModelAbstract*, int>(
bp::args(" self", " model", " activation", " nu"),
.def(bp::init<pinocchio::Model*>(
bp::args(" self", " model"),
"Initialize the control cost model.\n\n"
"For this case the default uref is the zeros state, i.e. np.zero(nu).\n"
":param model: Pinocchio model of the multibody system\n"
":param activation: activation model\n"
":param nu: dimension of control vector")[bp::with_custodian_and_ward<1, 3>()])
"For this case the default uref is the zeros vector, i.e. np.zero(model.nv), and\n"
"activation is quadratic, i.e. crocoddyl.ActivationModelQuad(model.nv), and nu is equals to model.nv.\n"
":param model: Pinocchio model of the multibody system")[bp::with_custodian_and_ward<1, 2>()])
.def(bp::init<pinocchio::Model*, int>(
bp::args(" self", " model", " nu"),
"Initialize the control cost model.\n\n"
@@ -60,18 +56,6 @@ void exposeCostControl() {
"model is quadratic, i.e. crocoddyl.ActivationModelQuad(nu)\n"
":param model: Pinocchio model of the multibody system\n"
":param nu: dimension of control vector")[bp::with_custodian_and_ward<1, 2>()])
.def(bp::init<pinocchio::Model*, ActivationModelAbstract*>(
bp::args(" self", " model", " activation"),
"Initialize the control cost model.\n\n"
"For this case the default uref is the zeros vector and nu is equals to model.nv.\n"
":param model: Pinocchio model of the multibody system\n"
":param activation: activation model")[bp::with_custodian_and_ward<1, 3>()])
.def(bp::init<pinocchio::Model*>(
bp::args(" self", " model"),
"Initialize the control cost model.\n\n"
"For this case the default uref is the zeros vector, i.e. np.zero(model.nv), and\n"
"activation is quadratic, i.e. crocoddyl.ActivationModelQuad(model.nv), and nu is equals to model.nv.\n"
":param model: Pinocchio model of the multibody system")[bp::with_custodian_and_ward<1, 2>()])
.def<void (CostModelControl::*)(boost::shared_ptr<CostDataAbstract>&, const Eigen::VectorXd&,
const Eigen::VectorXd&)>("calc", &CostModelControl::calc_wrap,
bp::args(" self", " data", " x", " u=None"),
Loading