def driversToConfig(robot,driverConfig):
    """Converts a configuration of the robot's drivers to a configuration of the robot"""
    nd = robot.numDrivers()
    assert nd == len(driverConfig),"Driver configuration does not match robot model, %d vs %d"%(nd,len(driverConfig))
    for i in range(nd):
        d = robot.getDriver(i)
        d.setValue(driverConfig[i])
    return robot.getConfig()