This commit is contained in:
xuzhiheng
2025-06-09 10:34:24 +08:00
parent 503771fe7c
commit 2cc6f2906b
49 changed files with 1471 additions and 514 deletions

View File

@@ -7,7 +7,6 @@ import static java.util.Objects.requireNonNull;
import com.google.common.util.concurrent.Uninterruptibles;
import com.google.inject.Provider;
import jakarta.inject.Inject;
import java.io.IOException;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
@@ -15,10 +14,8 @@ import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.Semaphore;
import java.util.concurrent.TimeUnit;
import org.opentcs.access.Kernel;
import org.opentcs.access.Kernel.State;
import org.opentcs.access.KernelStateTransitionEvent;
import org.opentcs.access.LocalKernel;
import org.opentcs.communication.mqtt.MqttBrokerServer;
import org.opentcs.components.kernel.KernelExtension;
import org.opentcs.components.kernel.services.NotificationService;
import org.opentcs.customizations.ApplicationEventBus;
@@ -73,14 +70,10 @@ public class StandardKernel
* The kernel implementing the actual functionality for the current mode.
*/
private KernelState kernelState;
/**
* MQTT 服务
*/
private MqttBrokerServer mqttBrokerServer = new MqttBrokerServer();
/**
* 通讯适配器管理类
*/
private AdapterManage adapterManage = new AdapterManage();
private final AdapterManage adapterManage = new AdapterManage();
/**
* Creates a new kernel.
@@ -122,14 +115,14 @@ public class StandardKernel
//开启MQTT服务
// mqttBrokerServer.startMqtt();
//开启通讯适配器自动管理
adapterManage.START();
LOG.info("Communication adapter auto management started successfully");
initialized = true;
LOG.debug("Starting kernel thread");
Thread kernelThread = new Thread(this, "kernelThread");
kernelThread.start();
//开启通讯适配器自动管理
// adapterManage.START();
// LOG.info("Communication adapter auto management started successfully");
}
@Override
@@ -149,8 +142,8 @@ public class StandardKernel
//关闭MQTT服务
// mqttBrokerServer.stopMqtt();
//关闭通讯适配器管理
adapterManage.STOP();
//关闭通讯适配器自动管理
// adapterManage.STOP();
initialized = false;
terminationSemaphore.release();

View File

@@ -1385,14 +1385,6 @@ public class PlantModelManager
private Point createPoint(PointCreationTO to)
throws ObjectExistsException {
// Get a unique ID for the new point and create an instance.
if (to.getType() == Point.Type.PARK_POSITION) {
//是休息点,记录
Park park = new Park();
park.setName(to.getName());
park.setStatus(false);
ParkStrategy.setPark(park);
}
Point newPoint = new Point(to.getName())
.withPose(new Pose(to.getPose().getPosition(), to.getPose().getOrientationAngle()))
.withType(to.getType())