未验证 提交 b1bcba58 编写于 作者: V Vivian Lin 提交者: GitHub

Dreamview: story telling display (#10050)

上级 3585892d
...@@ -33,6 +33,7 @@ cc_library( ...@@ -33,6 +33,7 @@ cc_library(
"//modules/perception/proto:perception_proto", "//modules/perception/proto:perception_proto",
"//modules/planning/proto:planning_proto", "//modules/planning/proto:planning_proto",
"//modules/prediction/proto:prediction_proto", "//modules/prediction/proto:prediction_proto",
"//modules/storytelling/proto:story_proto",
"//third_party/json", "//third_party/json",
], ],
) )
......
...@@ -72,6 +72,7 @@ using apollo::relative_map::MapMsg; ...@@ -72,6 +72,7 @@ using apollo::relative_map::MapMsg;
using apollo::relative_map::NavigationInfo; using apollo::relative_map::NavigationInfo;
using apollo::routing::RoutingRequest; using apollo::routing::RoutingRequest;
using apollo::routing::RoutingResponse; using apollo::routing::RoutingResponse;
using apollo::storytelling::Stories;
using Json = nlohmann::json; using Json = nlohmann::json;
using ::google::protobuf::util::MessageToJsonString; using ::google::protobuf::util::MessageToJsonString;
...@@ -275,6 +276,7 @@ void SimulationWorldService::InitReaders() { ...@@ -275,6 +276,7 @@ void SimulationWorldService::InitReaders() {
navigation_reader_ = navigation_reader_ =
node_->CreateReader<NavigationInfo>(FLAGS_navigation_topic); node_->CreateReader<NavigationInfo>(FLAGS_navigation_topic);
relative_map_reader_ = node_->CreateReader<MapMsg>(FLAGS_relative_map_topic); relative_map_reader_ = node_->CreateReader<MapMsg>(FLAGS_relative_map_topic);
storytelling_reader_ = node_->CreateReader<Stories>(FLAGS_storytelling_topic);
drive_event_reader_ = node_->CreateReader<DriveEvent>( drive_event_reader_ = node_->CreateReader<DriveEvent>(
FLAGS_drive_event_topic, FLAGS_drive_event_topic,
...@@ -351,6 +353,7 @@ void SimulationWorldService::Update() { ...@@ -351,6 +353,7 @@ void SimulationWorldService::Update() {
// may not always be perfectly aligned and belong to the same frame. // may not always be perfectly aligned and belong to the same frame.
obj_map_.clear(); obj_map_.clear();
world_.clear_object(); world_.clear_object();
UpdateWithLatestObserved(storytelling_reader_.get());
UpdateWithLatestObserved(perception_obstacle_reader_.get()); UpdateWithLatestObserved(perception_obstacle_reader_.get());
UpdateWithLatestObserved(perception_traffic_light_reader_.get(), false); UpdateWithLatestObserved(perception_traffic_light_reader_.get(), false);
UpdateWithLatestObserved(prediction_obstacle_reader_.get()); UpdateWithLatestObserved(prediction_obstacle_reader_.get());
...@@ -524,6 +527,22 @@ void SimulationWorldService::UpdateSimulationWorld(const Chassis &chassis) { ...@@ -524,6 +527,22 @@ void SimulationWorldService::UpdateSimulationWorld(const Chassis &chassis) {
auto_driving_car->set_disengage_type(DeduceDisengageType(chassis)); auto_driving_car->set_disengage_type(DeduceDisengageType(chassis));
} }
template <>
void SimulationWorldService::UpdateSimulationWorld(const Stories &stories) {
world_.clear_stories();
auto *world_stories = world_.mutable_stories();
const google::protobuf::Descriptor *descriptor = stories.GetDescriptor();
const google::protobuf::Reflection *reflection = stories.GetReflection();
const int field_count = descriptor->field_count();
for (int i = 0; i < field_count; ++i) {
const google::protobuf::FieldDescriptor *field = descriptor->field(i);
if (field->name() != "header") {
(*world_stories)[field->name()] = reflection->HasField(stories, field);
}
}
}
Object &SimulationWorldService::CreateWorldObjectIfAbsent( Object &SimulationWorldService::CreateWorldObjectIfAbsent(
const PerceptionObstacle &obstacle) { const PerceptionObstacle &obstacle) {
const std::string id = std::to_string(obstacle.id()); const std::string id = std::to_string(obstacle.id());
......
...@@ -50,6 +50,7 @@ ...@@ -50,6 +50,7 @@
#include "modules/planning/proto/planning.pb.h" #include "modules/planning/proto/planning.pb.h"
#include "modules/planning/proto/planning_internal.pb.h" #include "modules/planning/proto/planning_internal.pb.h"
#include "modules/prediction/proto/prediction_obstacle.pb.h" #include "modules/prediction/proto/prediction_obstacle.pb.h"
#include "modules/storytelling/proto/story.pb.h"
/** /**
* @namespace apollo::dreamview * @namespace apollo::dreamview
...@@ -371,6 +372,8 @@ class SimulationWorldService { ...@@ -371,6 +372,8 @@ class SimulationWorldService {
routing_request_reader_; routing_request_reader_;
std::shared_ptr<cyber::Reader<apollo::routing::RoutingResponse>> std::shared_ptr<cyber::Reader<apollo::routing::RoutingResponse>>
routing_response_reader_; routing_response_reader_;
std::shared_ptr<cyber::Reader<apollo::storytelling::Stories>>
storytelling_reader_;
// Writers. // Writers.
std::shared_ptr<cyber::Writer<apollo::relative_map::NavigationInfo>> std::shared_ptr<cyber::Writer<apollo::relative_map::NavigationInfo>>
......
(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{474:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(a(4)),i=p(a(1)),l=p(a(2)),o=p(a(5)),r=p(a(6)),d=p(a(0)),u=p(a(475)),c=p(a(102)),f=p(a(20)),s=p(a(476));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){(0,i.default)(this,t);var a=(0,o.default)(this,(t.__proto__||(0,n.default)(t)).call(this,e));return a.state={routingView:!1},a.onClickHandler=a.onClickHandler.bind(a),a.scriptOnLoadHandler=a.scriptOnLoadHandler.bind(a),a}return(0,r.default)(t,e),(0,l.default)(t,[{key:"onClickHandler",value:function(){var e=!this.state.routingView;e?c.default.enableControls():c.default.disableControls(),this.setState({routingView:e})}},{key:"componentDidMount",value:function(){c.default.mapAPILoaded&&this.scriptOnLoadHandler()}},{key:"scriptOnLoadHandler",value:function(){a(477)("./"+PARAMETERS.navigation.map+"Adapter").then((function(e){var t=new(0,e.default);c.default.mapAPILoaded=!0,c.default.initialize(f.default,t),c.default.disableControls()}))}},{key:"componentWillUnmount",value:function(){c.default.reset()}},{key:"render",value:function(){var e=this.props,t=e.viewHeight,a=e.viewWidth;if("GoogleMap"!==PARAMETERS.navigation.map&&"BaiduMap"!==PARAMETERS.navigation.map)return console.error("Map API "+PARAMETERS.navigation.map+" is not supported."),null;if(!c.default.mapAPILoaded){var n=function(){console.log("Map API script loaded.")};"BaiduMap"===PARAMETERS.navigation.map?window.initMap=this.scriptOnLoadHandler:"GoogleMap"===PARAMETERS.navigation.map&&(n=this.scriptOnLoadHandler),(0,s.default)({url:PARAMETERS.navigation.mapAPiUrl,onLoad:n,onError:function(){console.log("Failed to load map api")}})}var i=0,l=0,o=a,r=t,f="maximizing";return this.state.routingView||(i=10,l=20,o=Math.min(.3*a,250),r=Math.min(.5*t,300),f="minimizing"),d.default.createElement("div",{displayname:"navigation",className:"navigation-view",style:{width:o,height:r,top:i,left:l}},d.default.createElement("div",{id:"map_canvas"}),d.default.createElement(u.default,{type:f,onClick:this.onClickHandler}))}}]),t}(d.default.Component);t.default=m},475:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(a(4)),i=u(a(1)),l=u(a(2)),o=u(a(5)),r=u(a(6)),d=u(a(0));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,i.default)(this,t),(0,o.default)(this,(t.__proto__||(0,n.default)(t)).apply(this,arguments))}return(0,r.default)(t,e),(0,l.default)(t,[{key:"getMaximizingIcon",value:function(){return d.default.createElement("svg",{viewBox:"0 0 20 20"},d.default.createElement("defs",null,d.default.createElement("path",{d:"M20 0L0 20h20V0z",id:"a"}),d.default.createElement("path",{d:"M11.53 18.5l-.03-7h7",id:"b"}),d.default.createElement("path",{d:"M12 12l7 7",id:"c"})),d.default.createElement("use",{xlinkHref:"#a",opacity:".6",fill:"#549BFF"}),d.default.createElement("use",{xlinkHref:"#b",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}),d.default.createElement("use",{xlinkHref:"#c",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}))}},{key:"getMinimizingIcon",value:function(){return d.default.createElement("svg",{viewBox:"0 0 20 20"},d.default.createElement("defs",null,d.default.createElement("path",{d:"M20 0L0 20h20V0z",id:"a"}),d.default.createElement("path",{d:"M18.47 11.5l.03 7h-7",id:"b"}),d.default.createElement("path",{d:"M11 11l7 7",id:"c"})),d.default.createElement("use",{xlinkHref:"#a",opacity:".6",fill:"#549BFF"}),d.default.createElement("use",{xlinkHref:"#b",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}),d.default.createElement("use",{xlinkHref:"#c",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}))}},{key:"render",value:function(){var e=this.props,t=e.type,a=e.onClick,n=null;switch(t){case"minimizing":n=this.getMinimizingIcon();break;case"maximizing":n=this.getMaximizingIcon()}return d.default.createElement("div",{className:"window-resize-control",onClick:a},n)}}]),t}(d.default.PureComponent);t.default=c},476:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.url,a=e.onLoad,n=e.onError,i=document.createElement("script");i.src=t,i.type="text/javascript",i.async=!0,i.onload=a,i.onerror=n,document.body.appendChild(i)}},477:function(e,t,a){var n={"./BaiduMapAdapter":[478,3],"./GoogleMapAdapter":[479,4]};function i(e){if(!a.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],i=t[0];return a.e(t[1]).then((function(){return a.t(i,7)}))}i.keys=function(){return Object.keys(n)},i.id=477,e.exports=i}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[2],{476:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=p(a(4)),i=p(a(1)),l=p(a(2)),o=p(a(5)),r=p(a(6)),d=p(a(0)),u=p(a(477)),c=p(a(102)),f=p(a(20)),s=p(a(478));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){(0,i.default)(this,t);var a=(0,o.default)(this,(t.__proto__||(0,n.default)(t)).call(this,e));return a.state={routingView:!1},a.onClickHandler=a.onClickHandler.bind(a),a.scriptOnLoadHandler=a.scriptOnLoadHandler.bind(a),a}return(0,r.default)(t,e),(0,l.default)(t,[{key:"onClickHandler",value:function(){var e=!this.state.routingView;e?c.default.enableControls():c.default.disableControls(),this.setState({routingView:e})}},{key:"componentDidMount",value:function(){c.default.mapAPILoaded&&this.scriptOnLoadHandler()}},{key:"scriptOnLoadHandler",value:function(){a(479)("./"+PARAMETERS.navigation.map+"Adapter").then((function(e){var t=new(0,e.default);c.default.mapAPILoaded=!0,c.default.initialize(f.default,t),c.default.disableControls()}))}},{key:"componentWillUnmount",value:function(){c.default.reset()}},{key:"render",value:function(){var e=this.props,t=e.viewHeight,a=e.viewWidth;if("GoogleMap"!==PARAMETERS.navigation.map&&"BaiduMap"!==PARAMETERS.navigation.map)return console.error("Map API "+PARAMETERS.navigation.map+" is not supported."),null;if(!c.default.mapAPILoaded){var n=function(){console.log("Map API script loaded.")};"BaiduMap"===PARAMETERS.navigation.map?window.initMap=this.scriptOnLoadHandler:"GoogleMap"===PARAMETERS.navigation.map&&(n=this.scriptOnLoadHandler),(0,s.default)({url:PARAMETERS.navigation.mapAPiUrl,onLoad:n,onError:function(){console.log("Failed to load map api")}})}var i=0,l=0,o=a,r=t,f="maximizing";return this.state.routingView||(i=10,l=20,o=Math.min(.3*a,250),r=Math.min(.5*t,300),f="minimizing"),d.default.createElement("div",{displayname:"navigation",className:"navigation-view",style:{width:o,height:r,top:i,left:l}},d.default.createElement("div",{id:"map_canvas"}),d.default.createElement(u.default,{type:f,onClick:this.onClickHandler}))}}]),t}(d.default.Component);t.default=m},477:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=u(a(4)),i=u(a(1)),l=u(a(2)),o=u(a(5)),r=u(a(6)),d=u(a(0));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,i.default)(this,t),(0,o.default)(this,(t.__proto__||(0,n.default)(t)).apply(this,arguments))}return(0,r.default)(t,e),(0,l.default)(t,[{key:"getMaximizingIcon",value:function(){return d.default.createElement("svg",{viewBox:"0 0 20 20"},d.default.createElement("defs",null,d.default.createElement("path",{d:"M20 0L0 20h20V0z",id:"a"}),d.default.createElement("path",{d:"M11.53 18.5l-.03-7h7",id:"b"}),d.default.createElement("path",{d:"M12 12l7 7",id:"c"})),d.default.createElement("use",{xlinkHref:"#a",opacity:".6",fill:"#549BFF"}),d.default.createElement("use",{xlinkHref:"#b",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}),d.default.createElement("use",{xlinkHref:"#c",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}))}},{key:"getMinimizingIcon",value:function(){return d.default.createElement("svg",{viewBox:"0 0 20 20"},d.default.createElement("defs",null,d.default.createElement("path",{d:"M20 0L0 20h20V0z",id:"a"}),d.default.createElement("path",{d:"M18.47 11.5l.03 7h-7",id:"b"}),d.default.createElement("path",{d:"M11 11l7 7",id:"c"})),d.default.createElement("use",{xlinkHref:"#a",opacity:".6",fill:"#549BFF"}),d.default.createElement("use",{xlinkHref:"#b",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}),d.default.createElement("use",{xlinkHref:"#c",fillOpacity:"0",stroke:"#006AFF",strokeWidth:"2"}))}},{key:"render",value:function(){var e=this.props,t=e.type,a=e.onClick,n=null;switch(t){case"minimizing":n=this.getMinimizingIcon();break;case"maximizing":n=this.getMaximizingIcon()}return d.default.createElement("div",{className:"window-resize-control",onClick:a},n)}}]),t}(d.default.PureComponent);t.default=c},478:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.url,a=e.onLoad,n=e.onError,i=document.createElement("script");i.src=t,i.type="text/javascript",i.async=!0,i.onload=a,i.onerror=n,document.body.appendChild(i)}},479:function(e,t,a){var n={"./BaiduMapAdapter":[480,3],"./GoogleMapAdapter":[481,4]};function i(e){if(!a.o(n,e))return Promise.resolve().then((function(){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=n[e],i=t[0];return a.e(t[1]).then((function(){return a.t(i,7)}))}i.keys=function(){return Object.keys(n)},i.id=479,e.exports=i}}]);
//# sourceMappingURL=2.bundle.js.map //# sourceMappingURL=2.bundle.js.map
\ No newline at end of file
{"version":3,"file":"2.bundle.js","sources":["webpack:///2.bundle.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{474:function(e,t,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=p(a(4)),i=p(a(1)),l=p(a(2)),o=p(a(5)),r=p(a(6)),d=p(a(0)),u=p(a(475)),c=p(a(102)),f=p(a(20)),s=p(a(476));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){(0,i.default)(this,t);var a=(0,o.default)(this,(t.__proto__||(0,n.default)(t)).call(this,e));return a.state={routingView:!1},a.onClickHandler=a.onClickHandler.bind(a),a.scriptOnLoadHandler=a.scriptOnLoadHandler.bind(a),a}return(0,r.default)(t,e),(0,l.default)(t,[{key:\"onClickHandler\",value:function(){var e=!this.state.routingView;e?c.default.enableControls():c.default.disableControls(),this.setState({routingView:e})}},{key:\"componentDidMount\",value:function(){c.default.mapAPILoaded&&this.scriptOnLoadHandler()}},{key:\"scriptOnLoadHandler\",value:function(){a(477)(\"./\"+PARAMETERS.navigation.map+\"Adapter\").then((function(e){var t=new(0,e.default);c.default.mapAPILoaded=!0,c.default.initialize(f.default,t),c.default.disableControls()}))}},{key:\"componentWillUnmount\",value:function(){c.default.reset()}},{key:\"render\",value:function(){var e=this.props,t=e.viewHeight,a=e.viewWidth;if(\"GoogleMap\"!==PARAMETERS.navigation.map&&\"BaiduMap\"!==PARAMETERS.navigation.map)return console.error(\"Map API \"+PARAMETERS.navigation.map+\" is not supported.\"),null;if(!c.default.mapAPILoaded){var n=function(){console.log(\"Map API script loaded.\")};\"BaiduMap\"===PARAMETERS.navigation.map?window.initMap=this.scriptOnLoadHandler:\"GoogleMap\"===PARAMETERS.navigation.map&&(n=this.scriptOnLoadHandler),(0,s.default)({url:PARAMETERS.navigation.mapAPiUrl,onLoad:n,onError:function(){console.log(\"Failed to load map api\")}})}var i=0,l=0,o=a,r=t,f=\"maximizing\";return this.state.routingView||(i=10,l=20,o=Math.min(.3*a,250),r=Math.min(.5*t,300),f=\"minimizing\"),d.default.createElement(\"div\",{displayname:\"navigation\",className:\"navigation-view\",style:{width:o,height:r,top:i,left:l}},d.default.createElement(\"div\",{id:\"map_canvas\"}),d.default.createElement(u.default,{type:f,onClick:this.onClickHandler}))}}]),t}(d.default.Component);t.default=m},475:function(e,t,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=u(a(4)),i=u(a(1)),l=u(a(2)),o=u(a(5)),r=u(a(6)),d=u(a(0));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,i.default)(this,t),(0,o.default)(this,(t.__proto__||(0,n.default)(t)).apply(this,arguments))}return(0,r.default)(t,e),(0,l.default)(t,[{key:\"getMaximizingIcon\",value:function(){return d.default.createElement(\"svg\",{viewBox:\"0 0 20 20\"},d.default.createElement(\"defs\",null,d.default.createElement(\"path\",{d:\"M20 0L0 20h20V0z\",id:\"a\"}),d.default.createElement(\"path\",{d:\"M11.53 18.5l-.03-7h7\",id:\"b\"}),d.default.createElement(\"path\",{d:\"M12 12l7 7\",id:\"c\"})),d.default.createElement(\"use\",{xlinkHref:\"#a\",opacity:\".6\",fill:\"#549BFF\"}),d.default.createElement(\"use\",{xlinkHref:\"#b\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}),d.default.createElement(\"use\",{xlinkHref:\"#c\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}))}},{key:\"getMinimizingIcon\",value:function(){return d.default.createElement(\"svg\",{viewBox:\"0 0 20 20\"},d.default.createElement(\"defs\",null,d.default.createElement(\"path\",{d:\"M20 0L0 20h20V0z\",id:\"a\"}),d.default.createElement(\"path\",{d:\"M18.47 11.5l.03 7h-7\",id:\"b\"}),d.default.createElement(\"path\",{d:\"M11 11l7 7\",id:\"c\"})),d.default.createElement(\"use\",{xlinkHref:\"#a\",opacity:\".6\",fill:\"#549BFF\"}),d.default.createElement(\"use\",{xlinkHref:\"#b\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}),d.default.createElement(\"use\",{xlinkHref:\"#c\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}))}},{key:\"render\",value:function(){var e=this.props,t=e.type,a=e.onClick,n=null;switch(t){case\"minimizing\":n=this.getMinimizingIcon();break;case\"maximizing\":n=this.getMaximizingIcon()}return d.default.createElement(\"div\",{className:\"window-resize-control\",onClick:a},n)}}]),t}(d.default.PureComponent);t.default=c},476:function(e,t,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=e.url,a=e.onLoad,n=e.onError,i=document.createElement(\"script\");i.src=t,i.type=\"text/javascript\",i.async=!0,i.onload=a,i.onerror=n,document.body.appendChild(i)}},477:function(e,t,a){var n={\"./BaiduMapAdapter\":[478,3],\"./GoogleMapAdapter\":[479,4]};function i(e){if(!a.o(n,e))return Promise.resolve().then((function(){var t=new Error(\"Cannot find module '\"+e+\"'\");throw t.code=\"MODULE_NOT_FOUND\",t}));var t=n[e],i=t[0];return a.e(t[1]).then((function(){return a.t(i,7)}))}i.keys=function(){return Object.keys(n)},i.id=477,e.exports=i}}]);"],"mappings":"AAAA","sourceRoot":""} {"version":3,"file":"2.bundle.js","sources":["webpack:///2.bundle.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[2],{476:function(e,t,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=p(a(4)),i=p(a(1)),l=p(a(2)),o=p(a(5)),r=p(a(6)),d=p(a(0)),u=p(a(477)),c=p(a(102)),f=p(a(20)),s=p(a(478));function p(e){return e&&e.__esModule?e:{default:e}}var m=function(e){function t(e){(0,i.default)(this,t);var a=(0,o.default)(this,(t.__proto__||(0,n.default)(t)).call(this,e));return a.state={routingView:!1},a.onClickHandler=a.onClickHandler.bind(a),a.scriptOnLoadHandler=a.scriptOnLoadHandler.bind(a),a}return(0,r.default)(t,e),(0,l.default)(t,[{key:\"onClickHandler\",value:function(){var e=!this.state.routingView;e?c.default.enableControls():c.default.disableControls(),this.setState({routingView:e})}},{key:\"componentDidMount\",value:function(){c.default.mapAPILoaded&&this.scriptOnLoadHandler()}},{key:\"scriptOnLoadHandler\",value:function(){a(479)(\"./\"+PARAMETERS.navigation.map+\"Adapter\").then((function(e){var t=new(0,e.default);c.default.mapAPILoaded=!0,c.default.initialize(f.default,t),c.default.disableControls()}))}},{key:\"componentWillUnmount\",value:function(){c.default.reset()}},{key:\"render\",value:function(){var e=this.props,t=e.viewHeight,a=e.viewWidth;if(\"GoogleMap\"!==PARAMETERS.navigation.map&&\"BaiduMap\"!==PARAMETERS.navigation.map)return console.error(\"Map API \"+PARAMETERS.navigation.map+\" is not supported.\"),null;if(!c.default.mapAPILoaded){var n=function(){console.log(\"Map API script loaded.\")};\"BaiduMap\"===PARAMETERS.navigation.map?window.initMap=this.scriptOnLoadHandler:\"GoogleMap\"===PARAMETERS.navigation.map&&(n=this.scriptOnLoadHandler),(0,s.default)({url:PARAMETERS.navigation.mapAPiUrl,onLoad:n,onError:function(){console.log(\"Failed to load map api\")}})}var i=0,l=0,o=a,r=t,f=\"maximizing\";return this.state.routingView||(i=10,l=20,o=Math.min(.3*a,250),r=Math.min(.5*t,300),f=\"minimizing\"),d.default.createElement(\"div\",{displayname:\"navigation\",className:\"navigation-view\",style:{width:o,height:r,top:i,left:l}},d.default.createElement(\"div\",{id:\"map_canvas\"}),d.default.createElement(u.default,{type:f,onClick:this.onClickHandler}))}}]),t}(d.default.Component);t.default=m},477:function(e,t,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var n=u(a(4)),i=u(a(1)),l=u(a(2)),o=u(a(5)),r=u(a(6)),d=u(a(0));function u(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(){return(0,i.default)(this,t),(0,o.default)(this,(t.__proto__||(0,n.default)(t)).apply(this,arguments))}return(0,r.default)(t,e),(0,l.default)(t,[{key:\"getMaximizingIcon\",value:function(){return d.default.createElement(\"svg\",{viewBox:\"0 0 20 20\"},d.default.createElement(\"defs\",null,d.default.createElement(\"path\",{d:\"M20 0L0 20h20V0z\",id:\"a\"}),d.default.createElement(\"path\",{d:\"M11.53 18.5l-.03-7h7\",id:\"b\"}),d.default.createElement(\"path\",{d:\"M12 12l7 7\",id:\"c\"})),d.default.createElement(\"use\",{xlinkHref:\"#a\",opacity:\".6\",fill:\"#549BFF\"}),d.default.createElement(\"use\",{xlinkHref:\"#b\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}),d.default.createElement(\"use\",{xlinkHref:\"#c\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}))}},{key:\"getMinimizingIcon\",value:function(){return d.default.createElement(\"svg\",{viewBox:\"0 0 20 20\"},d.default.createElement(\"defs\",null,d.default.createElement(\"path\",{d:\"M20 0L0 20h20V0z\",id:\"a\"}),d.default.createElement(\"path\",{d:\"M18.47 11.5l.03 7h-7\",id:\"b\"}),d.default.createElement(\"path\",{d:\"M11 11l7 7\",id:\"c\"})),d.default.createElement(\"use\",{xlinkHref:\"#a\",opacity:\".6\",fill:\"#549BFF\"}),d.default.createElement(\"use\",{xlinkHref:\"#b\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}),d.default.createElement(\"use\",{xlinkHref:\"#c\",fillOpacity:\"0\",stroke:\"#006AFF\",strokeWidth:\"2\"}))}},{key:\"render\",value:function(){var e=this.props,t=e.type,a=e.onClick,n=null;switch(t){case\"minimizing\":n=this.getMinimizingIcon();break;case\"maximizing\":n=this.getMaximizingIcon()}return d.default.createElement(\"div\",{className:\"window-resize-control\",onClick:a},n)}}]),t}(d.default.PureComponent);t.default=c},478:function(e,t,a){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=function(e){var t=e.url,a=e.onLoad,n=e.onError,i=document.createElement(\"script\");i.src=t,i.type=\"text/javascript\",i.async=!0,i.onload=a,i.onerror=n,document.body.appendChild(i)}},479:function(e,t,a){var n={\"./BaiduMapAdapter\":[480,3],\"./GoogleMapAdapter\":[481,4]};function i(e){if(!a.o(n,e))return Promise.resolve().then((function(){var t=new Error(\"Cannot find module '\"+e+\"'\");throw t.code=\"MODULE_NOT_FOUND\",t}));var t=n[e],i=t[0];return a.e(t[1]).then((function(){return a.t(i,7)}))}i.keys=function(){return Object.keys(n)},i.id=479,e.exports=i}}]);"],"mappings":"AAAA","sourceRoot":""}
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{478:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=d(n(4)),o=d(n(5)),i=d(n(6)),l=d(n(59)),r=d(n(1)),s=d(n(2)),u=n(172);function d(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(){(0,r.default)(this,e),this.map=null,this.controls=[],this.initializedCenter=!1}return(0,s.default)(e,[{key:"isInitialized",value:function(){return null!==this.map}},{key:"loadMap",value:function(e,t){this.map=new BMap.Map(t,{enableMapClick:!1}),this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.MapTypeControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_SMALL})),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,type:BMAP_NAVIGATION_CONTROL_SMALL,enableGeolocation:!1}))}},{key:"setCenter",value:function(e){this.initializedCenter?this.map.setCenter(e):(this.map.centerAndZoom(e,19),this.initializedCenter=!0)}},{key:"setZoom",value:function(e){this.map.setZoom(e)}},{key:"addEventHandler",value:function(e,t){this.map.addEventListener(e,(function(e){var n=e.point;t(n)}))}},{key:"createPoint",value:function(e){var t=e.lat,n=e.lng;return new BMap.Point(n,t)}},{key:"createMarker",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=null;t&&(a=new BMap.Label(t,{point:e,offset:new BMap.Size(15,-15)}));var o=new BMap.Marker(e,{label:a,enableDragging:n,rotation:5});return o.setLabel(a),this.map.addOverlay(o),o}},{key:"createPolyline",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o={geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:a},i=new BMap.Polyline(e,o);return this.map.addOverlay(i),i}},{key:"createControl",value:function(e){var t=e.text,n=e.tip,a=e.color,o=e.offsetX,i=e.offsetY,l=e.onClickHandler,r=new p(t,n,a,new BMap.Size(o,i),l);this.map.addControl(r),this.controls.push(r)}},{key:"disableControls",value:function(){var e=this;this.controls.forEach((function(t){e.map.removeControl(t)}))}},{key:"enableControls",value:function(){var e=this;this.controls.forEach((function(t){e.map.addControl(t)}))}},{key:"getMarkerPosition",value:function(e){return e.getPosition()}},{key:"updatePolyline",value:function(e,t){e.setPath(t)}},{key:"removePolyline",value:function(e){this.map.removeOverlay(e)}},{key:"applyCoordinateOffset",value:function(e){var t=(0,l.default)(e,2),n=t[0],a=t[1];return(0,u.WGS84ToBD09LL)(n,a)}}]),e}();t.default=c;var p=function(e){function t(e,n,i,l,s){var u;(0,r.default)(this,t);for(var d=arguments.length,c=Array(d>5?d-5:0),p=5;p<d;p++)c[p-5]=arguments[p];var f=(0,o.default)(this,(u=t.__proto__||(0,a.default)(t)).call.apply(u,[this].concat(c)));return f.defaultAnchor=BMAP_ANCHOR_TOP_LEFT,f.defaultOffset=l,f.onClickHandler=s,f.title=n,f.text=e,f.backgroundColor=i,f}return(0,i.default)(t,e),(0,s.default)(t,[{key:"initialize",value:function(e){var t=this,n=document.createElement("div"),a=document.createElement("div");a.style.backgroundColor=this.backgroundColor,a.style.border="2px solid #fff",a.style.borderRadius="3px",a.style.boxShadow="0 2px 6px rgba(0,0,0,.3)",a.style.cursor="pointer",a.style.marginBottom="22px",a.style.textAlign="center",a.title=this.title,n.appendChild(a);var o=document.createElement("div");return o.style.color="rgb(25,25,25)",o.style.fontFamily="Roboto,Arial,sans-serif",o.style.fontSize="16px",o.style.lineHeight="38px",o.style.paddingLeft="5px",o.style.paddingRight="5px",o.innerHTML=this.text,a.appendChild(o),e.getContainer().appendChild(n),a.addEventListener("click",(function(){t.onClickHandler(o)})),n}}]),t}(BMap.Control)}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[3],{480:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=d(n(4)),o=d(n(5)),i=d(n(6)),l=d(n(40)),r=d(n(1)),s=d(n(2)),u=n(173);function d(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(){(0,r.default)(this,e),this.map=null,this.controls=[],this.initializedCenter=!1}return(0,s.default)(e,[{key:"isInitialized",value:function(){return null!==this.map}},{key:"loadMap",value:function(e,t){this.map=new BMap.Map(t,{enableMapClick:!1}),this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.MapTypeControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_SMALL})),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,type:BMAP_NAVIGATION_CONTROL_SMALL,enableGeolocation:!1}))}},{key:"setCenter",value:function(e){this.initializedCenter?this.map.setCenter(e):(this.map.centerAndZoom(e,19),this.initializedCenter=!0)}},{key:"setZoom",value:function(e){this.map.setZoom(e)}},{key:"addEventHandler",value:function(e,t){this.map.addEventListener(e,(function(e){var n=e.point;t(n)}))}},{key:"createPoint",value:function(e){var t=e.lat,n=e.lng;return new BMap.Point(n,t)}},{key:"createMarker",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=null;t&&(a=new BMap.Label(t,{point:e,offset:new BMap.Size(15,-15)}));var o=new BMap.Marker(e,{label:a,enableDragging:n,rotation:5});return o.setLabel(a),this.map.addOverlay(o),o}},{key:"createPolyline",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o={geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:a},i=new BMap.Polyline(e,o);return this.map.addOverlay(i),i}},{key:"createControl",value:function(e){var t=e.text,n=e.tip,a=e.color,o=e.offsetX,i=e.offsetY,l=e.onClickHandler,r=new p(t,n,a,new BMap.Size(o,i),l);this.map.addControl(r),this.controls.push(r)}},{key:"disableControls",value:function(){var e=this;this.controls.forEach((function(t){e.map.removeControl(t)}))}},{key:"enableControls",value:function(){var e=this;this.controls.forEach((function(t){e.map.addControl(t)}))}},{key:"getMarkerPosition",value:function(e){return e.getPosition()}},{key:"updatePolyline",value:function(e,t){e.setPath(t)}},{key:"removePolyline",value:function(e){this.map.removeOverlay(e)}},{key:"applyCoordinateOffset",value:function(e){var t=(0,l.default)(e,2),n=t[0],a=t[1];return(0,u.WGS84ToBD09LL)(n,a)}}]),e}();t.default=c;var p=function(e){function t(e,n,i,l,s){var u;(0,r.default)(this,t);for(var d=arguments.length,c=Array(d>5?d-5:0),p=5;p<d;p++)c[p-5]=arguments[p];var f=(0,o.default)(this,(u=t.__proto__||(0,a.default)(t)).call.apply(u,[this].concat(c)));return f.defaultAnchor=BMAP_ANCHOR_TOP_LEFT,f.defaultOffset=l,f.onClickHandler=s,f.title=n,f.text=e,f.backgroundColor=i,f}return(0,i.default)(t,e),(0,s.default)(t,[{key:"initialize",value:function(e){var t=this,n=document.createElement("div"),a=document.createElement("div");a.style.backgroundColor=this.backgroundColor,a.style.border="2px solid #fff",a.style.borderRadius="3px",a.style.boxShadow="0 2px 6px rgba(0,0,0,.3)",a.style.cursor="pointer",a.style.marginBottom="22px",a.style.textAlign="center",a.title=this.title,n.appendChild(a);var o=document.createElement("div");return o.style.color="rgb(25,25,25)",o.style.fontFamily="Roboto,Arial,sans-serif",o.style.fontSize="16px",o.style.lineHeight="38px",o.style.paddingLeft="5px",o.style.paddingRight="5px",o.innerHTML=this.text,a.appendChild(o),e.getContainer().appendChild(n),a.addEventListener("click",(function(){t.onClickHandler(o)})),n}}]),t}(BMap.Control)}}]);
//# sourceMappingURL=3.bundle.js.map //# sourceMappingURL=3.bundle.js.map
\ No newline at end of file
{"version":3,"file":"3.bundle.js","sources":["webpack:///3.bundle.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{478:function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var a=d(n(4)),o=d(n(5)),i=d(n(6)),l=d(n(59)),r=d(n(1)),s=d(n(2)),u=n(172);function d(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(){(0,r.default)(this,e),this.map=null,this.controls=[],this.initializedCenter=!1}return(0,s.default)(e,[{key:\"isInitialized\",value:function(){return null!==this.map}},{key:\"loadMap\",value:function(e,t){this.map=new BMap.Map(t,{enableMapClick:!1}),this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.MapTypeControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_SMALL})),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,type:BMAP_NAVIGATION_CONTROL_SMALL,enableGeolocation:!1}))}},{key:\"setCenter\",value:function(e){this.initializedCenter?this.map.setCenter(e):(this.map.centerAndZoom(e,19),this.initializedCenter=!0)}},{key:\"setZoom\",value:function(e){this.map.setZoom(e)}},{key:\"addEventHandler\",value:function(e,t){this.map.addEventListener(e,(function(e){var n=e.point;t(n)}))}},{key:\"createPoint\",value:function(e){var t=e.lat,n=e.lng;return new BMap.Point(n,t)}},{key:\"createMarker\",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=null;t&&(a=new BMap.Label(t,{point:e,offset:new BMap.Size(15,-15)}));var o=new BMap.Marker(e,{label:a,enableDragging:n,rotation:5});return o.setLabel(a),this.map.addOverlay(o),o}},{key:\"createPolyline\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o={geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:a},i=new BMap.Polyline(e,o);return this.map.addOverlay(i),i}},{key:\"createControl\",value:function(e){var t=e.text,n=e.tip,a=e.color,o=e.offsetX,i=e.offsetY,l=e.onClickHandler,r=new p(t,n,a,new BMap.Size(o,i),l);this.map.addControl(r),this.controls.push(r)}},{key:\"disableControls\",value:function(){var e=this;this.controls.forEach((function(t){e.map.removeControl(t)}))}},{key:\"enableControls\",value:function(){var e=this;this.controls.forEach((function(t){e.map.addControl(t)}))}},{key:\"getMarkerPosition\",value:function(e){return e.getPosition()}},{key:\"updatePolyline\",value:function(e,t){e.setPath(t)}},{key:\"removePolyline\",value:function(e){this.map.removeOverlay(e)}},{key:\"applyCoordinateOffset\",value:function(e){var t=(0,l.default)(e,2),n=t[0],a=t[1];return(0,u.WGS84ToBD09LL)(n,a)}}]),e}();t.default=c;var p=function(e){function t(e,n,i,l,s){var u;(0,r.default)(this,t);for(var d=arguments.length,c=Array(d>5?d-5:0),p=5;p<d;p++)c[p-5]=arguments[p];var f=(0,o.default)(this,(u=t.__proto__||(0,a.default)(t)).call.apply(u,[this].concat(c)));return f.defaultAnchor=BMAP_ANCHOR_TOP_LEFT,f.defaultOffset=l,f.onClickHandler=s,f.title=n,f.text=e,f.backgroundColor=i,f}return(0,i.default)(t,e),(0,s.default)(t,[{key:\"initialize\",value:function(e){var t=this,n=document.createElement(\"div\"),a=document.createElement(\"div\");a.style.backgroundColor=this.backgroundColor,a.style.border=\"2px solid #fff\",a.style.borderRadius=\"3px\",a.style.boxShadow=\"0 2px 6px rgba(0,0,0,.3)\",a.style.cursor=\"pointer\",a.style.marginBottom=\"22px\",a.style.textAlign=\"center\",a.title=this.title,n.appendChild(a);var o=document.createElement(\"div\");return o.style.color=\"rgb(25,25,25)\",o.style.fontFamily=\"Roboto,Arial,sans-serif\",o.style.fontSize=\"16px\",o.style.lineHeight=\"38px\",o.style.paddingLeft=\"5px\",o.style.paddingRight=\"5px\",o.innerHTML=this.text,a.appendChild(o),e.getContainer().appendChild(n),a.addEventListener(\"click\",(function(){t.onClickHandler(o)})),n}}]),t}(BMap.Control)}}]);"],"mappings":"AAAA","sourceRoot":""} {"version":3,"file":"3.bundle.js","sources":["webpack:///3.bundle.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{480:function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var a=d(n(4)),o=d(n(5)),i=d(n(6)),l=d(n(40)),r=d(n(1)),s=d(n(2)),u=n(173);function d(e){return e&&e.__esModule?e:{default:e}}var c=function(){function e(){(0,r.default)(this,e),this.map=null,this.controls=[],this.initializedCenter=!1}return(0,s.default)(e,[{key:\"isInitialized\",value:function(){return null!==this.map}},{key:\"loadMap\",value:function(e,t){this.map=new BMap.Map(t,{enableMapClick:!1}),this.map.enableScrollWheelZoom(),this.map.addControl(new BMap.MapTypeControl({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_SMALL})),this.map.addControl(new BMap.NavigationControl({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,type:BMAP_NAVIGATION_CONTROL_SMALL,enableGeolocation:!1}))}},{key:\"setCenter\",value:function(e){this.initializedCenter?this.map.setCenter(e):(this.map.centerAndZoom(e,19),this.initializedCenter=!0)}},{key:\"setZoom\",value:function(e){this.map.setZoom(e)}},{key:\"addEventHandler\",value:function(e,t){this.map.addEventListener(e,(function(e){var n=e.point;t(n)}))}},{key:\"createPoint\",value:function(e){var t=e.lat,n=e.lng;return new BMap.Point(n,t)}},{key:\"createMarker\",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=null;t&&(a=new BMap.Label(t,{point:e,offset:new BMap.Size(15,-15)}));var o=new BMap.Marker(e,{label:a,enableDragging:n,rotation:5});return o.setLabel(a),this.map.addOverlay(o),o}},{key:\"createPolyline\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,o={geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:a},i=new BMap.Polyline(e,o);return this.map.addOverlay(i),i}},{key:\"createControl\",value:function(e){var t=e.text,n=e.tip,a=e.color,o=e.offsetX,i=e.offsetY,l=e.onClickHandler,r=new p(t,n,a,new BMap.Size(o,i),l);this.map.addControl(r),this.controls.push(r)}},{key:\"disableControls\",value:function(){var e=this;this.controls.forEach((function(t){e.map.removeControl(t)}))}},{key:\"enableControls\",value:function(){var e=this;this.controls.forEach((function(t){e.map.addControl(t)}))}},{key:\"getMarkerPosition\",value:function(e){return e.getPosition()}},{key:\"updatePolyline\",value:function(e,t){e.setPath(t)}},{key:\"removePolyline\",value:function(e){this.map.removeOverlay(e)}},{key:\"applyCoordinateOffset\",value:function(e){var t=(0,l.default)(e,2),n=t[0],a=t[1];return(0,u.WGS84ToBD09LL)(n,a)}}]),e}();t.default=c;var p=function(e){function t(e,n,i,l,s){var u;(0,r.default)(this,t);for(var d=arguments.length,c=Array(d>5?d-5:0),p=5;p<d;p++)c[p-5]=arguments[p];var f=(0,o.default)(this,(u=t.__proto__||(0,a.default)(t)).call.apply(u,[this].concat(c)));return f.defaultAnchor=BMAP_ANCHOR_TOP_LEFT,f.defaultOffset=l,f.onClickHandler=s,f.title=n,f.text=e,f.backgroundColor=i,f}return(0,i.default)(t,e),(0,s.default)(t,[{key:\"initialize\",value:function(e){var t=this,n=document.createElement(\"div\"),a=document.createElement(\"div\");a.style.backgroundColor=this.backgroundColor,a.style.border=\"2px solid #fff\",a.style.borderRadius=\"3px\",a.style.boxShadow=\"0 2px 6px rgba(0,0,0,.3)\",a.style.cursor=\"pointer\",a.style.marginBottom=\"22px\",a.style.textAlign=\"center\",a.title=this.title,n.appendChild(a);var o=document.createElement(\"div\");return o.style.color=\"rgb(25,25,25)\",o.style.fontFamily=\"Roboto,Arial,sans-serif\",o.style.fontSize=\"16px\",o.style.lineHeight=\"38px\",o.style.paddingLeft=\"5px\",o.style.paddingRight=\"5px\",o.innerHTML=this.text,a.appendChild(o),e.getContainer().appendChild(n),a.addEventListener(\"click\",(function(){t.onClickHandler(o)})),n}}]),t}(BMap.Control)}}]);"],"mappings":"AAAA","sourceRoot":""}
\ No newline at end of file \ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{479:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(59)),l=r(n(1)),a=r(n(2)),i=n(172);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,l.default)(this,e),this.map=null,this.controls=[]}return(0,a.default)(e,[{key:"isInitialized",value:function(){return null!==this.map}},{key:"loadMap",value:function(e,t){var n={center:e,zoom:20,mapTypeId:google.maps.MapTypeId.ROADMAP,fullscreenControl:!1};this.map=new google.maps.Map(document.getElementById(t),n)}},{key:"setCenter",value:function(e){this.map.setCenter(e)}},{key:"setZoom",value:function(e){this.map.setZoom(e)}},{key:"addEventHandler",value:function(e,t){google.maps.event.addListener(this.map,e,(function(e){var n=e.latLng;t(n)}))}},{key:"createPoint",value:function(e){var t=e.lat,n=e.lng;return new google.maps.LatLng(t,n)}},{key:"createMarker",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=new google.maps.Marker({position:e,label:t,draggable:n,map:this.map});return o}},{key:"createPolyline",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,l=new google.maps.Polyline({path:e,geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:o,map:this.map});return l}},{key:"createControl",value:function(e){var t=e.text,n=e.tip,o=e.color,l=(e.offsetX,e.offsetY,e.onClickHandler),a=document.createElement("div"),i=document.createElement("div");i.style.backgroundColor=o,i.style.border="2px solid #fff",i.style.borderRadius="3px",i.style.boxShadow="0 2px 6px rgba(0,0,0,.3)",i.style.cursor="pointer",i.style.marginBottom="22px",i.style.textAlign="center",i.title=n,a.appendChild(i);var r=document.createElement("div");r.style.color="rgb(25,25,25)",r.style.fontFamily="Roboto,Arial,sans-serif",r.style.fontSize="16px",r.style.lineHeight="38px",r.style.paddingLeft="5px",r.style.paddingRight="5px",r.innerHTML=t,i.appendChild(r),i.addEventListener("click",(function(){l(r)})),this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(a),this.controls.push(a)}},{key:"disableControls",value:function(){this.controls.forEach((function(e){e.style.display="none"}))}},{key:"enableControls",value:function(){this.controls.forEach((function(e){e.style.display="block"}))}},{key:"getMarkerPosition",value:function(e){var t=e.getPosition();return{lat:t.lat(),lng:t.lng()}}},{key:"updatePolyline",value:function(e,t){e.setPath(t)}},{key:"removePolyline",value:function(e){e.setMap(null)}},{key:"applyCoordinateOffset",value:function(e){var t=(0,o.default)(e,2),n=t[0],l=t[1];return(0,i.WGS84ToGCJ02)(n,l)}}]),e}();t.default=s}}]); (window.webpackJsonp=window.webpackJsonp||[]).push([[4],{481:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(40)),l=r(n(1)),a=r(n(2)),i=n(173);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,l.default)(this,e),this.map=null,this.controls=[]}return(0,a.default)(e,[{key:"isInitialized",value:function(){return null!==this.map}},{key:"loadMap",value:function(e,t){var n={center:e,zoom:20,mapTypeId:google.maps.MapTypeId.ROADMAP,fullscreenControl:!1};this.map=new google.maps.Map(document.getElementById(t),n)}},{key:"setCenter",value:function(e){this.map.setCenter(e)}},{key:"setZoom",value:function(e){this.map.setZoom(e)}},{key:"addEventHandler",value:function(e,t){google.maps.event.addListener(this.map,e,(function(e){var n=e.latLng;t(n)}))}},{key:"createPoint",value:function(e){var t=e.lat,n=e.lng;return new google.maps.LatLng(t,n)}},{key:"createMarker",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=new google.maps.Marker({position:e,label:t,draggable:n,map:this.map});return o}},{key:"createPolyline",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,l=new google.maps.Polyline({path:e,geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:o,map:this.map});return l}},{key:"createControl",value:function(e){var t=e.text,n=e.tip,o=e.color,l=(e.offsetX,e.offsetY,e.onClickHandler),a=document.createElement("div"),i=document.createElement("div");i.style.backgroundColor=o,i.style.border="2px solid #fff",i.style.borderRadius="3px",i.style.boxShadow="0 2px 6px rgba(0,0,0,.3)",i.style.cursor="pointer",i.style.marginBottom="22px",i.style.textAlign="center",i.title=n,a.appendChild(i);var r=document.createElement("div");r.style.color="rgb(25,25,25)",r.style.fontFamily="Roboto,Arial,sans-serif",r.style.fontSize="16px",r.style.lineHeight="38px",r.style.paddingLeft="5px",r.style.paddingRight="5px",r.innerHTML=t,i.appendChild(r),i.addEventListener("click",(function(){l(r)})),this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(a),this.controls.push(a)}},{key:"disableControls",value:function(){this.controls.forEach((function(e){e.style.display="none"}))}},{key:"enableControls",value:function(){this.controls.forEach((function(e){e.style.display="block"}))}},{key:"getMarkerPosition",value:function(e){var t=e.getPosition();return{lat:t.lat(),lng:t.lng()}}},{key:"updatePolyline",value:function(e,t){e.setPath(t)}},{key:"removePolyline",value:function(e){e.setMap(null)}},{key:"applyCoordinateOffset",value:function(e){var t=(0,o.default)(e,2),n=t[0],l=t[1];return(0,i.WGS84ToGCJ02)(n,l)}}]),e}();t.default=s}}]);
//# sourceMappingURL=4.bundle.js.map //# sourceMappingURL=4.bundle.js.map
\ No newline at end of file
{"version":3,"file":"4.bundle.js","sources":["webpack:///4.bundle.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{479:function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var o=r(n(59)),l=r(n(1)),a=r(n(2)),i=n(172);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,l.default)(this,e),this.map=null,this.controls=[]}return(0,a.default)(e,[{key:\"isInitialized\",value:function(){return null!==this.map}},{key:\"loadMap\",value:function(e,t){var n={center:e,zoom:20,mapTypeId:google.maps.MapTypeId.ROADMAP,fullscreenControl:!1};this.map=new google.maps.Map(document.getElementById(t),n)}},{key:\"setCenter\",value:function(e){this.map.setCenter(e)}},{key:\"setZoom\",value:function(e){this.map.setZoom(e)}},{key:\"addEventHandler\",value:function(e,t){google.maps.event.addListener(this.map,e,(function(e){var n=e.latLng;t(n)}))}},{key:\"createPoint\",value:function(e){var t=e.lat,n=e.lng;return new google.maps.LatLng(t,n)}},{key:\"createMarker\",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=new google.maps.Marker({position:e,label:t,draggable:n,map:this.map});return o}},{key:\"createPolyline\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,l=new google.maps.Polyline({path:e,geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:o,map:this.map});return l}},{key:\"createControl\",value:function(e){var t=e.text,n=e.tip,o=e.color,l=(e.offsetX,e.offsetY,e.onClickHandler),a=document.createElement(\"div\"),i=document.createElement(\"div\");i.style.backgroundColor=o,i.style.border=\"2px solid #fff\",i.style.borderRadius=\"3px\",i.style.boxShadow=\"0 2px 6px rgba(0,0,0,.3)\",i.style.cursor=\"pointer\",i.style.marginBottom=\"22px\",i.style.textAlign=\"center\",i.title=n,a.appendChild(i);var r=document.createElement(\"div\");r.style.color=\"rgb(25,25,25)\",r.style.fontFamily=\"Roboto,Arial,sans-serif\",r.style.fontSize=\"16px\",r.style.lineHeight=\"38px\",r.style.paddingLeft=\"5px\",r.style.paddingRight=\"5px\",r.innerHTML=t,i.appendChild(r),i.addEventListener(\"click\",(function(){l(r)})),this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(a),this.controls.push(a)}},{key:\"disableControls\",value:function(){this.controls.forEach((function(e){e.style.display=\"none\"}))}},{key:\"enableControls\",value:function(){this.controls.forEach((function(e){e.style.display=\"block\"}))}},{key:\"getMarkerPosition\",value:function(e){var t=e.getPosition();return{lat:t.lat(),lng:t.lng()}}},{key:\"updatePolyline\",value:function(e,t){e.setPath(t)}},{key:\"removePolyline\",value:function(e){e.setMap(null)}},{key:\"applyCoordinateOffset\",value:function(e){var t=(0,o.default)(e,2),n=t[0],l=t[1];return(0,i.WGS84ToGCJ02)(n,l)}}]),e}();t.default=s}}]);"],"mappings":"AAAA","sourceRoot":""} {"version":3,"file":"4.bundle.js","sources":["webpack:///4.bundle.js"],"sourcesContent":["(window.webpackJsonp=window.webpackJsonp||[]).push([[4],{481:function(e,t,n){\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.default=void 0;var o=r(n(40)),l=r(n(1)),a=r(n(2)),i=n(173);function r(e){return e&&e.__esModule?e:{default:e}}var s=function(){function e(){(0,l.default)(this,e),this.map=null,this.controls=[]}return(0,a.default)(e,[{key:\"isInitialized\",value:function(){return null!==this.map}},{key:\"loadMap\",value:function(e,t){var n={center:e,zoom:20,mapTypeId:google.maps.MapTypeId.ROADMAP,fullscreenControl:!1};this.map=new google.maps.Map(document.getElementById(t),n)}},{key:\"setCenter\",value:function(e){this.map.setCenter(e)}},{key:\"setZoom\",value:function(e){this.map.setZoom(e)}},{key:\"addEventHandler\",value:function(e,t){google.maps.event.addListener(this.map,e,(function(e){var n=e.latLng;t(n)}))}},{key:\"createPoint\",value:function(e){var t=e.lat,n=e.lng;return new google.maps.LatLng(t,n)}},{key:\"createMarker\",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],o=new google.maps.Marker({position:e,label:t,draggable:n,map:this.map});return o}},{key:\"createPolyline\",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,l=new google.maps.Polyline({path:e,geodesic:!0,strokeColor:t,strokeOpacity:n,strokeWeight:o,map:this.map});return l}},{key:\"createControl\",value:function(e){var t=e.text,n=e.tip,o=e.color,l=(e.offsetX,e.offsetY,e.onClickHandler),a=document.createElement(\"div\"),i=document.createElement(\"div\");i.style.backgroundColor=o,i.style.border=\"2px solid #fff\",i.style.borderRadius=\"3px\",i.style.boxShadow=\"0 2px 6px rgba(0,0,0,.3)\",i.style.cursor=\"pointer\",i.style.marginBottom=\"22px\",i.style.textAlign=\"center\",i.title=n,a.appendChild(i);var r=document.createElement(\"div\");r.style.color=\"rgb(25,25,25)\",r.style.fontFamily=\"Roboto,Arial,sans-serif\",r.style.fontSize=\"16px\",r.style.lineHeight=\"38px\",r.style.paddingLeft=\"5px\",r.style.paddingRight=\"5px\",r.innerHTML=t,i.appendChild(r),i.addEventListener(\"click\",(function(){l(r)})),this.map.controls[google.maps.ControlPosition.TOP_LEFT].push(a),this.controls.push(a)}},{key:\"disableControls\",value:function(){this.controls.forEach((function(e){e.style.display=\"none\"}))}},{key:\"enableControls\",value:function(){this.controls.forEach((function(e){e.style.display=\"block\"}))}},{key:\"getMarkerPosition\",value:function(e){var t=e.getPosition();return{lat:t.lat(),lng:t.lng()}}},{key:\"updatePolyline\",value:function(e,t){e.setPath(t)}},{key:\"removePolyline\",value:function(e){e.setMap(null)}},{key:\"applyCoordinateOffset\",value:function(e){var t=(0,o.default)(e,2),n=t[0],l=t[1];return(0,i.WGS84ToGCJ02)(n,l)}}]),e}();t.default=s}}]);"],"mappings":"AAAA","sourceRoot":""}
\ No newline at end of file \ No newline at end of file
...@@ -3,9 +3,9 @@ Copyright (C) 2008 The Android Open Source Project ...@@ -3,9 +3,9 @@ Copyright (C) 2008 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License"); Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. you may not use this file except in compliance with the License.
You may obtain a copy of the License at You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
......
!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=471)}({471:function(e,t){e.exports='module.exports = __webpack_public_path__ + "parameters.json";'}}); !function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="/",r(r.s=473)}({473:function(e,t){e.exports='module.exports = __webpack_public_path__ + "parameters.json";'}});
//# sourceMappingURL=parameters.bundle.js.map //# sourceMappingURL=parameters.bundle.js.map
\ No newline at end of file
{"version":3,"file":"parameters.bundle.js","sources":["webpack:///parameters.bundle.js"],"sourcesContent":["!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"/\",r(r.s=471)}({471:function(e,t){e.exports='module.exports = __webpack_public_path__ + \"parameters.json\";'}});"],"mappings":"AAAA","sourceRoot":""} {"version":3,"file":"parameters.bundle.js","sources":["webpack:///parameters.bundle.js"],"sourcesContent":["!function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&\"object\"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,\"default\",{enumerable:!0,value:e}),2&t&&\"string\"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,\"a\",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p=\"/\",r(r.s=473)}({473:function(e,t){e.exports='module.exports = __webpack_public_path__ + \"parameters.json\";'}});"],"mappings":"AAAA","sourceRoot":""}
\ No newline at end of file \ No newline at end of file
因为 它太大了无法显示 source diff 。你可以改为 查看blob
因为 它太大了无法显示 source diff 。你可以改为 查看blob
...@@ -596,6 +596,11 @@ ...@@ -596,6 +596,11 @@
"rule": "repeated", "rule": "repeated",
"type": "Object", "type": "Object",
"id": 27 "id": 27
},
"stories": {
"keyType": "string",
"type": "bool",
"id": 28
} }
} }
}, },
...@@ -3748,6 +3753,13 @@ ...@@ -3748,6 +3753,13 @@
"options": { "options": {
"default": 1 "default": 1
} }
},
"isLaneChanging": {
"type": "bool",
"id": 81,
"options": {
"default": false
}
} }
} }
}, },
...@@ -5043,6 +5055,73 @@ ...@@ -5043,6 +5055,73 @@
} }
} }
}, },
"PiecewiseJerkNonlinearSpeedConfig": {
"fields": {
"accWeight": {
"type": "double",
"id": 1,
"options": {
"default": 500
}
},
"jerkWeight": {
"type": "double",
"id": 2,
"options": {
"default": 100
}
},
"latAccWeight": {
"type": "double",
"id": 3,
"options": {
"default": 500
}
},
"refSWeight": {
"type": "double",
"id": 4,
"options": {
"default": 10
}
},
"refVWeight": {
"type": "double",
"id": 5,
"options": {
"default": 10
}
},
"endSWeight": {
"type": "double",
"id": 6,
"options": {
"default": 10
}
},
"endVWeight": {
"type": "double",
"id": 7,
"options": {
"default": 10
}
},
"endAWeight": {
"type": "double",
"id": 8,
"options": {
"default": 10
}
},
"useWarmStart": {
"type": "bool",
"id": 100,
"options": {
"default": true
}
}
}
},
"PiecewiseJerkPathConfig": { "PiecewiseJerkPathConfig": {
"fields": { "fields": {
"defaultPathConfig": { "defaultPathConfig": {
...@@ -6032,7 +6111,8 @@ ...@@ -6032,7 +6111,8 @@
"laneChangeDeciderConfig", "laneChangeDeciderConfig",
"ruleBasedStopDeciderConfig", "ruleBasedStopDeciderConfig",
"pathReuseDeciderConfig", "pathReuseDeciderConfig",
"stBoundsDeciderConfig" "stBoundsDeciderConfig",
"piecewiseJerkNonlinearSpeedConfig"
] ]
} }
}, },
...@@ -6116,6 +6196,10 @@ ...@@ -6116,6 +6196,10 @@
"stBoundsDeciderConfig": { "stBoundsDeciderConfig": {
"type": "STBoundsDeciderConfig", "type": "STBoundsDeciderConfig",
"id": 28 "id": 28
},
"piecewiseJerkNonlinearSpeedConfig": {
"type": "PiecewiseJerkNonlinearSpeedConfig",
"id": 29
} }
}, },
"nested": { "nested": {
...@@ -6145,7 +6229,8 @@ ...@@ -6145,7 +6229,8 @@
"LANE_CHANGE_DECIDER": 28, "LANE_CHANGE_DECIDER": 28,
"RULE_BASED_STOP_DECIDER": 29, "RULE_BASED_STOP_DECIDER": 29,
"PATH_REUSE_DECIDER": 30, "PATH_REUSE_DECIDER": 30,
"ST_BOUNDS_DECIDER": 31 "ST_BOUNDS_DECIDER": 31,
"PIECEWISE_JERK_NONLINEAR_SPEED_OPTIMIZER": 32
} }
} }
} }
...@@ -6176,7 +6261,7 @@ ...@@ -6176,7 +6261,7 @@
"default": 3 "default": 3
} }
}, },
"approachSpeedLimit": { "approachCruiseSpeed": {
"type": "double", "type": "double",
"id": 4, "id": 4,
"options": { "options": {
...@@ -6293,26 +6378,40 @@ ...@@ -6293,26 +6378,40 @@
"default": 5 "default": 5
} }
}, },
"maxValidStopDistance": { "approachCruiseSpeed": {
"type": "double", "type": "double",
"id": 2, "id": 2,
"options": {
"default": 2.78
}
},
"maxValidStopDistance": {
"type": "double",
"id": 3,
"options": { "options": {
"default": 3.5 "default": 3.5
} }
}, },
"minPassSDistance": { "minPassSDistance": {
"type": "double", "type": "double",
"id": 3, "id": 4,
"options": { "options": {
"default": 3 "default": 3
} }
}, },
"creepTimeoutSec": { "creepTimeoutSec": {
"type": "float", "type": "float",
"id": 4, "id": 5,
"options": { "options": {
"default": 10 "default": 10
} }
},
"maxAdcSpeedBeforeCreep": {
"type": "double",
"id": 6,
"options": {
"default": 5.56
}
} }
} }
}, },
...@@ -6359,6 +6458,13 @@ ...@@ -6359,6 +6458,13 @@
"options": { "options": {
"default": 10 "default": 10
} }
},
"maxAdcSpeedBeforeCreep": {
"type": "double",
"id": 7,
"options": {
"default": 3
}
} }
} }
}, },
...@@ -6642,16 +6748,16 @@ ...@@ -6642,16 +6748,16 @@
"NO_STAGE": 0, "NO_STAGE": 0,
"LANE_FOLLOW_DEFAULT_STAGE": 1, "LANE_FOLLOW_DEFAULT_STAGE": 1,
"BARE_INTERSECTION_UNPROTECTED_APPROACH": 200, "BARE_INTERSECTION_UNPROTECTED_APPROACH": 200,
"BARE_INTERSECTION_UNPROTECTED_CREEP": 201, "BARE_INTERSECTION_UNPROTECTED_INTERSECTION_CRUISE": 201,
"BARE_INTERSECTION_UNPROTECTED_INTERSECTION_CRUISE": 202,
"STOP_SIGN_UNPROTECTED_PRE_STOP": 300, "STOP_SIGN_UNPROTECTED_PRE_STOP": 300,
"STOP_SIGN_UNPROTECTED_STOP": 301, "STOP_SIGN_UNPROTECTED_STOP": 301,
"STOP_SIGN_UNPROTECTED_CREEP": 302, "STOP_SIGN_UNPROTECTED_CREEP": 302,
"STOP_SIGN_UNPROTECTED_INTERSECTION_CRUISE": 303, "STOP_SIGN_UNPROTECTED_INTERSECTION_CRUISE": 303,
"TRAFFIC_LIGHT_PROTECTED_APPROACH": 400, "TRAFFIC_LIGHT_PROTECTED_APPROACH": 400,
"TRAFFIC_LIGHT_PROTECTED_INTERSECTION_CRUISE": 401, "TRAFFIC_LIGHT_PROTECTED_INTERSECTION_CRUISE": 401,
"TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_CREEP": 410, "TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_APPROACH": 410,
"TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_INTERSECTION_CRUISE": 411, "TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_CREEP": 411,
"TRAFFIC_LIGHT_UNPROTECTED_LEFT_TURN_INTERSECTION_CRUISE": 412,
"TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_STOP": 420, "TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_STOP": 420,
"TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_CREEP": 421, "TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_CREEP": 421,
"TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_INTERSECTION_CRUISE": 422, "TRAFFIC_LIGHT_UNPROTECTED_RIGHT_TURN_INTERSECTION_CRUISE": 422,
...@@ -6896,6 +7002,17 @@ ...@@ -6896,6 +7002,17 @@
"laneChangeStartPosition": { "laneChangeStartPosition": {
"type": "apollo.common.Point3D", "type": "apollo.common.Point3D",
"id": 5 "id": 5
},
"lastSucceedTimestamp": {
"type": "double",
"id": 6
},
"isCurrentOptSucceed": {
"type": "bool",
"id": 7,
"options": {
"default": false
}
} }
}, },
"nested": { "nested": {
...@@ -6903,7 +7020,7 @@ ...@@ -6903,7 +7020,7 @@
"values": { "values": {
"IN_CHANGE_LANE": 1, "IN_CHANGE_LANE": 1,
"CHANGE_LANE_FAILED": 2, "CHANGE_LANE_FAILED": 2,
"CHANGE_LANE_SUCCESS": 3 "CHANGE_LANE_FINISHED": 3
} }
} }
} }
......
...@@ -2,14 +2,15 @@ ...@@ -2,14 +2,15 @@
import "styles/monitor.scss"; import "styles/monitor.scss";
import React from "react"; import React from "react";
import { Tab } from "react-tabs"; import { Tabs, TabList, Tab, TabPanel } from "react-tabs";
import { MONITOR_MENU } from "store/options";
import CameraParam from "components/CameraParam"; import CameraParam from "components/CameraParam";
import { CameraVideo } from "components/Tasks/SensorCamera";
import DataCollectionMonitor from "components/DataCollectionMonitor"; import DataCollectionMonitor from "components/DataCollectionMonitor";
import PNCMonitor from "components/PNCMonitor"; import PNCMonitor from "components/PNCMonitor";
import TeleOpConsole from "components/TeleopMonitor/TeleopConsole"; import TeleOpConsole from "components/TeleopMonitor/TeleopConsole";
import { CameraVideo } from "components/Tasks/SensorCamera";
import { MONITOR_MENU } from "store/options";
export default class MonitorPanel extends React.Component { export default class MonitorPanel extends React.Component {
renderMonitor() { renderMonitor() {
...@@ -38,10 +39,14 @@ export default class MonitorPanel extends React.Component { ...@@ -38,10 +39,14 @@ export default class MonitorPanel extends React.Component {
return ( return (
<div className="right-pane"> <div className="right-pane">
{showCameraVideo && {showCameraVideo &&
<div> <Tabs>
<Tab><span>Camera View</span></Tab> <TabList>
<CameraVideo /> <Tab>Camera View</Tab>
</div> </TabList>
<TabPanel>
<CameraVideo />
</TabPanel>
</Tabs>
} }
{this.renderMonitor()} {this.renderMonitor()}
</div> </div>
......
...@@ -10,7 +10,7 @@ class PlanningScenarioItem extends React.Component { ...@@ -10,7 +10,7 @@ class PlanningScenarioItem extends React.Component {
const stage = scenario.stageType ? scenario.stageType.replace(type + '_', '') : '-'; const stage = scenario.stageType ? scenario.stageType.replace(type + '_', '') : '-';
return ( return (
<tr className="scenario-history-item"> <tr className="monitor-table-item">
<td className="text time">{timestampMsToTimeString(scenario.time, true)}</td> <td className="text time">{timestampMsToTimeString(scenario.time, true)}</td>
<td className="text">{type}</td> <td className="text">{type}</td>
<td className="text">{stage}</td> <td className="text">{stage}</td>
...@@ -24,9 +24,9 @@ export default class PlanningScenarioTable extends React.Component { ...@@ -24,9 +24,9 @@ export default class PlanningScenarioTable extends React.Component {
const { scenarios } = this.props; const { scenarios } = this.props;
return ( return (
<div className="scenario-history-container"> <div className="monitor-table-container">
<div className="scenario-history-title">Scenario History</div> <div className="monitor-table-title">Scenario History</div>
<table className="scenario-history-table"> <table className="monitor-table">
<tbody> <tbody>
{scenarios.map(scenario => ( {scenarios.map(scenario => (
<PlanningScenarioItem key={`scenario_${scenario.time}`} <PlanningScenarioItem key={`scenario_${scenario.time}`}
......
import React from "react";
import { inject, observer } from "mobx-react";
import classNames from "classnames";
import { Tabs, TabList, Tab, TabPanel } from "react-tabs";
class StoryItem extends React.PureComponent {
render() {
const { name, value } = this.props;
const textClassNames = classNames({
"text": true,
"active": value,
});
return (
<tr className="monitor-table-item">
<td className={textClassNames}>{name.toUpperCase()}</td>
<td className={textClassNames}>{value ? 'YES' : 'No'}</td>
</tr>
);
}
}
@inject("store") @observer
export default class StoryTellingMonitor extends React.Component {
render() {
const { stories } = this.props.store.storyTellers;
let storyTable = null;
if (stories.size > 0) {
storyTable = stories.entries().map(([story, isOn]) =>
<StoryItem key={`story_${story}`} name={story} value={isOn} />
);
} else {
storyTable = (
<tr className="monitor-table-item">
<td className="text">No Data</td>
</tr>
);
}
return (
<Tabs>
<TabList>
<Tab>Story Tellers</Tab>
</TabList>
<TabPanel className="monitor-table-container">
<table className="monitor-table">
<tbody>{storyTable}</tbody>
</table>
</TabPanel>
</Tabs>
);
}
}
import React from "react"; import React from "react";
import { Tab, Tabs, TabList, TabPanel } from "react-tabs"; import { Tab, Tabs, TabList, TabPanel } from "react-tabs";
import PlanningMonitor from "components/PNCMonitor/PlanningMonitor";
import ControlMonitor from "components/PNCMonitor/ControlMonitor"; import ControlMonitor from "components/PNCMonitor/ControlMonitor";
import LatencyMonitor from "components/PNCMonitor/LatencyMonitor"; import LatencyMonitor from "components/PNCMonitor/LatencyMonitor";
import PlanningMonitor from "components/PNCMonitor/PlanningMonitor";
import StoryTellingMonitor from "components/PNCMonitor/StoryTellingMonitor";
export default class PNCMonitor extends React.Component { export default class PNCMonitor extends React.Component {
render() { render() {
return ( return (
<div className="monitor pnc-monitor"> <div className="monitor pnc-monitor">
<StoryTellingMonitor />
<Tabs> <Tabs>
<TabList> <TabList>
<Tab>Planning</Tab> <Tab>Planning</Tab>
......
...@@ -10,6 +10,7 @@ import Options from "store/options"; ...@@ -10,6 +10,7 @@ import Options from "store/options";
import PlanningData from "store/planning_data"; import PlanningData from "store/planning_data";
import Playback from "store/playback"; import Playback from "store/playback";
import RouteEditingManager from "store/route_editing_manager"; import RouteEditingManager from "store/route_editing_manager";
import StoryTellers from "store/story_tellers";
import Teleop from "store/teleop"; import Teleop from "store/teleop";
import TrafficSignal from "store/traffic_signal"; import TrafficSignal from "store/traffic_signal";
...@@ -56,6 +57,8 @@ class DreamviewStore { ...@@ -56,6 +57,8 @@ class DreamviewStore {
@observable cameraData = new CameraData(); @observable cameraData = new CameraData();
@observable storyTellers = new StoryTellers();
@observable teleop = new Teleop(); @observable teleop = new Teleop();
@observable newDisengagementReminder = false; @observable newDisengagementReminder = false;
...@@ -233,6 +236,7 @@ class DreamviewStore { ...@@ -233,6 +236,7 @@ class DreamviewStore {
this.updateCustomizedToggles(world); this.updateCustomizedToggles(world);
if (this.options.showPNCMonitor) { if (this.options.showPNCMonitor) {
this.storyTellers.update(world);
this.planningData.update(world); this.planningData.update(world);
this.controlData.update(world, this.hmi.vehicleParam); this.controlData.update(world, this.hmi.vehicleParam);
this.latency.update(world); this.latency.update(world);
......
import { observable, action } from "mobx";
import _ from 'lodash';
export default class StoryTellers {
@observable stories = observable.map();
@action update(world) {
this.stories.clear();
if (world.stories) {
Object.entries(world.stories).forEach(([story, isOn]) => {
this.stories.set(story, isOn);
});
}
}
}
...@@ -263,6 +263,10 @@ body { ...@@ -263,6 +263,10 @@ body {
} }
.react-tabs { .react-tabs {
&:not(:last-child) {
border-bottom: 2px solid #000000;
}
&__tab-list { &__tab-list {
display: table; display: table;
width: 100%; width: 100%;
......
...@@ -74,21 +74,13 @@ $monitor-header-height: 32px; ...@@ -74,21 +74,13 @@ $monitor-header-height: 32px;
} }
} }
} }
}
.pnc-monitor {
.scatter-graph {
margin: 0px;
border: 1px #000000;
border-style: solid none;
}
.scenario-history-container { .monitor-table-container {
padding: 10px; padding: 10px;
font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif; font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
font-weight: normal; font-weight: normal;
.scenario-history-title { .monitor-table-title {
margin: 5px; margin: 5px;
border-bottom: 1px solid rgba(153, 153, 153, 0.5); border-bottom: 1px solid rgba(153, 153, 153, 0.5);
padding-bottom: 5px; padding-bottom: 5px;
...@@ -98,11 +90,11 @@ $monitor-header-height: 32px; ...@@ -98,11 +90,11 @@ $monitor-header-height: 32px;
text-align: center; text-align: center;
} }
.scenario-history-table { .monitor-table {
position: relative; position: relative;
width: 100%; width: 100%;
.scenario-history-item { .monitor-table-item {
position: relative; position: relative;
width: 100%; width: 100%;
...@@ -118,11 +110,29 @@ $monitor-header-height: 32px; ...@@ -118,11 +110,29 @@ $monitor-header-height: 32px;
.time { .time {
text-align: center; text-align: center;
} }
.active {
color: #FFFFFF;
}
} }
} }
} }
} }
.pnc-monitor {
.scatter-graph {
margin: 0px;
&:not(:first-child) {
border-top: 1px solid #000000;
}
&:only-child {
border-bottom: 1px solid #000000;
}
}
}
.data-collection-monitor { .data-collection-monitor {
position: relative; position: relative;
width: 100%; width: 100%;
......
...@@ -197,7 +197,7 @@ message Notification { ...@@ -197,7 +197,7 @@ message Notification {
optional apollo.common.monitor.MonitorMessageItem item = 2; optional apollo.common.monitor.MonitorMessageItem item = 2;
} }
// Next-id: 28 // Next-id: 29
message SimulationWorld { message SimulationWorld {
// Timestamp in milliseconds // Timestamp in milliseconds
optional double timestamp = 1; optional double timestamp = 1;
...@@ -270,4 +270,7 @@ message SimulationWorld { ...@@ -270,4 +270,7 @@ message SimulationWorld {
// Perception detected signals // Perception detected signals
repeated Object perceived_signal = 27; repeated Object perceived_signal = 27;
// A map from a story name to whether it is on
map<string, bool> stories = 28;
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册