Skip to content

Commit

Permalink
fix read_state_from_hardware()
Browse files Browse the repository at this point in the history
  • Loading branch information
tpoignonec committed Oct 30, 2023
1 parent 7dfdcaa commit a05726f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions admittance_controller/src/admittance_controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -491,13 +491,13 @@ void AdmittanceController::read_state_from_hardware(
state_interfaces_[pos_ind * num_joints_ + joint_ind].get_value();
nan_position |= std::isnan(state_current.positions[joint_ind]);
}
else if (has_velocity_state_interface_)
if (has_velocity_state_interface_)
{
state_current.velocities[joint_ind] =
state_interfaces_[vel_ind * num_joints_ + joint_ind].get_value();
nan_velocity |= std::isnan(state_current.velocities[joint_ind]);
}
else if (has_acceleration_state_interface_)
if (has_acceleration_state_interface_)
{
state_current.accelerations[joint_ind] =
state_interfaces_[acc_ind * num_joints_ + joint_ind].get_value();
Expand Down

0 comments on commit a05726f

Please sign in to comment.