def set_position(self, position, height=None):
        """
        Set this object to a place, the default value is the regular height for red car
        :param position: 2d array or list
        :param height: give a fixed height
        """
        assert len(position) == 2 or len(position) == 3
        if len(position) == 3:
            height = position[-1]
            position = position[:-1]
        else:
            if height is None:
                height = self.origin.getPos()[-1]
        self.origin.setPos(panda_vector(position, height))

        Set this object to a place, the default value is the regular height for red car
        :param position: 2d array or list
        :param height: give a fixed height
        
metadrive/base_class/base_object.py