提交 367e7aa2 编写于 作者: L luoqi06 提交者: Jiangtao Hu

Revert "Control : remove gflags in control and compile control/common"

This reverts commit 86338b7b.
上级 27e2f8da
......@@ -2,6 +2,19 @@ load("//tools:cpplint.bzl", "cpplint")
package(default_visibility = ["//visibility:public"])
cc_library(
name = "control_gflags",
srcs = [
"control_gflags.cc",
],
hdrs = [
"control_gflags.h",
],
deps = [
"//external:gflags",
],
)
cc_library(
name = "hysteresis_filter",
srcs = [
......@@ -107,6 +120,7 @@ cc_library(
cc_library(
name = "common",
deps = [
":control_gflags",
":hysteresis_filter",
":interpolation_1d",
":interpolation_2d",
......
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include "modules/control/common/control_gflags.h"
DEFINE_string(control_conf_file, "modules/control/conf/lincoln.pb.txt",
"default control conf data file");
DEFINE_string(control_adapter_config_filename,
"modules/control/conf/adapter.conf", "The adapter config file");
DEFINE_bool(enable_csv_debug, false, "True to write out csv debug file.");
DEFINE_bool(enable_speed_station_preview, true, "enable speed/station preview");
DEFINE_string(control_node_name, "control", "The control node name in proto");
DEFINE_bool(is_control_test_mode, false, "True to run control in test mode");
DEFINE_double(control_test_duration, -1.0,
"Control testing duration in seconds. This number is will not "
"take effect if negative");
DEFINE_bool(use_preview_speed_for_table, false,
"True to use preview speed for table lookup");
DEFINE_bool(enable_input_timestamp_check, true,
"True to enable input timestamp delay check");
DEFINE_int32(max_localization_miss_num, 20,
"Max missing number of localization before entering estop mode");
DEFINE_int32(max_chassis_miss_num, 20,
"Max missing number of chassis before entering estop mode");
DEFINE_int32(max_planning_miss_num, 20,
"Max missing number of planning before entering estop mode");
DEFINE_double(max_acceleration_when_stopped, 0.01,
"max acceleration can be observed when vehicle is stopped");
DEFINE_double(steer_angle_rate, 100.0,
"Steer angle change rate in percentage.");
DEFINE_bool(enable_gain_scheduler, false,
"Enable gain scheduler for higher vehicle speed");
DEFINE_bool(set_steer_limit, false, "Set steer limit");
DEFINE_bool(enable_slope_offset, false, "Enable slope offset compensation");
DEFINE_double(lock_steer_speed, 0.081,
"Minimum speed to lock the steer, in m/s");
DEFINE_bool(enable_navigation_mode_error_filter, false,
"Enable error_filter for navigation mode");
DEFINE_bool(enable_navigation_mode_position_update, true,
"Enable position update for navigation mode");
DEFINE_bool(enable_persistent_estop, false,
"True to persistent keep estop status, "
"pad reset can reset the estop status.");
/******************************************************************************
* Copyright 2017 The Apollo Authors. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#ifndef MODULES_CONTROL_COMMON_CONTROL_GFLAGS_H_
#define MODULES_CONTROL_COMMON_CONTROL_GFLAGS_H_
#include "gflags/gflags.h"
// data file
DECLARE_string(control_conf_file);
DECLARE_double(control_test_duration);
DECLARE_string(control_adapter_config_filename);
DECLARE_bool(enable_csv_debug);
// temporary gflag for test purpose
DECLARE_bool(enable_speed_station_preview);
DECLARE_string(control_node_name);
DECLARE_bool(is_control_test_mode);
DECLARE_bool(use_preview_speed_for_table);
DECLARE_bool(enable_input_timestamp_check);
DECLARE_int32(max_localization_miss_num);
DECLARE_int32(max_chassis_miss_num);
DECLARE_int32(max_planning_miss_num);
DECLARE_double(max_acceleration_when_stopped);
DECLARE_double(steer_angle_rate);
DECLARE_bool(enable_gain_scheduler);
DECLARE_bool(set_steer_limit);
DECLARE_bool(enable_slope_offset);
DECLARE_double(lock_steer_speed);
DECLARE_bool(enable_navigation_mode_error_filter);
DECLARE_bool(enable_navigation_mode_position_update);
DECLARE_bool(enable_persistent_estop);
#endif // MODULES_CONTROL_COMMON_CONTROL_GFLAGS_H_
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册