(self, name='walker', marker_rgba=None, initializer=None)
Build an Ant walker.

    Args:
      name: name of the walker.
      marker_rgba: (Optional) color the ant's front legs with marker_rgba.
      initializer: (Optional) A `WalkerInitializer` object.
Build an Ant walker.
Build an Ant walker .
def _build(self, name='walker', marker_rgba=None, initializer=None):
    """Build an Ant walker.

    Args:
      name: name of the walker.
      marker_rgba: (Optional) color the ant's front legs with marker_rgba.
      initializer: (Optional) A `WalkerInitializer` object.
    """
    super()._build(initializer=initializer)
    self._mjcf_root = mjcf.from_path(os.path.join(_XML_DIRNAME, _XML_FILENAME))
    if name:
      self._mjcf_root.model = name

    # Set corresponding marker color if specified.
    if marker_rgba is not None:
      for geom in self.marker_geoms:
        geom.set_attributes(rgba=marker_rgba)

    # Initialize previous action.
    self._prev_action = np.zeros(shape=self.action_spec.shape,
                                 dtype=self.action_spec.dtype)
def _build ( self , name = 'walker' , marker_rgba = None , initializer = None ) : super ( ) . _build ( initializer = initializer ) self . _mjcf_root = mjcf . from_path ( os . path . join ( _XML_DIRNAME , _XML_FILENAME ) ) if name : self . _mjcf_root . model = name # Set corresponding marker color if specified. if marker_rgba is not None : for geom in self . marker_geoms : geom . set_attributes ( rgba = marker_rgba ) # Initialize previous action. self . _prev_action = np . zeros ( shape = self . action_spec . shape , dtype = self . action_spec . dtype )