parameters: (env,options)
docstring: Main example code.
docstring_summary: Main example code.
docstring_tokens: Main example code .
function: def main(env,options):
      "Main example code."
      env.Load(options.scene)
      robot = env.GetRobots()[0]
      sensorrobot = None if options.sensorrobot is None else env.GetRobot(options.sensorrobot)
      env.UpdatePublishedBodies()
      time.sleep(0.1) # give time for environment to update
      self = CalibrationViews(robot,sensorname=options.sensorname,sensorrobot=sensorrobot,randomize=options.randomize)
  
      attachedsensor = self.vmodel.attachedsensor
      if options.showsensor and attachedsensor.GetSensor() is not None and attachedsensor.GetSensor().Supports(Sensor.Type.Camera):
          attachedsensor.GetSensor().Configure(Sensor.ConfigureCommand.PowerOn)
          attachedsensor.GetSensor().Configure(Sensor.ConfigureCommand.RenderDataOn)
          
      while True:
          print('computing all locations, might take more than a minute...')
          self.computeAndMoveToObservations(usevisibility=options.usevisibility,posedist=options.posedist)
          if options.testmode:
              break
function_tokens: def main ( env , options ) : env . Load ( options . scene ) robot = env . GetRobots ( ) [ 0 ] sensorrobot = None if options . sensorrobot is None else env . GetRobot ( options . sensorrobot ) env . UpdatePublishedBodies ( ) time . sleep ( 0.1 ) # give time for environment to update self = CalibrationViews ( robot , sensorname = options . sensorname , sensorrobot = sensorrobot , randomize = options . randomize ) attachedsensor = self . vmodel . attachedsensor if options . showsensor and attachedsensor . GetSensor ( ) is not None and attachedsensor . GetSensor ( ) . Supports ( Sensor . Type . Camera ) : attachedsensor . GetSensor ( ) . Configure ( Sensor . ConfigureCommand . PowerOn ) attachedsensor . GetSensor ( ) . Configure ( Sensor . ConfigureCommand . RenderDataOn ) while True : print ( 'computing all locations, might take more than a minute...' ) self . computeAndMoveToObservations ( usevisibility = options . usevisibility , posedist = options . posedist ) if options . testmode : break