def process_inference(self, inference):
    'Ensures safety of the predicted angles.'
    values = [a.item() for a in inference]
    for (idx, value) in enumerate(values):
        name = self.joints[idx]
        limits = self.motion.getLimits(name)
        min_angle = limits[0][0]
        max_angle = limits[0][1]
        max_vel = limits[0][2]
        max_tor = limits[0][3]
        value = self.cap_angle(value, min_angle, max_angle)
        values[idx] = [value]
    return values
Ensures safety of the predicted angles.
def process_inference(self, inference):
    
    values = [a.item() for a in inference]
    for (idx, value) in enumerate(values):
        name = self.joints[idx]
        limits = self.motion.getLimits(name)
        min_angle = limits[0][0]
        max_angle = limits[0][1]
        max_vel = limits[0][2]
        max_tor = limits[0][3]
        value = self.cap_angle(value, min_angle, max_angle)
        values[idx] = [value]
    return values