public SmootherExperiment(AutonomousCarSimulation simulation, string filename, int num)
            : base(simulation)
        {
            this.filename = filename;
            this.num      = num;

            simulation.Collided         += new AutonomousCarSimulation.CarCollisionEvent(collided);
            simulation.MissionCompleted += new AutonomousCarSimulation.MissionCompleteEvent(complete);

            Smoother.Anchoring = true;
            smoothing          = true;
            count      = 0;
            collisions = 0;
            start      = DateTime.Now;

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename, true))
            {
                DateTime now = DateTime.Now;
                file.WriteLine("--------------------------------");
                file.WriteLine(now.ToString());
                file.WriteLine("num time cte speed lateral maxlateral dlateral\n");
                file.WriteLine("Smoothed (Anchoring):");
            }

            startSim();
        }
        public ParkingExperiment(AutonomousCarSimulation simulation, World world, string filename)
            : base(simulation)
        {
            this.world    = world;
            this.filename = filename;

            simulation.MissionCompleted += new AutonomousCarSimulation.MissionCompleteEvent(complete);

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename, true))
            {
                DateTime now = DateTime.Now;
                file.WriteLine("--------------------------------");
                file.WriteLine(now.ToString());
                file.WriteLine("start goal time perr oerr(rad) oerr(deg)\n");
            }

            startIndex = goalIndex = 0;
            startSim();
        }
        public ParkingExperiment(AutonomousCarSimulation simulation, World world, string filename)
            : base(simulation)
        {
            this.world = world;
            this.filename = filename;

            simulation.MissionCompleted += new AutonomousCarSimulation.MissionCompleteEvent(complete);

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename, true))
            {
                DateTime now = DateTime.Now;
                file.WriteLine("--------------------------------");
                file.WriteLine(now.ToString());
                file.WriteLine("start goal time perr oerr(rad) oerr(deg)\n");
            }

            startIndex = goalIndex = 0;
            startSim();
        }
 public Experiment(AutonomousCarSimulation simulation)
 {
     this.simulation = simulation;
 }
 public Experiment(AutonomousCarSimulation simulation)
 {
     this.simulation = simulation;
 }
        public SmootherExperiment(AutonomousCarSimulation simulation, string filename, int num)
            : base(simulation)
        {
            this.filename = filename;
            this.num = num;

            simulation.Collided += new AutonomousCarSimulation.CarCollisionEvent(collided);
            simulation.MissionCompleted += new AutonomousCarSimulation.MissionCompleteEvent(complete);

            Smoother.Anchoring = true;
            smoothing = true;
            count = 0;
            collisions = 0;
            start = DateTime.Now;

            using (System.IO.StreamWriter file = new System.IO.StreamWriter(filename, true))
            {
                DateTime now = DateTime.Now;
                file.WriteLine("--------------------------------");
                file.WriteLine(now.ToString());
                file.WriteLine("num time cte speed lateral maxlateral dlateral\n");
                file.WriteLine("Smoothed (Anchoring):");
            }

            startSim();
        }
Esempio n. 7
0
 public Dashboard(AutonomousCarSimulation simulation)
 {
     this.simulation = simulation;
     wheelAngle = 0f;
 }