(radius, **duplo_kwargs)
return separation_force
Measures Duplo separation force as a function of stud radius.
Measures Duplo separation force as a function of stud radius.
Measures Duplo separation force as a function of stud radius .
def get_separation_force_for_radius(radius, **duplo_kwargs):
  """Measures Duplo separation force as a function of stud radius."""

  top_brick = duplo.Duplo(**duplo_kwargs)
  bottom_brick = duplo.Duplo(**duplo_kwargs)

  # Set the radius of the studs on the bottom brick (this would normally be done
  # in `initialize_episode_mjcf`). Note: we also set the radius of the studs on
  # the top brick, since this has a (tiny!) effect on its mass.

  # pylint: disable=protected-access
  top_brick._active_stud_dclass.geom.size[0] = radius
  bottom_brick._active_stud_dclass.geom.size[0] = radius
  # pylint: enable=protected-access

  separation_force = utils.measure_separation_force(top_brick, bottom_brick)
  logging.debug('Stud radius: %f\tseparation force: %f N',
                radius, separation_force)
  return separation_force
def get_separation_force_for_radius ( radius , * * duplo_kwargs ) : top_brick = duplo . Duplo ( * * duplo_kwargs ) bottom_brick = duplo . Duplo ( * * duplo_kwargs ) # Set the radius of the studs on the bottom brick (this would normally be done # in `initialize_episode_mjcf`). Note: we also set the radius of the studs on # the top brick, since this has a (tiny!) effect on its mass. # pylint: disable=protected-access top_brick . _active_stud_dclass . geom . size [ 0 ] = radius bottom_brick . _active_stud_dclass . geom . size [ 0 ] = radius # pylint: enable=protected-access separation_force = utils . measure_separation_force ( top_brick , bottom_brick ) logging . debug ( 'Stud radius: %f\tseparation force: %f N' , radius , separation_force ) return separation_force