室内模拟导航路线,工控机返回数据验证,数据不精确待联调,数据反馈上线时间7月份
This commit is contained in:
@@ -133,16 +133,6 @@ public class AMapCustomView
|
||||
// mWayPointList.add(new NaviLatLng(40.035897, 116.329582));
|
||||
// mWayPointList.add(new NaviLatLng(40.036396, 116.322166));
|
||||
Log.d(TAG, "initView:" + mWayPointList.toString());
|
||||
// mWayPointList.add(new NaviLatLng(39.968847, 116.406952));
|
||||
// mWayPointList.add(new NaviLatLng(39.969058, 116.407346));
|
||||
// mWayPointList.add(new NaviLatLng(39.968955, 116.401767));
|
||||
// mWayPointList.add(new NaviLatLng(39.968626, 116.394938));
|
||||
// mWayPointList.add(new NaviLatLng(39.968433, 116.388725));
|
||||
// mWayPointList.add(new NaviLatLng(39.968542, 116.383775));
|
||||
// mWayPointList.add(new NaviLatLng(40.037808, 116.342539));
|
||||
// mWayPointList.add(new NaviLatLng(40.037239, 116.337172));
|
||||
// mWayPointList.add(new NaviLatLng(40.035897, 116.329582));
|
||||
// mWayPointList.add(new NaviLatLng(40.036396, 116.322166));
|
||||
|
||||
//顺义国展路线
|
||||
// mWayPointList.add(new NaviLatLng(40.097621,116.526495));
|
||||
@@ -290,7 +280,7 @@ public class AMapCustomView
|
||||
//导航全程光柱
|
||||
options.setTrafficBarEnabled(false);
|
||||
//指南针
|
||||
options.setCompassEnabled(false);
|
||||
// options.setCompassEnabled(false);
|
||||
options.setTilt((int) tilt);
|
||||
//自车车标
|
||||
options.setCarBitmap(BitmapFactory.decodeResource(this.getResources(), R.drawable.module_small_map_view_my_location_logo));
|
||||
@@ -705,42 +695,4 @@ public class AMapCustomView
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAutopilotTrajectory(@NotNull List<MessagePad.TrajectoryPoint> trajectoryInfos) {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据全路径获取起始点和经停点进行导航路线绘制
|
||||
* 自动驾驶启动后获得数据,获取全路径的具体时间要进行路测
|
||||
* 室内某个bag包自动驾驶启动8s后返回
|
||||
*/
|
||||
@Override
|
||||
public void onAutopilotRotting(@org.jetbrains.annotations.Nullable MessagePad.GlobalPathResp globalPathResp) {
|
||||
List list = globalPathResp.getWayPointsList();
|
||||
int minCount = 2;
|
||||
if (list.size() >= minCount) {
|
||||
Location sLocation = (Location) list.get(0);
|
||||
Location eLocation = (Location) list.get(list.size() - 1);
|
||||
mStartLatlng = new NaviLatLng(sLocation.getLongitude(), sLocation.getLatitude());
|
||||
mEndLatlng = new NaviLatLng(eLocation.getLongitude(), eLocation.getLatitude());
|
||||
sList.add(mStartLatlng);
|
||||
eList.add(mEndLatlng);
|
||||
for (int i = 1; i < list.size() - minCount; i++) {
|
||||
Location wayLoc = (Location) list.get(i);
|
||||
NaviLatLng way = new NaviLatLng(wayLoc.getLongitude(), wayLoc.getLatitude());
|
||||
mWayPointList.add(way);
|
||||
}
|
||||
}
|
||||
int strategy = 0;
|
||||
try {
|
||||
//再次强调,最后一个参数为true时代表多路径,否则代表单路径
|
||||
strategy = mAMapNavi.strategyConvert(true, false, false, false, false);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
Log.d(TAG, "calculateDriveRoute ADAS全局路径坐标:" + list.size() + "," + sList.toString() + "," + eList.toString() + "," + mWayPointList.toString());
|
||||
//指定路径绘制导航路线
|
||||
mAMapNavi.calculateDriveRoute(sList, eList, mWayPointList, strategy);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user