diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/RobotLogicLoop.java b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/RobotLogicLoop.java index 1600d187e..034ab29b3 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/robot/RobotLogicLoop.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/robot/RobotLogicLoop.java @@ -11,6 +11,7 @@ import club.joylink.rtss.simulation.cbtc.constant.SimulationConstants; import club.joylink.rtss.simulation.cbtc.constant.SimulationModule; import club.joylink.rtss.simulation.cbtc.data.CalculateService; import club.joylink.rtss.simulation.cbtc.data.SimulationDataRepository; +import club.joylink.rtss.simulation.cbtc.data.map.PSD; import club.joylink.rtss.simulation.cbtc.data.map.Section; import club.joylink.rtss.simulation.cbtc.data.map.Stand; import club.joylink.rtss.simulation.cbtc.data.map.Station; @@ -107,7 +108,8 @@ public class RobotLogicLoop { List standList = section.getStandList(); if (!CollectionUtils.isEmpty(standList)) { for (Stand stand : standList) { - if (!stand.getPsd().isCloseAndLock()) { + PSD psd = stand.getPsd(); + if (psd != null && !psd.isCloseAndLock()) { VirtualRealityPsl vrPsl = stand.getVrPsl(); if (!vrPsl.isAllowOperation()) { //确保此时允许操作 iVirtualRealityPslService.pressTheButton(simulation.getId(),