提交 28281518 编写于 作者: S siyangy 提交者: Aaron Xiao

[Dreamview]: fix prediction display

上级 ba4f5ba0
......@@ -283,6 +283,13 @@ SimulationWorldService::SimulationWorldService(MapService *map_service,
if (routing_from_file) {
ReadRoutingFromFile(FLAGS_routing_response_file);
}
// Populate vehicle parameters.
Object *auto_driving_car = world_.mutable_auto_driving_car();
const auto &vehicle_param = VehicleConfigHelper::GetConfig().vehicle_param();
auto_driving_car->set_height(vehicle_param.height());
auto_driving_car->set_width(vehicle_param.width());
auto_driving_car->set_length(vehicle_param.length());
}
const SimulationWorld &SimulationWorldService::Update() {
......@@ -405,11 +412,6 @@ void SimulationWorldService::UpdateSimulationWorld(const Chassis &chassis) {
auto_driving_car->set_disengage_type(DeduceDisengageType(chassis));
const auto &vehicle_param = VehicleConfigHelper::GetConfig().vehicle_param();
auto_driving_car->set_height(vehicle_param.height());
auto_driving_car->set_width(vehicle_param.width());
auto_driving_car->set_length(vehicle_param.length());
// Updates the timestamp with the timestamp inside the chassis message header.
world_.set_timestamp_sec(
std::max(world_.timestamp_sec(), chassis.header().timestamp_sec()));
......
因为 它太大了无法显示 source diff 。你可以改为 查看blob
......@@ -31,8 +31,7 @@ export default class Prediction {
});
this.predCircles = [];
if (!STORE.options.showObstacles ||
(!STORE.options.showPredictionMajor && !STORE.options.showPredictionMinor)) {
if (!STORE.options.showPredictionMajor && !STORE.options.showPredictionMinor) {
return;
}
......@@ -46,6 +45,10 @@ export default class Prediction {
return;
}
if (!STORE.options['showObstacles' + _.upperFirst(_.camelCase(obj.type))]) {
return;
}
// Take the prediction line with highest probability as major, others as minor.
_.sortBy(predictions, o => o.probablity);
const predictionMajor = predictions[predictions.length - 1];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册