Skip to content

Commit

Permalink
[python] Included setter for nu + updated changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
cmastalli committed Dec 4, 2023
1 parent 0d723a1 commit 6768144
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

* Added nu, ng, and nh setters for Python bindings in https://github.com/loco-3d/crocoddyl/pull/1192

## [2.0.2] - 2023-11-30

* Added CHANGELOG.md in https://github.com/loco-3d/crocoddyl/pull/1188
Expand Down
2 changes: 2 additions & 0 deletions bindings/python/crocoddyl/core/action-base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ void exposeActionAbstract() {
&ActionModelAbstract_wrap::default_quasiStatic,
bp::args("self", "data", "u", "x", "maxiter", "tol"))
.add_property("nu", bp::make_function(&ActionModelAbstract_wrap::get_nu),
bp::make_setter(&ActionModelAbstract_wrap::nu_,
bp::return_internal_reference<>()),
"dimension of control vector")
.add_property("nr", bp::make_function(&ActionModelAbstract_wrap::get_nr),
"dimension of cost-residual vector")
Expand Down
4 changes: 3 additions & 1 deletion bindings/python/crocoddyl/core/action-base.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2022, LAAS-CNRS, University of Edinburgh
// Copyright (C) 2019-2023, LAAS-CNRS, University of Edinburgh,
// Heriot-Watt University
// Copyright note valid unless otherwise stated in individual files.
// All rights reserved.
///////////////////////////////////////////////////////////////////////////////
Expand All @@ -22,6 +23,7 @@ class ActionModelAbstract_wrap : public ActionModelAbstract,
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
using ActionModelAbstract::ng_;
using ActionModelAbstract::nh_;
using ActionModelAbstract::nu_;

ActionModelAbstract_wrap(boost::shared_ptr<StateAbstract> state,
const std::size_t nu, const std::size_t nr = 1,
Expand Down

0 comments on commit 6768144

Please sign in to comment.