Skip to content

Commit

Permalink
[actuation] exception if nu is smaller than 0 only
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergim96 authored and cmastalli committed Nov 29, 2023
1 parent 20efc30 commit 6718c17
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions include/crocoddyl/core/actuation-base.hxx
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 @@ -16,9 +17,9 @@ template <typename Scalar>
ActuationModelAbstractTpl<Scalar>::ActuationModelAbstractTpl(
boost::shared_ptr<StateAbstract> state, const std::size_t nu)
: nu_(nu), state_(state) {
if (nu_ == 0) {
if (nu_ < 0) {
throw_pretty("Invalid argument: "
<< "nu cannot be zero");
<< "nu cannot be smaller than zero");
}
}

Expand Down

0 comments on commit 6718c17

Please sign in to comment.