Package components.commchannel.serial.frontcam

Examples of components.commchannel.serial.frontcam.VectorValues


   *
   * En la simulaci�n real se utiliza el mapeo entre lo que el usuario eligi�
   * en la pantalla y los vectores del archivo (ver clase Defines)
   */
  protected int currentlyViewedPlace() {
    VectorValues viewedPlace = (VectorValues)((Sensor)commChannel.receive().get(CommunicationChannel.COLOR_SENSOR_NAME)).getValue();   
   
    RecognizedShape[] icons = Simulation.getCurrent().getGps().getMazeItems().recognizedColoredIcons;
    for (int i=0; i<icons.length; i++) {
      java.awt.Color c1 = icons[i].color;
      org.eclipse.swt.graphics.Color c2 = ColorVectorMap.getInstance().getColor(viewedPlace.getDescription())
      if(c1 == null || c2==null) continue;
     
      if ( c1.getRed() == c2.getRed() &&
        c1.getGreen() == c2.getGreen() &&
        c1.getBlue() == c2.getBlue() )  return Integer.valueOf(icons[i].shapeId).intValue();
View Full Code Here


     
      //log.debug("CAM TIME="+((float)(end-start))/1000f);
     
      /// SE DETERMINA EL RIEL Y EL LUGAR ////
      TrackingInformation currentRail = frontCam.calculateBestRailColor(tiRails);
      VectorValues currentVector = frontCam.calculateBestVector(tiColors);
     
      int railMass = currentRail.getColorMass();
      direccion = frontCam.getTurningDirection(currentRail.getMeanX(),railMass,15,antmove);     
      antmove=direccion;
     
      log.debug("===========================");
      log.debug(currentRail.getDescription());
      log.debug(currentRail);

      log.debug("===========================");
      log.debug(currentVector.getDescription().toUpperCase());
      log.debug(currentVector.toString());
     
     
      ///// Se graba la recomendacion de nuestros algoritmos acerca de qu� hay que hacer /////
      sensor = (ProximitySensor)features.featuresHash.get( MOVE_HINT );
      if ( sensor != null )
View Full Code Here

TOP

Related Classes of components.commchannel.serial.frontcam.VectorValues

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.