public PerceptionSimulator(int id) { robotPerception = new Perception(); robotPerception.obstaclesLocationList = new List <Location>(); physicalObjectList = new List <Location>(); robotId = id; }
public virtual void OnPerception(Perception perception) { var handler = OnPerceptionEvent; if (handler != null) { handler(this, new PerceptionArgs { RobotId = robotId, Perception = perception }); } }
//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(); }
public virtual void OnPerception(Perception perception) { OnPerceptionEvent?.Invoke(this, new PerceptionArgs { RobotId = robotId, Perception = perception }); }