From 563465d92325d7005085b0417e85678eadaec2f4 Mon Sep 17 00:00:00 2001 From: Thore Goll Date: Wed, 21 Jul 2021 11:23:05 +0200 Subject: [PATCH] FIX: Account for finger joints in assert With a panda hand, the joints list actually holds 9 elements. --- franka_gazebo/src/franka_hw_sim.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/franka_gazebo/src/franka_hw_sim.cpp b/franka_gazebo/src/franka_hw_sim.cpp index ef7b8343..b2bf8316 100644 --- a/franka_gazebo/src/franka_hw_sim.cpp +++ b/franka_gazebo/src/franka_hw_sim.cpp @@ -450,8 +450,8 @@ void FrankaHWSim::updateRobotStateDynamics() { } void FrankaHWSim::updateRobotState(ros::Time time) { - // This is ensured, because a FrankaStateInterface checks exactly for seven joints in the URDF - assert(this->joints_.size() == 7); + // This is ensured, because a FrankaStateInterface checks for at least seven joints in the URDF + assert(this->joints_.size() >= 7); for (int i = 0; i < 7; i++) { std::string name = this->arm_id_ + "_joint" + std::to_string(i + 1);