[b4]
[和@yuelei 联调]
This commit is contained in:
yangyakun
2026-03-11 15:43:28 +08:00
parent f62a3ceb3b
commit 4554eb1f0a
24 changed files with 177 additions and 33 deletions

View File

@@ -137,7 +137,7 @@ class MoGoAutopilotControlProvider :
// .setType(Constants.SUBSCRIBE_TYPE.UNSUBSCRIBE)
// .setMessageTypes(messageTypes).build()
// "192.168.1.102"
// "172.30.33.83"
val options = AdasOptions.newBuilder()
.setConnectionMode(AdasOptions.IPC_CONNECTION_MODE.PING)
.setPingAddressList(AdasManager.getInstance().pingAddressList)
@@ -445,6 +445,16 @@ class MoGoAutopilotControlProvider :
}
}
override fun sendTaskManagerRunningInfo(): Long {
return if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {
val invokeResult = AdasManager.getInstance().sendTaskManagerRunningInfo()
invokeAutoPilotResult(if (invokeResult > -1) "无人化 获取正在执行的任务信息调用成功:${invokeResult}" else "获取正在执行的任务信息调用失败, socket 或者 rawPack 可能为空")
invokeResult
} else {
invokeAutoPilotResult("无人化 车机与工控机链接失败,无法开启自动驾驶")
-1L
}
}
override fun sendTaskManagerAutopilotStart(taskId: Long, traj: Trajectory): Long {
return if (AdasManager.getInstance().ipcConnectionStatus == AdasConstants.IpcConnectionStatus.CONNECTED) {

View File

@@ -83,6 +83,7 @@ import com.mogo.eagle.core.function.call.autopilot.CallerRoboBusJinlvM1StitchedV
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCleanSystemListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerSweeperFutianCloudTaskListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerTakeoverListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerTaskListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerV2XListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerV2nNioEventListenerManager
import com.mogo.eagle.core.function.call.autopilot.CallerVlmManager
@@ -131,6 +132,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.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.utils.ByteUtil
import com.zhjt.service.chain.ChainLog
import fault_management.FmInfo
@@ -1700,6 +1702,10 @@ class MoGoAdasListenerImpl : OnAdasListener {
override fun onAdasTaskManagerComplete(taskId: Long?, userId: Long?, status: Int?, reason: String?, completedTime: Date?, mileage: BigDecimal?) {
}
override fun onAdasTaskManagerRunning(taskId: Long?, lineId: Long?, taskLocationQueryResponse: TaskLocationQueryResponse?){
CallerTaskListenerManager.invokeRunningTaskInfo(taskId,lineId,taskLocationQueryResponse)
}
/**
* 是否可以启动自动驾驶
* 使用方法查看app_ipc_monitoring/uiMainActivity/onAutopilotAbility

View File

@@ -12,7 +12,7 @@ import java.io.Serializable
*/
open class AutopilotStatusInfo : Serializable, Cloneable {
/**
* 当前链接的IP地址, 默认地址 192.168.1.102
* 当前链接的IP地址, 默认地址 172.30.33.83
*/
var connectIP: String? = null

View File

@@ -181,11 +181,11 @@ object FunctionBuildConfig {
/**
* 配置连接工控机的IP地址
* 小巴车 192.168.8.102
* 出租车 192.168.1.102
* 出租车 172.30.33.83
*/
@Volatile
@JvmField
var adasConnectIP = "192.168.1.102"
var adasConnectIP = "172.30.33.83"
/**
* acc 加速度值阈值

View File

@@ -45,6 +45,8 @@ interface IMoGoAutopilotControlProvider : IMoGoFunctionServerProvider {
*/
fun startAutoPilot(controlParameters: AutopilotControlParameters): Long
fun sendTaskManagerRunningInfo(): Long
fun sendTaskManagerAutopilotStart(taskId: Long, traj: Trajectory): Long
fun sendTaskManagerAutopilotContinue(trackId: Long, taskId: Long, stationId: Long, stationName: String, stationSeq: Int, lon: Double, lat: Double): Long

View File

@@ -92,6 +92,17 @@ object CallerAutoPilotControlManager {
return sessionId
}
/**
* 开启自动驾驶
*
* @param controlParameters 开启自动驾驶的控制参数
*/
fun sendTaskManagerRunningInfo(): Long {
val sessionId = providerApi?.sendTaskManagerRunningInfo() ?: -1L
// 更新记录在全局的控制参数
return sessionId
}
/**
* 开启自动驾驶
*

View File

@@ -0,0 +1,38 @@
package com.mogo.eagle.core.function.call.autopilot
import com.mogo.eagle.core.function.api.autopilot.IMoGoAutopilotActionsListener
import com.mogo.eagle.core.function.call.base.CallerBase
import com.zhjt.mogo.adas.unmanned.task.dto.cmd.TaskLocationQueryResponse
/**
* 能否启动自驾管理类
*/
object CallerTaskListenerManager : CallerBase<IMoGoAutopilotActionsListener>() {
@Volatile
private var runningtaskId = 0L
@Volatile
private var runningLineId = 0L
@Volatile
private var runningTaskLocationInfo: TaskLocationQueryResponse? = null
init {
}
fun isCarRunningTask(): Boolean {
return runningLineId != 0L && runningLineId != 0L
}
fun invokeRunningTaskInfo(
taskId: Long?,
lineId: Long?,
taskLocationQueryResponse: TaskLocationQueryResponse?
) {
this.runningtaskId = taskId ?: 0L
this.runningLineId = lineId ?: 0L
this.runningTaskLocationInfo = taskLocationQueryResponse
}
}

View File

@@ -366,8 +366,8 @@ object AppIdentityModeUtils {
//获取驾舱类型
@JvmStatic
fun getCockpitType(): CockpitType {
return CockpitType.getCockpitType(SPUtils.getInstance().getString(COCKPIT_TYPE, CockpitType.NONE.code))
// return CockpitType.UNMANNED
// return CockpitType.getCockpitType(SPUtils.getInstance().getString(COCKPIT_TYPE, CockpitType.NONE.code))
return CockpitType.UNMANNED
}
}