import random


def sample_geom_type(reject=[]):
    """Sample a mujoco geom type (range 3-6 capsule-box)"""

    types = ["plane", "hfield", "sphere", "capsule", "ellipsoid", "cylinder", "box", "mesh"]
    while True:
        samp = random.randrange(3,7)
        rejected = False
        for r in reject:
            if types.index(r) == samp:
                rejected = True
                break
        if rejected:
            continue
        else:
            return samp