Skip to content

Commit

Permalink
hot fix Potential Error in CommandGuard #175
Browse files Browse the repository at this point in the history
  • Loading branch information
mhubii committed May 14, 2024
1 parent 8ed7b0e commit 81406e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lbr_fri_ros2/src/command_guard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ bool CommandGuard::command_in_velocity_limits_(const_idl_command_t_ref lbr_comma
prev_measured_joint_position_ = lbr_state.measured_joint_position;
return true;
}
for (std::size_t i = 0; i < lbr_command.joint_position[i]; ++i) {
for (std::size_t i = 0; i < lbr_command.joint_position.size(); ++i) {
if (std::abs(prev_measured_joint_position_[i] - lbr_state.measured_joint_position[i]) / dt >
parameters_.max_velocities[i]) {
RCLCPP_ERROR_STREAM(rclcpp::get_logger(LOGGER_NAME),
Expand Down

0 comments on commit 81406e6

Please sign in to comment.