A Control Barrier Function Approach for Maximizing Performance while Fulfilling to ISO/TS 15066 Regulations