(self, namespace,
               immediate_children_only=False, exclude_attachments=False)
return out
Finds all elements of a particular kind.

    The `namespace` argument specifies the kind of element to
    find. In most cases, this corresponds to the element's XML tag name.
    However, if an element has multiple specialized tags, then the namespace
    corresponds to the tag name of the most general element of that kind.
    For example, `namespace='joint'` would search for `<joint>` and
    `<freejoint>`, while `namespace='actuator'` would search for `<general>`,
    `<motor>`, `<position>`, `<velocity>`, and `<cylinder>`.

    Args:
      namespace: A string specifying the namespace being searched. See the
        docstring above for explanation.
      immediate_children_only: (optional) A boolean, if `True` then only
        the immediate children of this element are returned.
      exclude_attachments: (optional) A boolean, if `True` then elements
        belonging to attached models are excluded.

    Returns:
      A list of `mjcf.Element`.

    Raises:
      ValueError: if `namespace` is not a valid namespace.
Finds all elements of a particular kind.
Finds all elements of a particular kind .
def find_all(self, namespace,
               immediate_children_only=False, exclude_attachments=False):
    """Finds all elements of a particular kind.

    The `namespace` argument specifies the kind of element to
    find. In most cases, this corresponds to the element's XML tag name.
    However, if an element has multiple specialized tags, then the namespace
    corresponds to the tag name of the most general element of that kind.
    For example, `namespace='joint'` would search for `<joint>` and
    `<freejoint>`, while `namespace='actuator'` would search for `<general>`,
    `<motor>`, `<position>`, `<velocity>`, and `<cylinder>`.

    Args:
      namespace: A string specifying the namespace being searched. See the
        docstring above for explanation.
      immediate_children_only: (optional) A boolean, if `True` then only
        the immediate children of this element are returned.
      exclude_attachments: (optional) A boolean, if `True` then elements
        belonging to attached models are excluded.

    Returns:
      A list of `mjcf.Element`.

    Raises:
      ValueError: if `namespace` is not a valid namespace.
    """
    if namespace not in schema.FINDABLE_NAMESPACES:
      raise ValueError('{!r} is not a valid namespace. Available: {}'.format(
          namespace, schema.FINDABLE_NAMESPACES))
    out = []
    children = self._children if exclude_attachments else self.all_children()
    for child in children:
      if (namespace == child.spec.namespace or
          # Direct children of attachment frames have custom namespaces of the
          # form "joint@attachment_frame_<id>".
          child.spec.namespace and child.spec.namespace.startswith(
              namespace + constants.NAMESPACE_SEPARATOR) or
          # Attachment frames are considered part of the "body" namespace.
          namespace == constants.BODY and isinstance(child, _AttachmentFrame)):
        out.append(child)
      if not immediate_children_only:
        out.extend(child.find_all(namespace,
                                  exclude_attachments=exclude_attachments))
    return out
def find_all ( self , namespace , immediate_children_only = False , exclude_attachments = False ) : if namespace not in schema . FINDABLE_NAMESPACES : raise ValueError ( '{!r} is not a valid namespace. Available: {}' . format ( namespace , schema . FINDABLE_NAMESPACES ) ) out = [ ] children = self . _children if exclude_attachments else self . all_children ( ) for child in children : if ( namespace == child . spec . namespace or # Direct children of attachment frames have custom namespaces of the # form "joint@attachment_frame_<id>". child . spec . namespace and child . spec . namespace . startswith ( namespace + constants . NAMESPACE_SEPARATOR ) or # Attachment frames are considered part of the "body" namespace. namespace == constants . BODY and isinstance ( child , _AttachmentFrame ) ) : out . append ( child ) if not immediate_children_only : out . extend ( child . find_all ( namespace , exclude_attachments = exclude_attachments ) ) return out