提交 71392797 编写于 作者: S siyangy 提交者: Vivian Lin

Dreamview: map radius as a flag (#1715)

上级 e66b2b0f
......@@ -53,3 +53,7 @@ DEFINE_string(ssl_certificate, "",
"when at least one of the listening_ports is SSL. The file must "
"be in PEM format, and it must have both, private key and "
"certificate");
DEFINE_double(map_radius, 200.0,
"The radius within which Dreamview will find all the map "
"elements around the car.");
......@@ -37,4 +37,6 @@ DECLARE_string(websocket_timeout_ms);
DECLARE_string(ssl_certificate);
DECLARE_double(map_radius);
#endif // MODULES_DREAMVIEW_BACKEND_COMMON_DREAMVIEW_GFLAGS_H_
......@@ -56,10 +56,6 @@ class SimulationWorldService {
// SimulationWorld.
static constexpr int kMaxMonitorItems = 30;
// The radius within which Dreamview will find all the map elements around the
// car.
static constexpr double kMapRadius = 200.0;
/**
* @brief Constructor of SimulationWorldService.
* @param map_service the pointer of MapService.
......
......@@ -179,8 +179,7 @@ void SimulationWorldUpdater::OnTimer(const ros::TimerEvent &event) {
boost::unique_lock<boost::shared_mutex> writer_lock(mutex_);
simulation_world_json_ =
sim_world_service_.GetUpdateAsJson(SimulationWorldService::kMapRadius)
.dump();
sim_world_service_.GetUpdateAsJson(FLAGS_map_radius).dump();
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册