Skip to content

Commit

Permalink
FIX: Account for finger joints in assert
Browse files Browse the repository at this point in the history
With a panda hand, the joints list actually holds 9 elements.
  • Loading branch information
gollth committed Jul 21, 2021
1 parent 24fe172 commit 563465d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions franka_gazebo/src/franka_hw_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 563465d

Please sign in to comment.