import math


def get_vehicle_max_steering_angle(vehicle_info):
    """
    Get the maximum steering angle of a carla vehicle

    :param vehicle_info: the vehicle info
    :type vehicle_info: carla_ros_bridge.CarlaEgoVehicleInfo
    :return: maximum steering angle [radians]
    :rtype: float64
    """
    # 70 degrees is the default max steering angle of a car
    max_steering_angle = math.radians(70)
    # get max steering angle (use smallest non-zero value of all wheels)
    for wheel in vehicle_info.wheels:
        if wheel.steer_angle:
            if wheel.steer_angle and wheel.steer_angle < max_steering_angle:
                max_steering_angle = wheel.steer_angle
    return max_steering_angle