From 3554a1f7e4cc25dcf305ef5e17ea10e3467b5990 Mon Sep 17 00:00:00 2001 From: Carlos Mastalli <carlos.mastalli@laas.fr> Date: Tue, 19 Feb 2019 10:14:19 +0100 Subject: [PATCH] [action] Created costResidual is ncost > 1 in DAMDataAbstract --- crocoddyl/differential_action.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crocoddyl/differential_action.py b/crocoddyl/differential_action.py index e723339c..d95fe56b 100644 --- a/crocoddyl/differential_action.py +++ b/crocoddyl/differential_action.py @@ -86,7 +86,8 @@ class DifferentialActionDataAbstract: self.Luu = np.zeros([nu,nu]) else: self.costs = costData - self.costResiduals = self.costs.residuals + if model.ncost > 1: + self.costResiduals = self.costs.residuals self.Lx = self.costs.Lx self.Lu = self.costs.Lu self.Lxx = self.costs.Lxx -- GitLab