Skip to content

Commit

Permalink
V2X: update flags
Browse files Browse the repository at this point in the history
  • Loading branch information
QIU1995NONAME authored and jinghaomiao committed Sep 3, 2020
1 parent 73179bf commit 82e64a9
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 6 deletions.
10 changes: 9 additions & 1 deletion modules/common/adapters/adapter_gflags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,18 @@ DEFINE_string(navigation_topic, "/apollo/navigation", "navigation");
DEFINE_string(hmi_status_topic, "/apollo/hmi/status", "HMI status topic name.");
DEFINE_string(audio_capture_topic, "/apollo/hmi/audio_capture",
"HMI audio capture topic name.");
DEFINE_string(v2x_obu_trafficlight_topic,
"/apollo/v2x/obu/internal/traffic_light",
"v2x obu trafficlight topic name");
DEFINE_string(v2x_obstacle_topic, "/apollo/v2x/obstacles",
"v2x obstacles topic name");
DEFINE_string(v2x_trafficlight_topic, "/apollo/v2x/traffic_light",
"v2x trafficlight topic name");
"v2x traffic light topic name");
DEFINE_string(v2x_trafficlight_for_hmi_topic,
"/apollo/v2x/traffic_light/for_hmi",
"v2x traffic light topic name for hmi");
DEFINE_string(v2x_rsi_topic, "/apollo/v2x/rsi", "v2x rsi topic name");

DEFINE_string(storytelling_topic, "/apollo/storytelling",
"Storytelling topic.");
DEFINE_string(audio_event_topic, "/apollo/audio_event",
Expand Down
3 changes: 3 additions & 0 deletions modules/common/adapters/adapter_gflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,11 @@ DECLARE_string(relative_map_topic);
DECLARE_string(navigation_topic);
DECLARE_string(hmi_status_topic);
DECLARE_string(audio_capture_topic);
DECLARE_string(v2x_obu_trafficlight_topic);
DECLARE_string(v2x_obstacle_topic);
DECLARE_string(v2x_trafficlight_topic);
DECLARE_string(v2x_trafficlight_for_hmi_topic);
DECLARE_string(v2x_rsi_topic);
DECLARE_string(storytelling_topic);
DECLARE_string(gnss_raw_data_topic);
DECLARE_string(stream_status_topic);
Expand Down
23 changes: 20 additions & 3 deletions modules/v2x/common/v2x_proxy_gflags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,14 @@
namespace apollo {
namespace v2x {

// IP & PORT
DEFINE_string(grpc_client_host, "127.0.0.1", "grpc client host ip");
DEFINE_string(grpc_server_host, "127.0.0.1", "grpc server host ip");
DEFINE_string(grpc_client_port, "50100", "grpc client port num");
DEFINE_string(grpc_server_port, "50101", "grpc server port num");
DEFINE_string(grpc_client_port, "50100", "grpc client port");
DEFINE_string(grpc_server_port, "50101", "grpc server port");
DEFINE_string(grpc_debug_server_port, "50102", "grpc server debug port");

// Other Flags
DEFINE_int64(x2v_trafficlight_timer_frequency, 10,
"x2v trafficlight timer frequency");
DEFINE_bool(debug_flag, false, "debug flag");
Expand All @@ -36,6 +40,19 @@ DEFINE_int64(v2x_carstatus_timer_frequency, 10,
DEFINE_string(hdmap_file_name,
"/apollo/modules/map/data/sunnyvale_big_loop/base_map.bin",
"hdmap file name");
DEFINE_double(traffic_light_distance, 1000.0, "traffic light distance");
DEFINE_double(traffic_light_distance, 250.0, "traffic light distance");
DEFINE_double(heading_difference, 30.0 / 180.0, "max heading difference");
DEFINE_int64(list_size, 6, "size of list which stores the traffic light data");
DEFINE_int64(msg_timeout, 250, "timeout value which getting the msg from OBU");
DEFINE_int64(sim_sending_num, 10, "the max sending times");
DEFINE_bool(use_nearest_flag, true,
"use the hdmap interface get_forward_nearest_signals_on_lane flag");
DEFINE_int64(spat_period, 150, "SPAT message periond");
DEFINE_double(check_time, 0.5, "SPAT message periond");
DEFINE_int64(rsu_whitelist_period, 3 * 1000, "get whitelist periond"); // 3s
DEFINE_string(rsu_whitelist_name,
"/apollo/modules/v2x/conf/rsu_whitelist.txt",
"file name for RSU whitelist");

} // namespace v2x
} // namespace apollo
14 changes: 14 additions & 0 deletions modules/v2x/common/v2x_proxy_gflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,28 @@
namespace apollo {
namespace v2x {

// IP & PORT
DECLARE_string(grpc_client_host);
DECLARE_string(grpc_server_host);
DECLARE_string(grpc_client_port);
DECLARE_string(grpc_server_port);
DECLARE_string(grpc_debug_server_port);

// Other Flags
DECLARE_int64(x2v_trafficlight_timer_frequency);
DECLARE_bool(debug_flag);
DECLARE_int64(v2x_carstatus_timer_frequency);
DECLARE_string(hdmap_file_name);
DECLARE_double(traffic_light_distance);
DECLARE_double(heading_difference);
DECLARE_int64(list_size);
DECLARE_int64(msg_timeout);
DECLARE_int64(sim_sending_num);
DECLARE_bool(use_nearest_flag);
DECLARE_int64(spat_period);
DECLARE_double(check_time);
DECLARE_int64(rsu_whitelist_period);
DECLARE_string(rsu_whitelist_name);

} // namespace v2x
} // namespace apollo
6 changes: 4 additions & 2 deletions modules/v2x/conf/v2x.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
--debug_flag=false
--x2v_trafficlight_timer_frequency=10
--v2x_carstatus_timer_frequency=10
--grpc_client_host=192.168.10.123
--grpc_client_host=192.168.10.21
--grpc_server_host=192.168.10.6
--hdmap_file_name=/apollo/modules/map/data/sunnyvale_big_loop/base_map.bin
--rsu_whitelist_name=/apollo/modules/v2x/conf/rsu_whitelist.txt

0 comments on commit 82e64a9

Please sign in to comment.