コード例 #1
0
        public PerceptionSimulator(int id)
        {
            robotPerception = new Perception();
            robotPerception.obstaclesLocationList = new List <Location>();

            physicalObjectList = new List <Location>();
            robotId            = id;
        }
コード例 #2
0
        public virtual void OnPerception(Perception perception)
        {
            var handler = OnPerceptionEvent;

            if (handler != null)
            {
                handler(this, new PerceptionArgs {
                    RobotId = robotId, Perception = perception
                });
            }
        }
コード例 #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();
        }
コード例 #4
0
 public virtual void OnPerception(Perception perception)
 {
     OnPerceptionEvent?.Invoke(this, new PerceptionArgs {
         RobotId = robotId, Perception = perception
     });
 }