Ejemplo n.º 1
0
        public PerceptionSimulator(int id)
        {
            robotPerception = new Perception();
            robotPerception.obstaclesLocationList = new List <Location>();

            physicalObjectList = new List <Location>();
            robotId            = id;
        }
Ejemplo n.º 2
0
        public virtual void OnPerception(Perception perception)
        {
            var handler = OnPerceptionEvent;

            if (handler != null)
            {
                handler(this, new PerceptionArgs {
                    RobotId = robotId, Perception = perception
                });
            }
        }
Ejemplo n.º 3
0
        //bool replayModeActivated = false;


        public PerceptionManager(int id, GameMode compet)
        {
            robotId        = id;
            competition    = compet;
            globalWorldMap = new GlobalWorldMap();

            robotPerception    = new Perception();
            physicalObjectList = new List <LocationExtended>();

            //Chainage des modules composant le Perception Manager
            absolutePositionEstimator = new AbsolutePositionEstimator(robotId);

            lidarProcessor = new LidarProcessor.LidarProcessor(robotId, competition);
            lidarProcessor.OnLidarBalisesListExtractedEvent    += absolutePositionEstimator.OnLidarBalisesListExtractedEvent;
            lidarProcessor.OnLidarBalisePointListForDebugEvent += OnLidarBalisePointListForDebugReceived;
            lidarProcessor.OnLidarObjectProcessedEvent         += OnLidarObjectsReceived;
            lidarProcessor.OnLidarProcessedEvent += OnLidarProcessedData;

            absolutePositionEstimator.OnAbsolutePositionCalculatedEvent += OnAbsolutePositionCalculatedEvent;

            PerceptionMonitor.swPerception.Start();
        }
Ejemplo n.º 4
0
 public virtual void OnPerception(Perception perception)
 {
     OnPerceptionEvent?.Invoke(this, new PerceptionArgs {
         RobotId = robotId, Perception = perception
     });
 }