室内模拟导航路线,工控机返回数据验证,数据不精确待联调,数据反馈上线时间7月份

This commit is contained in:
liujing
2022-06-29 18:45:59 +08:00
parent 8a34380297
commit a04300a62d
3 changed files with 25 additions and 68 deletions

View File

@@ -5,26 +5,31 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_72">
<FrameLayout
android:id="@+id/fl_speed"
android:layout_width="@dimen/bus_ext_speed_width"
android:layout_height="@dimen/bus_ext_speed_height"
android:layout_marginLeft="@dimen/module_mogo_och_margin_left"
android:layout_marginTop="@dimen/module_mogo_och_margin_left"
android:background="@drawable/bus_yi_biao_pan_bg_nor"
android:elevation="@dimen/bus_dp_10"
android:padding="@dimen/bus_dp_20"
android:visibility="visible"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<FrameLayout
android:id="@+id/fl_speed"
android:layout_width="@dimen/dp_616"
android:layout_height="@dimen/dp_320"
android:layout_marginLeft="@dimen/dp_16"
android:layout_marginTop="@dimen/dp_40"
android:elevation="@dimen/bus_dp_10"
android:padding="@dimen/bus_dp_20"
android:visibility="visible"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent">
<com.mogo.och.bus.view.BusArcView
android:id="@+id/bus_arc"
android:layout_width="@dimen/bus_ext_arcView_width"
android:layout_height="@dimen/bus_ext_arcView_height"
android:layout_gravity="center" />
<!-- <com.mogo.och.bus.view.BusArcView-->
<!-- android:id="@+id/bus_arc"-->
<!-- android:layout_width="@dimen/bus_ext_arcView_width"-->
<!-- android:layout_height="@dimen/bus_ext_arcView_height"-->
<!-- android:layout_gravity="center" />-->
<com.mogo.eagle.core.function.hmi.ui.widget.TrafficDataView
android:id="@+id/bus_arc"
android:layout_width="@dimen/dp_616"
android:layout_height="@dimen/dp_320"
android:layout_gravity="center" />
</FrameLayout>
</FrameLayout>
<RelativeLayout
android:id="@+id/module_mogo_och_autopilot_status"

View File

@@ -822,7 +822,7 @@ class DebugSettingView @JvmOverloads constructor(
SharedPrefsMgr.getInstance(context)
.getString(MoGoConfig.AUTOPILOT_IP, FunctionBuildConfig.adasConnectIP)
etAutopilotIP.setText("172.30.10.10:41102")
etAutopilotIP.setText("192.168.1.")
etAutopilotIP.text?.let { etAutopilotIP.setSelection(it.length) }
//设置工控机IP
btnSetAutopilotIP.setOnClickListener {

View File

@@ -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);
}
}