(self,
             name=None,
             use_pinch_site_as_tcp=False)
Initializes the JacoHand.

    Args:
      name: String, the name of this robot. Used as a prefix in the MJCF name
        name attributes.
      use_pinch_site_as_tcp: (optional) A boolean, if `True` the pinch site
        will be used as the tool center point. If `False` the grip site is used.
Initializes the JacoHand.
Initializes the JacoHand .
def _build(self,
             name=None,
             use_pinch_site_as_tcp=False):
    """Initializes the JacoHand.

    Args:
      name: String, the name of this robot. Used as a prefix in the MJCF name
        name attributes.
      use_pinch_site_as_tcp: (optional) A boolean, if `True` the pinch site
        will be used as the tool center point. If `False` the grip site is used.
    """
    self._mjcf_root = mjcf.from_path(_JACO_HAND_XML_PATH)
    if name:
      self._mjcf_root.model = name
    # Find MJCF elements that will be exposed as attributes.
    self._bodies = self.mjcf_model.find_all('body')
    self._tool_center_point = self._mjcf_root.find(
        'site', _PINCH_SITE if use_pinch_site_as_tcp else _GRIP_SITE)
    self._joints = self._mjcf_root.find_all('joint')
    self._hand_geoms = list(self._mjcf_root.find('body', _HAND_BODY).geom)
    self._finger_geoms = [geom for geom in self._mjcf_root.find_all('geom')
                          if geom.name and geom.name.startswith('finger')]
    self._grip_site = self._mjcf_root.find('site', _GRIP_SITE)
    self._pinch_site = self._mjcf_root.find('site', _PINCH_SITE)

    # Add actuators.
    self._finger_actuators = [
        _add_velocity_actuator(joint) for joint in self._joints]
def _build ( self , name = None , use_pinch_site_as_tcp = False ) : self . _mjcf_root = mjcf . from_path ( _JACO_HAND_XML_PATH ) if name : self . _mjcf_root . model = name # Find MJCF elements that will be exposed as attributes. self . _bodies = self . mjcf_model . find_all ( 'body' ) self . _tool_center_point = self . _mjcf_root . find ( 'site' , _PINCH_SITE if use_pinch_site_as_tcp else _GRIP_SITE ) self . _joints = self . _mjcf_root . find_all ( 'joint' ) self . _hand_geoms = list ( self . _mjcf_root . find ( 'body' , _HAND_BODY ) . geom ) self . _finger_geoms = [ geom for geom in self . _mjcf_root . find_all ( 'geom' ) if geom . name and geom . name . startswith ( 'finger' ) ] self . _grip_site = self . _mjcf_root . find ( 'site' , _GRIP_SITE ) self . _pinch_site = self . _mjcf_root . find ( 'site' , _PINCH_SITE ) # Add actuators. self . _finger_actuators = [ _add_velocity_actuator ( joint ) for joint in self . _joints ]