(body_id, stiffness_range, damping_range, random)
return body
Returns an `etree.Element` defining a body.

  Args:
    body_id: Id of the created body.
    stiffness_range: A tuple of (stiffness_lower_bound, stiffness_uppder_bound).
      The stiffness of the joint is drawn uniformly from this range.
    damping_range: A tuple of (damping_lower_bound, damping_upper_bound). The
      damping of the joint is drawn uniformly from this range.
    random: A `numpy.random.RandomState` instance.

  Returns:
   A new instance of `etree.Element`. A body element with two children: joint
   and geom.
Returns an `etree.Element` defining a body.
Returns an etree . Element defining a body .
def _make_body(body_id, stiffness_range, damping_range, random):
  """Returns an `etree.Element` defining a body.

  Args:
    body_id: Id of the created body.
    stiffness_range: A tuple of (stiffness_lower_bound, stiffness_uppder_bound).
      The stiffness of the joint is drawn uniformly from this range.
    damping_range: A tuple of (damping_lower_bound, damping_upper_bound). The
      damping of the joint is drawn uniformly from this range.
    random: A `numpy.random.RandomState` instance.

  Returns:
   A new instance of `etree.Element`. A body element with two children: joint
   and geom.
  """
  body_name = 'body_{}'.format(body_id)
  joint_name = 'joint_{}'.format(body_id)
  geom_name = 'geom_{}'.format(body_id)

  body = etree.Element('body', name=body_name)
  body.set('pos', '.25 0 0')
  joint = etree.SubElement(body, 'joint', name=joint_name)
  body.append(etree.Element('geom', name=geom_name))
  joint.set('stiffness',
            str(random.uniform(stiffness_range[0], stiffness_range[1])))
  joint.set('damping',
            str(random.uniform(damping_range[0], damping_range[1])))
  return body
def _make_body ( body_id , stiffness_range , damping_range , random ) : body_name = 'body_{}' . format ( body_id ) joint_name = 'joint_{}' . format ( body_id ) geom_name = 'geom_{}' . format ( body_id ) body = etree . Element ( 'body' , name = body_name ) body . set ( 'pos' , '.25 0 0' ) joint = etree . SubElement ( body , 'joint' , name = joint_name ) body . append ( etree . Element ( 'geom' , name = geom_name ) ) joint . set ( 'stiffness' , str ( random . uniform ( stiffness_range [ 0 ] , stiffness_range [ 1 ] ) ) ) joint . set ( 'damping' , str ( random . uniform ( damping_range [ 0 ] , damping_range [ 1 ] ) ) ) return body