(self, name, object_type)
return obj_id
Returns the integer ID of a specified MuJoCo object.

    Args:
      name: String specifying the name of the object to query.
      object_type: The type of the object. Can be either a lowercase string
        (e.g. 'body', 'geom') or an `mjtObj` enum value.

    Returns:
      An integer object ID.

    Raises:
      Error: If `object_type` is not a valid MuJoCo object type, or if no object
        with the corresponding name and type was found.
Returns the integer ID of a specified MuJoCo object.
Returns the integer ID of a specified MuJoCo object .
def name2id(self, name, object_type):
    """Returns the integer ID of a specified MuJoCo object.

    Args:
      name: String specifying the name of the object to query.
      object_type: The type of the object. Can be either a lowercase string
        (e.g. 'body', 'geom') or an `mjtObj` enum value.

    Returns:
      An integer object ID.

    Raises:
      Error: If `object_type` is not a valid MuJoCo object type, or if no object
        with the corresponding name and type was found.
    """
    if not isinstance(object_type, int):
      object_type = _str2type(object_type)
    obj_id = mjlib.mj_name2id(
        self.ptr, object_type, util.to_binary_string(name))
    if obj_id == -1:
      raise Error("Object of type {!r} with name {!r} does not exist.".format(
          _type2str(object_type), name))
    return obj_id
def name2id ( self , name , object_type ) : if not isinstance ( object_type , int ) : object_type = _str2type ( object_type ) obj_id = mjlib . mj_name2id ( self . ptr , object_type , util . to_binary_string ( name ) ) if obj_id == - 1 : raise Error ( "Object of type {!r} with name {!r} does not exist." . format ( _type2str ( object_type ) , name ) ) return obj_id