Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        outputPlan = new Stack <DefaultAction>();

        domainList = new List <PlanningDomainBase>();
        domainList.Add(new ADAstarDomain());

        planner = new ADAstarPlanner();
        planner.init(ref domainList, 100);

        DStartState = ADAexecution.startState as DefaultState;
        DGoalState  = ADAexecution.goalState as DefaultState;


        planner.InitializeValues(ref DStartState, ref DGoalState, 2.5f, ref outputPlan,
                                 PlannerMode.PLANNING_MODE.IncreaseFactor, .2f, 0.0f);


        Debug.Log(ADAstarPlanner.Closed.Count);

        Debug.Log("Finished");

        //	foreach(Edge edge in planner.edgeList.Values)
        //	{
        //		Debug.Log("Edge: u: " + (edge.u as ADAstarState).state);
        //		Debug.Log("Edge: v: " + (edge.v as ADAstarState).state);
        //	}
    }
Esempio n. 2
0
    // Use this for initialization
    public override void Init(AnimationAnalyzer animAnalyzer, NeighbourAgents neighborhood, NeighbourObstacles obstacles)
    {
        analyzer = animAnalyzer;
        if (analyzer != null && !analyzer.initialized)
        {
            analyzer.Init();
        }

        storedPlan = new List <FootstepPlanningAction>();

        outputPlan = new Stack <DefaultAction>();

        domainList = new List <PlanningDomainBase>();
        domainList.Add(new FootstepPlanningDomain(analyzer, neighborhood, obstacles));

        planner = new ADAstarPlanner();

        planner.init(ref domainList, MaxNumberOfNodes);

        initialized = true;

        currentState = null;

        isPlanComputed = false;

        planChanged = false;

        goalMeshRenderer = goalStateTransform.gameObject.GetComponent("MeshRenderer") as MeshRenderer;


        currentGoal = goalStateTransform.position;
    }
Esempio n. 3
0
    // Use this for initialization
    void Start()
    {
        outputPlan = new Stack<DefaultAction>();

        domainList = new List<PlanningDomainBase>();
        domainList.Add(new ADAstarDomain());

        planner = new ADAstarPlanner();
        planner.init(ref domainList, 100);

        DStartState = ADAexecution.startState as DefaultState;
        DGoalState = ADAexecution.goalState as DefaultState;

        planner.InitializeValues(ref DStartState, ref DGoalState, 2.5f, ref outputPlan,
                                 PlannerMode.PLANNING_MODE.IncreaseFactor, .2f, 0.0f);

        Debug.Log(ADAstarPlanner.Closed.Count);

        Debug.Log("Finished");

        //	foreach(Edge edge in planner.edgeList.Values)
        //	{
        //		Debug.Log("Edge: u: " + (edge.u as ADAstarState).state);
        //		Debug.Log("Edge: v: " + (edge.v as ADAstarState).state);
        //	}
    }
Esempio n. 4
0
    // Use this for initialization
    public override void Init(AnimationAnalyzer animAnalyzer, NeighbourAgents neighborhood, NeighbourObstacles obstacles)
    {
        analyzer = animAnalyzer;
        if (analyzer != null && !analyzer.initialized)
            analyzer.Init();

        storedPlan = new List<FootstepPlanningAction>();

        outputPlan = new Stack<DefaultAction>();

        domainList = new List<PlanningDomainBase>();
        domainList.Add(new FootstepPlanningDomain(analyzer, neighborhood, obstacles));

        planner = new ADAstarPlanner();

        planner.init(ref domainList, MaxNumberOfNodes);

        initialized = true;

        currentState = null;

        isPlanComputed = false;

        planChanged = false;

        goalMeshRenderer = goalStateTransform.gameObject.GetComponent("MeshRenderer") as MeshRenderer;

        currentGoal = goalStateTransform.position;
    }