(self, model)
Construct a new MjData instance.

    Args:
      model: An MjModel instance.
Construct a new MjData instance.
Construct a new MjData instance .
def __init__(self, model):
    """Construct a new MjData instance.

    Args:
      model: An MjModel instance.
    """
    self._model = model

    # Allocate resources for mjData.
    data_ptr = mjlib.mj_makeData(model.ptr)

    # Free resources when the ctypes pointer is garbage collected.
    _create_finalizer(data_ptr, mjlib.mj_deleteData)

    super().__init__(data_ptr, model)
def __init__ ( self , model ) : self . _model = model # Allocate resources for mjData. data_ptr = mjlib . mj_makeData ( model . ptr ) # Free resources when the ctypes pointer is garbage collected. _create_finalizer ( data_ptr , mjlib . mj_deleteData ) super ( ) . __init__ ( data_ptr , model )