[8.4.0]
[自动滑动出发+部分跳站]
This commit is contained in:
@@ -84,6 +84,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.Trajectory
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.VehicleSite
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import io.netty.channel.Channel
|
||||
import mogo.telematics.pad.MessagePad
|
||||
@@ -467,9 +468,9 @@ class MoGoAutopilotControlProvider :
|
||||
}
|
||||
}
|
||||
|
||||
override fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, stationId: Long, stationName: String, stationSeq: Int, lon: Double, lat: Double): Long {
|
||||
override fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, startStation : VehicleSite, endStation:VehicleSite ): Long {
|
||||
return if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
|
||||
val invokeResult = AdasManager.getInstance().sendTaskManagerAutopilotContinue(trackId, taskId, stationId, stationName, stationSeq, lon, lat)
|
||||
val invokeResult = AdasManager.getInstance().sendTaskManagerAutopilotContinue(trackId, taskId, startStation, endStation)
|
||||
invokeAutoPilotResult(if (invokeResult > -1) "无人化 取消自动驾驶调用成功:${invokeResult}" else "无人化 取消自动驾驶调用失败, socket 或者 rawPack 可能为空")
|
||||
invokeResult
|
||||
} else {
|
||||
|
||||
@@ -38,6 +38,7 @@ import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SO
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_SOCKET_VEHICLE
|
||||
import com.mogo.eagle.core.data.deva.chain.ChainConstant.Companion.CHAIN_TYPE_STATUS
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.inVokeLeaveStation
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeArriveAtStation
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutoPilotInfo
|
||||
import com.mogo.eagle.core.function.call.autopilot.CallerAutoPilotStatusListenerManager.invokeAutoPilotStation
|
||||
@@ -133,6 +134,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.status.SweeperTaskStatus
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskLocationQueryResponse
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
|
||||
import com.zhjt.mogo.adas.utils.ByteUtil
|
||||
import com.zhjt.service.chain.ChainLog
|
||||
import fault_management.FmInfo
|
||||
@@ -1693,7 +1695,11 @@ class MoGoAdasListenerImpl : OnAdasListener {
|
||||
CallerLogger.i("$M_D_C$TAG", "任务管理数据:$data")
|
||||
}
|
||||
|
||||
override fun onAdasTaskManagerDeparture(taskId: Long?, siteId: Long?, sequence: Int?, ack: Boolean, reason: String?, stationTimeLeft: Double) {
|
||||
override fun onAdasTaskManagerDeparture(
|
||||
taskId: Long?,
|
||||
taskStartNotification: TaskStartNotification?
|
||||
) {
|
||||
inVokeLeaveStation(taskId,taskStartNotification)
|
||||
}
|
||||
|
||||
override fun onAdasTaskManagerArrival(taskId: Long?, siteId: Long?, sequence: Int?, mileage: BigDecimal?) {
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.zhjt.mogo.adas.data.sweeper.task.confirm.SweeperTaskConfirm.TaskConfi
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.s_r.SweeperTaskSuspendResume.SuspendResumeTaskReq
|
||||
import com.zhjt.mogo.adas.data.sweeper.task.stop.SweeperTaskStop.StopTaskResp
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.Trajectory
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.VehicleSite
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo.yycp.paralleldriving.protocol.ParallelDrivingRequest
|
||||
import system_master.SsmInfo
|
||||
@@ -49,7 +50,7 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
|
||||
|
||||
fun sendTaskManagerAutopilotStart(taskId: Long, traj: Trajectory): Long
|
||||
|
||||
fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, stationId: Long, stationName: String, stationSeq: Int, lon: Double, lat: Double): Long
|
||||
fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, startStation : VehicleSite, endStation: VehicleSite): Long
|
||||
|
||||
/**
|
||||
* 开启自动驾驶(魔方)
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.mogo.eagle.core.function.api.autopilot
|
||||
|
||||
import com.mogo.eagle.core.data.autopilot.AutopilotControlParameters
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import system_master.*
|
||||
@@ -67,6 +68,11 @@ interface IMoGoAutopilotStatusListener {
|
||||
*/
|
||||
fun onAutopilotArriveAtStation(arrivalNotification: MessagePad.ArrivalNotification?) {}
|
||||
|
||||
/**
|
||||
* 自动驾驶 离站触发
|
||||
*/
|
||||
fun invokeLeaveStation(taskId: Long?, taskStartNotification: TaskStartNotification?) {}
|
||||
|
||||
/**
|
||||
* 工控机获取SN
|
||||
*/
|
||||
|
||||
@@ -122,12 +122,12 @@ object CallerAutoPilotControlManager {
|
||||
/**
|
||||
* 自驾成功后再次启动自驾时
|
||||
*/
|
||||
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory?, vehicleSite : VehicleSite, controlParameters: AutopilotControlParameters): Long {
|
||||
fun unmannedAutoPilotContinue(taskId: Long, traj: Trajectory?, startStation : VehicleSite,endStation : VehicleSite, controlParameters: AutopilotControlParameters): Long {
|
||||
if (traj == null) {
|
||||
//LogUtils.eTag(TAG, "自动驾驶控制参数异常,请检查参数信息")
|
||||
return -1L
|
||||
}
|
||||
val sessionId = providerApi?.sendTaskManagerAutopilotContinue(traj.id, taskId, vehicleSite.stationId, vehicleSite.stationName, vehicleSite.stationSeq, vehicleSite.point.x, vehicleSite.point.y) ?: -1L
|
||||
val sessionId = providerApi?.sendTaskManagerAutopilotContinue(traj.id, taskId, startStation,endStation) ?: -1L
|
||||
// 更新记录在全局的控制参数
|
||||
CallerAutoPilotStatusListenerManager.updateAutopilotControlParameters(controlParameters)
|
||||
return sessionId
|
||||
|
||||
@@ -12,6 +12,7 @@ import com.mogo.eagle.core.utilcode.mogo.logger.CallerLogger
|
||||
import com.mogo.eagle.core.utilcode.util.GsonUtils
|
||||
import com.mogo.eagle.core.utilcode.util.ParseVersionUtils
|
||||
import com.zhjt.mogo.adas.data.AdasConstants
|
||||
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskStartNotification
|
||||
import mogo.telematics.pad.MessagePad
|
||||
import mogo_msg.MogoReportMsg
|
||||
import system_master.SsmInfo
|
||||
@@ -271,6 +272,13 @@ object CallerAutoPilotStatusListenerManager : CallerBase<IMoGoAutopilotStatusLis
|
||||
}
|
||||
}
|
||||
|
||||
fun inVokeLeaveStation(taskId: Long?, taskStartNotification: TaskStartNotification?){
|
||||
M_LISTENERS.forEach {
|
||||
val listener = it.value
|
||||
listener.invokeLeaveStation(taskId,taskStartNotification)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 工控机获取SN 回调
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user