Package fr.utbm.gi.vi51.pw.environment

Examples of fr.utbm.gi.vi51.pw.environment.WorldModelState


   
    Environment environment = new WorldModel(WORLD_SIZE_X, WORLD_SIZE_Y);
   
    FrameworkLauncher.launchEnvironment(environment, gui, EXECUTION_DELAY);

    Lemming a = new Lemming(steering) ;   
    FrameworkLauncher.launchAgent(a) ;

    Lemming b = new Lemming(steering) ;
    FrameworkLauncher.launchAgent(b) ;

    Lemming c = new Lemming(steering) ;
    FrameworkLauncher.launchAgent(c) ;

    Lemming d = new Lemming(steering) ;
    FrameworkLauncher.launchAgent(d) ;
   
    FrameworkLauncher.startSimulation();
  }
View Full Code Here


   
    Environment environment = new WorldModel(WORLD_SIZE_X, WORLD_SIZE_Y);
   
    FrameworkLauncher.launchEnvironment(environment, gui, EXECUTION_DELAY);

    Rabbit a = new Rabbit(steering) ;   
    FrameworkLauncher.launchAgent(a) ;

    Rabbit b = new Rabbit(steering) ;
    FrameworkLauncher.launchAgent(b) ;

    Rabbit c = new Rabbit(steering) ;
    FrameworkLauncher.launchAgent(c) ;

    Rabbit d = new Rabbit(steering) ;
    FrameworkLauncher.launchAgent(d) ;
   
    FrameworkLauncher.startSimulation();
  }
View Full Code Here

    Point2d position = new Point2d(getX(), getY());
    Vector2d orientation = getDirection();
    double linearSpeed = getCurrentLinearSpeed();
    double angularSpeed = getCurrentAngularSpeed();
   
    BehaviourOutput output = null;

    List<Perception> perceptions = getPerceivedObjects();

    if (this.seekBehaviour!=null && !perceptions.isEmpty()) {

      Perception percept = perceptions.get(0);

      if (percept.getPerceivedObject() instanceof MouseTarget) {
        Point2d target = new Point2d(percept.getPerceivedObject().getPosition());

        // run the seek behaviour
        output = this.seekBehaviour.runSeek(position, linearSpeed, getMaxLinear(), target);
      }
      else {
        // run the wander behaviour
        output = this.wanderBehaviour.runWander(position, orientation, linearSpeed, getMaxLinear(), angularSpeed, getMaxAngular());
      }
    }
    else {
      // run the wander behaviour
      output = this.wanderBehaviour.runWander(position, orientation, linearSpeed, getMaxLinear(), angularSpeed, getMaxAngular());
    }

    // Send the behaviour output to the environment
    if (output!=null) {
      if (this.isSteering)
        influenceSteering(output.getLinear(),output.getAngular());
      else
        influenceKinematic(output.getLinear(),output.getAngular());
    }
   
    return StatusFactory.ok(this);
  }
View Full Code Here

    Point2d position = new Point2d(getX(), getY());
    Vector2d orientation = getDirection();
    double linearSpeed = getCurrentLinearSpeed();
    double angularSpeed = getCurrentAngularSpeed();
   
    BehaviourOutput output = null;

    List<Perception> perceptions = getPerceivedObjects();

    if (this.seekBehaviour!=null && !perceptions.isEmpty())
    {
      Perception percept = perceptions.get(0);
    }

    //Take a decision
    currentAction.setAction(Action.BuildABridge);
   

    //output = this.wanderBehaviour.runWander(position, orientation, linearSpeed, getMaxLinear(), angularSpeed, getMaxAngular());
    output = new SteeringBehaviourOutput();
    output.setLinear(1, 0);
    output.setAngular(0);

    // Send the behaviour output to the environment
    if (output!=null) {
      if (this.isSteering)
        influenceSteering(output.getLinear(),output.getAngular());
      else
        influenceKinematic(output.getLinear(),output.getAngular());
    }
   
    return StatusFactory.ok(this);
  }
View Full Code Here

          WANDER_CIRCLE_RADIUS,
          WANDER_MAX_ROTATION,
          faceB);
    }
    else {
      this.seekBehaviour =  new KinematicSeekBehaviour();

      this.wanderBehaviour = new KinematicWanderBehaviour();
    }
  }
View Full Code Here

          WANDER_CIRCLE_RADIUS,
          WANDER_MAX_ROTATION,
          faceB);
    }
    else {
      this.seekBehaviour =  new KinematicSeekBehaviour();

      this.wanderBehaviour = new KinematicWanderBehaviour();
    }
    currentAction = new BodyAction();
  }
View Full Code Here

          faceB);
    }
    else {
      this.seekBehaviour =  new KinematicSeekBehaviour();

      this.wanderBehaviour = new KinematicWanderBehaviour();
    }
  }
View Full Code Here

          faceB);
    }
    else {
      this.seekBehaviour =  new KinematicSeekBehaviour();

      this.wanderBehaviour = new KinematicWanderBehaviour();
    }
    currentAction = new BodyAction();
  }
View Full Code Here

    this.isSteering = useSteering;

    if (useSteering) {
      this.seekBehaviour = new SteeringSeekBehaviour();

      SteeringAlignBehaviour alignB = new SteeringAlignBehaviour(
          STOP_RADIUS, SLOW_RADIUS);

      SteeringFaceBehaviour faceB = new SteeringFaceBehaviour(STOP_DISTANCE, alignB);

      this.wanderBehaviour = new SteeringWanderBehaviour(
View Full Code Here

    this.isSteering = useSteering;

    if (useSteering) {
      this.seekBehaviour = new SteeringSeekBehaviour();

      SteeringAlignBehaviour alignB = new SteeringAlignBehaviour(
          STOP_RADIUS, SLOW_RADIUS);

      SteeringFaceBehaviour faceB = new SteeringFaceBehaviour(STOP_DISTANCE, alignB);

      this.wanderBehaviour = new SteeringWanderBehaviour(
View Full Code Here

TOP

Related Classes of fr.utbm.gi.vi51.pw.environment.WorldModelState

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.