[change] 更新主动录制bag包重载方法
This commit is contained in:
@@ -142,11 +142,11 @@ message GnssInfo
|
||||
// message definition for MessageType: MsgTypeAutopilotState
|
||||
message AutopilotState
|
||||
{
|
||||
uint32 state = 1; //0: 不可用(abandoned), 1:ready, 2:自动驾驶中
|
||||
uint32 state = 1; //0: 不可用(abandoned), 1:ready, 2:自动驾驶中,3:平行驾驶
|
||||
uint32 camera = 2; //camera节点状态 1:开启,0:关闭
|
||||
uint32 radar = 3; //雷达节点状态 1:开启,0:关闭
|
||||
uint32 rtk = 4; //RTK节点状态 1:开启,0:关闭
|
||||
uint32 autopilotMode = 5; //自动驾驶状态 0: 非自动驾驶,1: 自动驾驶
|
||||
uint32 autopilotMode = 5; //自动驾驶状态 0: 非自动驾驶,1: 自动驾驶,2平行驾驶
|
||||
double speed = 6; //惯导车速 m/s
|
||||
string reason = 7; //不可用原因(abandoned)
|
||||
}
|
||||
@@ -167,7 +167,7 @@ message AutopilotState
|
||||
message PlanningObject
|
||||
{
|
||||
uint32 uuid = 1;
|
||||
uint32 type = 2; //影响自车决策的类型, 和感知的障碍物类型不是一回事
|
||||
uint32 type = 2; //影响自车决策的类型, 和感知的障碍物类型不是一回事 0是leading障碍物,1是避障和择机的障碍物
|
||||
}
|
||||
|
||||
message PlanningObjects
|
||||
|
||||
@@ -822,54 +822,37 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int type) {
|
||||
return sendRecordData(id, 0, type, true, -1);
|
||||
return sendRecordData(id, 0, type, true, -1, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type) {
|
||||
return sendRecordData(id, duration, type, true, -1);
|
||||
return sendRecordData(id, duration, type, true, -1, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, int bduration) {
|
||||
return sendRecordData(id, duration, type, true, bduration);
|
||||
return sendRecordData(id, duration, type, true, bduration, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int type, List<String> topics) {
|
||||
return sendRecordData(id, 0, type, true, -1, topics);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, List<String> topics) {
|
||||
return sendRecordData(id, duration, type, true, -1, topics);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics) {
|
||||
return sendRecordData(id, duration, type, true, bduration, topics);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stopRecordPackage(int id, int type) {
|
||||
return sendRecordData(id, 0, type, false, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* 选择具体topics进行录制
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param bduration
|
||||
* @param topics
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics) {
|
||||
boolean sustain = false;
|
||||
if (duration <= 0) {
|
||||
duration = 0;
|
||||
sustain = true;
|
||||
}
|
||||
|
||||
MessagePad.RecordData.Builder builder = MessagePad.RecordData
|
||||
.newBuilder()
|
||||
.setId(id)
|
||||
.setDuration(duration)
|
||||
.setType(type)
|
||||
.setIsRecord(true)
|
||||
.setSustain(sustain)
|
||||
.addAllTopics(topics);
|
||||
if (bduration > -1) {
|
||||
builder.setBduration(bduration);
|
||||
}
|
||||
MessagePad.RecordData req = builder.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_RECORD_DATA.typeCode, req.toByteArray());
|
||||
return sendRecordData(id, 0, type, false, -1, null);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -882,10 +865,11 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
* @param isRecord 采集指令, true: 采集, false: 停止采集
|
||||
* @param bduration 前溯时长
|
||||
* @param sustain 是否持续采集
|
||||
* @param topics 要录制的Topic列表
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRecordData(int id, int duration, int type, boolean isRecord, int bduration) {
|
||||
public boolean sendRecordData(int id, int duration, int type, boolean isRecord, int bduration, List<String> topics) {
|
||||
boolean sustain = false;
|
||||
if (isRecord) {
|
||||
if (duration <= 0) {
|
||||
@@ -903,6 +887,9 @@ public class AdasChannel implements IAdasNetCommApi, FpgaSocket.IWebSocketConnec
|
||||
if (bduration > -1) {
|
||||
builder.setBduration(bduration);
|
||||
}
|
||||
if (topics != null && !topics.isEmpty()) {
|
||||
builder.addAllTopics(topics);
|
||||
}
|
||||
MessagePad.RecordData req = builder.build();
|
||||
return sendPBMessage(MessageType.TYPE_SEND_RECORD_DATA.typeCode, req.toByteArray());
|
||||
}
|
||||
|
||||
@@ -333,6 +333,7 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
@@ -345,7 +346,9 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param bduration
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@@ -353,6 +356,43 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
return mChannel != null && mChannel.startRecordPackage(id, duration, type, bduration);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @param topics
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int type, List<String> topics) {
|
||||
return mChannel != null && mChannel.startRecordPackage(id, type, topics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param topics
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, List<String> topics) {
|
||||
return mChannel != null && mChannel.startRecordPackage(id, duration, type, topics);
|
||||
}
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param bduration
|
||||
* @param topics
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics) {
|
||||
return mChannel != null && mChannel.startRecordPackage(id, duration, type, bduration, topics);
|
||||
@@ -381,8 +421,8 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
* @return boolean
|
||||
*/
|
||||
@Override
|
||||
public boolean sendRecordData(int id, int duration, int type, boolean isRecord, int bduration) {
|
||||
return mChannel != null && mChannel.sendRecordData(id, duration, type, isRecord, bduration);
|
||||
public boolean sendRecordData(int id, int duration, int type, boolean isRecord, int bduration, List<String> topics) {
|
||||
return mChannel != null && mChannel.sendRecordData(id, duration, type, isRecord, bduration, topics);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -578,6 +618,7 @@ public class AdasManager implements IAdasNetCommApi {
|
||||
|
||||
/**
|
||||
* 绕障开关和速度控制
|
||||
*
|
||||
* @param type
|
||||
* @param value
|
||||
*/
|
||||
|
||||
@@ -133,6 +133,26 @@ public interface IAdasNetCommApi {
|
||||
*/
|
||||
boolean startRecordPackage(int id, int duration, int type, int bduration);
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @param topics
|
||||
* @return 加入WS发送消息队列是否成功
|
||||
*/
|
||||
boolean startRecordPackage(int id, int type, List<String> topics);
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
* @param id
|
||||
* @param type
|
||||
* @param topics
|
||||
* @return 加入WS发送消息队列是否成功
|
||||
*/
|
||||
boolean startRecordPackage(int id, int duration, int type, List<String> topics);
|
||||
|
||||
/**
|
||||
* 同下
|
||||
*
|
||||
@@ -140,6 +160,7 @@ public interface IAdasNetCommApi {
|
||||
* @param duration
|
||||
* @param type
|
||||
* @param bduration
|
||||
* @param topics
|
||||
* @return 加入WS发送消息队列是否成功
|
||||
*/
|
||||
boolean startRecordPackage(int id, int duration, int type, int bduration, List<String> topics);
|
||||
@@ -163,7 +184,7 @@ public interface IAdasNetCommApi {
|
||||
* @param bduration 前溯时长
|
||||
* @return 加入WS发送消息队列是否成功
|
||||
*/
|
||||
boolean sendRecordData(int id, int duration, int type, boolean isRecord, int bduration);
|
||||
boolean sendRecordData(int id, int duration, int type, boolean isRecord, int bduration, List<String> topics);
|
||||
|
||||
/**
|
||||
* 设置自动驾驶最大速度
|
||||
|
||||
Reference in New Issue
Block a user