Skip to content

Commit

Permalink
stop on nan in generic system
Browse files Browse the repository at this point in the history
  • Loading branch information
mamueluth committed Jun 3, 2024
1 parent a18bbc2 commit cbe0340
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions hardware_interface/src/mock_components/generic_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,11 @@ return_type GenericSystem::read(const rclcpp::Time & /*time*/, const rclcpp::Dur
joint_states_[ACCELERATION_INTERFACE_INDEX][j] =
(joint_states_[VELOCITY_INTERFACE_INDEX][j] - old_velocity) / period.seconds();
}
else
{
joint_states_[VELOCITY_INTERFACE_INDEX][j] = 0.0;
joint_states_[ACCELERATION_INTERFACE_INDEX][j] = 0.0;
}
break;
}
case POSITION_INTERFACE_INDEX:
Expand Down

0 comments on commit cbe0340

Please sign in to comment.