From a9a4d51b6b169af55989e543d6cf56d092353411 Mon Sep 17 00:00:00 2001 From: Thomas Denewiler Date: Wed, 4 Mar 2020 19:35:58 -0800 Subject: [PATCH] Fixing initialization of linear velocity output commands in simple car and unicycle models. --- .../include/mpc_local_planner/systems/simple_car.h | 2 +- .../include/mpc_local_planner/systems/unicycle_robot.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mpc_local_planner/include/mpc_local_planner/systems/simple_car.h b/mpc_local_planner/include/mpc_local_planner/systems/simple_car.h index db2f720..83f0ba8 100644 --- a/mpc_local_planner/include/mpc_local_planner/systems/simple_car.h +++ b/mpc_local_planner/include/mpc_local_planner/systems/simple_car.h @@ -81,7 +81,7 @@ class SimpleCarModel : public BaseRobotSE2 { assert(u.size() == getInputDimension()); twist.linear.x = u[0]; - twist.linear.y = twist.linear.y = 0; + twist.linear.y = twist.linear.z = 0; twist.angular.z = u[1]; // warning, this is the angle and not the angular vel twist.angular.x = twist.angular.y = 0; diff --git a/mpc_local_planner/include/mpc_local_planner/systems/unicycle_robot.h b/mpc_local_planner/include/mpc_local_planner/systems/unicycle_robot.h index f6a2882..7448b61 100644 --- a/mpc_local_planner/include/mpc_local_planner/systems/unicycle_robot.h +++ b/mpc_local_planner/include/mpc_local_planner/systems/unicycle_robot.h @@ -72,7 +72,7 @@ class UnicycleModel : public BaseRobotSE2 { assert(u.size() == getInputDimension()); twist.linear.x = u[0]; - twist.linear.y = twist.linear.y = 0; + twist.linear.y = twist.linear.z = 0; twist.angular.z = u[1]; twist.angular.x = twist.angular.y = 0;