Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed Scalar in cost sum and activation data #1165

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions include/crocoddyl/core/activation-base.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
///////////////////////////////////////////////////////////////////////////////
// BSD 3-Clause License
//
// Copyright (C) 2019-2021, 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 Down Expand Up @@ -78,7 +79,7 @@ struct ActivationDataAbstractTpl {

template <template <typename Scalar> class Activation>
explicit ActivationDataAbstractTpl(Activation<Scalar>* const activation)
: a_value(0.),
: a_value(Scalar(0.)),
Ar(VectorXs::Zero(activation->get_nr())),
Arr(DiagonalMatrixXs(activation->get_nr())) {
Arr.setZero();
Expand Down
6 changes: 3 additions & 3 deletions include/crocoddyl/core/costs/cost-sum.hxx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
///////////////////////////////////////////////////////////////////////////////
// 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 Down Expand Up @@ -106,7 +106,7 @@ void CostModelSumTpl<Scalar>::calc(const boost::shared_ptr<CostDataSum>& data,
throw_pretty("Invalid argument: "
<< "it doesn't match the number of cost datas and models");
}
data->cost = 0.;
data->cost = Scalar(0.);

typename CostModelContainer::iterator it_m, end_m;
typename CostDataContainer::iterator it_d, end_d;
Expand Down Expand Up @@ -138,7 +138,7 @@ void CostModelSumTpl<Scalar>::calc(const boost::shared_ptr<CostDataSum>& data,
throw_pretty("Invalid argument: "
<< "it doesn't match the number of cost datas and models");
}
data->cost = 0.;
data->cost = Scalar(0.);

typename CostModelContainer::iterator it_m, end_m;
typename CostDataContainer::iterator it_d, end_d;
Expand Down