Skip to content

Commit

Permalink
use std::abs instead of fabs
Browse files Browse the repository at this point in the history
  • Loading branch information
saikishor committed Jan 16, 2024
1 parent c00e1fe commit e2bf4ce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions joint_limits/include/joint_limits/joint_limits_urdf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,12 @@ inline bool getJointLimits(urdf::JointConstSharedPtr urdf_joint, JointLimits & l
}

limits.has_velocity_limits = true;
limits.max_velocity = fabs(urdf_joint->limits->velocity);
limits.max_velocity = std::abs(urdf_joint->limits->velocity);

limits.has_acceleration_limits = false;

limits.has_effort_limits = true;
limits.max_effort = fabs(urdf_joint->limits->effort);
limits.max_effort = std::abs(urdf_joint->limits->effort);

return true;
}
Expand Down

0 comments on commit e2bf4ce

Please sign in to comment.