未验证 提交 9999d285 编写于 作者: A abel 提交者: GitHub

dreamview: fix bug at sim control (#13727)

* dreamview: fix bug at sim control

InitStartPoint() can handle  using localization point and using dummy point.if localization is not empty, program will jump here.

* Update sim_control.h

* Update sim_control_interface.h

* Update sim_control.cc
上级 2b3c7049
......@@ -107,9 +107,9 @@ void SimControl::InitTimerAndIO() {
false));
}
void SimControl::Init(bool set_start_point, double start_velocity,
void SimControl::Init(double start_velocity,
double start_acceleration) {
if (set_start_point && !FLAGS_use_navigation_mode) {
if (!FLAGS_use_navigation_mode) {
InitStartPoint(start_velocity, start_acceleration);
}
}
......@@ -252,8 +252,7 @@ void SimControl::Start() {
// When localization is already available, we do not need to
// reset/override the start point.
localization_reader_->Observe();
Init(localization_reader_->Empty(),
next_point_.has_v() ? next_point_.v() : 0.0,
Init(next_point_.has_v() ? next_point_.v() : 0.0,
next_point_.has_a() ? next_point_.a() : 0.0);
InternalReset();
......
......@@ -62,7 +62,7 @@ class SimControl : SimControlInterface {
* @brief setup callbacks and timer
* @param set_start_point initialize localization.
*/
void Init(bool set_start_point, double start_velocity = 0.0,
void Init(double start_velocity = 0.0,
double start_acceleration = 0.0) override;
/**
......
......@@ -38,7 +38,7 @@ class SimControlInterface {
/**
* @brief Initialization.
*/
virtual void Init(bool set_start_point, double start_velocity = 0.0,
virtual void Init(double start_velocity = 0.0,
double start_acceleration = 0.0) = 0;
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册