Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
5b853b4a
A
apollo
项目概览
Pinoxchio
/
apollo
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
A
apollo
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b853b4a
编写于
7月 31, 2020
作者:
X
Xiangquan Xiao
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "absl_flag: convert gflags to absl_flag"
This reverts commit
65815991
.
上级
65815991
变更
31
隐藏空白更改
内联
并排
Showing
31 changed file
with
72 addition
and
89 deletion
+72
-89
modules/common/configs/BUILD
modules/common/configs/BUILD
+0
-1
modules/common/configs/config_gflags.cc
modules/common/configs/config_gflags.cc
+8
-8
modules/common/configs/config_gflags.h
modules/common/configs/config_gflags.h
+4
-7
modules/dreamview/backend/hmi/hmi_worker.cc
modules/dreamview/backend/hmi/hmi_worker.cc
+3
-5
modules/dreamview/backend/map/map_service.cc
modules/dreamview/backend/map/map_service.cc
+1
-1
modules/dreamview/backend/map/map_service.h
modules/dreamview/backend/map/map_service.h
+1
-1
modules/dreamview/backend/map/map_service_test.cc
modules/dreamview/backend/map/map_service_test.cc
+2
-2
modules/dreamview/backend/sim_control/sim_control_test.cc
modules/dreamview/backend/sim_control/sim_control_test.cc
+2
-2
modules/dreamview/backend/simulation_world/simulation_world_service_test.cc
...backend/simulation_world/simulation_world_service_test.cc
+2
-2
modules/dreamview/proto/hmi_status.proto
modules/dreamview/proto/hmi_status.proto
+1
-1
modules/localization/msf/README.md
modules/localization/msf/README.md
+1
-1
modules/localization/msf/local_tool/local_visualization/online_visual/online_visualizer_component.cc
...isualization/online_visual/online_visualizer_component.cc
+1
-2
modules/localization/msf/msf_localization.cc
modules/localization/msf/msf_localization.cc
+2
-3
modules/localization/ndt/README.md
modules/localization/ndt/README.md
+1
-1
modules/localization/ndt/ndt_localization.cc
modules/localization/ndt/ndt_localization.cc
+2
-3
modules/localization/ndt/ndt_localization_test.cc
modules/localization/ndt/ndt_localization_test.cc
+1
-1
modules/map/hdmap/hdmap_util.cc
modules/map/hdmap/hdmap_util.cc
+7
-11
modules/map/hdmap/hdmap_util.h
modules/map/hdmap/hdmap_util.h
+1
-2
modules/map/tools/bin_map_generator.cc
modules/map/tools/bin_map_generator.cc
+1
-1
modules/map/tools/proto_map_generator.cc
modules/map/tools/proto_map_generator.cc
+1
-2
modules/perception/map/hdmap/hdmap_input.cc
modules/perception/map/hdmap/hdmap_input.cc
+1
-1
modules/planning/common/message_process.cc
modules/planning/common/message_process.cc
+9
-8
modules/planning/integration_tests/garage_test.cc
modules/planning/integration_tests/garage_test.cc
+2
-2
modules/planning/integration_tests/planning_test_base.cc
modules/planning/integration_tests/planning_test_base.cc
+1
-1
modules/planning/integration_tests/sunnyvale_big_loop_test.cc
...les/planning/integration_tests/sunnyvale_big_loop_test.cc
+2
-2
modules/planning/integration_tests/sunnyvale_loop_test.cc
modules/planning/integration_tests/sunnyvale_loop_test.cc
+2
-2
modules/planning/learning_based/img_feature_renderer/birdview_img_feature_renderer.cc
...sed/img_feature_renderer/birdview_img_feature_renderer.cc
+1
-2
modules/planning/learning_based/model_inference/model_inference_test.cc
...ng/learning_based/model_inference/model_inference_test.cc
+2
-3
modules/planning/pipeline/record_to_learning_data.cc
modules/planning/pipeline/record_to_learning_data.cc
+1
-1
modules/prediction/common/kml_map_based_test.h
modules/prediction/common/kml_map_based_test.h
+2
-2
modules/v2x/v2x_proxy/app/v2x_proxy.cc
modules/v2x/v2x_proxy/app/v2x_proxy.cc
+7
-8
未找到文件。
modules/common/configs/BUILD
浏览文件 @
5b853b4a
...
...
@@ -12,7 +12,6 @@ cc_library(
],
deps
=
[
"@com_github_gflags_gflags//:gflags"
,
"@com_google_absl//absl/flags:flag"
],
)
...
...
modules/common/configs/config_gflags.cc
浏览文件 @
5b853b4a
...
...
@@ -16,15 +16,15 @@
#include "modules/common/configs/config_gflags.h"
ABSL_FLAG
(
std
::
string
,
map_dir
,
"/apollo/modules/map/data/demo"
,
"Directory which contains a group of related maps."
);
ABSL_FLAG
(
int32_t
,
local_utm_zone_id
,
10
,
"UTM zone id."
);
ABSL_FLAG
(
std
::
string
,
test_base_map_filename
,
""
,
"If not empty, use this test base map files."
);
ABSL_FLAG
(
std
::
string
,
base_map_filename
,
"base_map.bin|base_map.xml|base_map.txt"
,
"Base map files in the map_dir, search in order."
);
DEFINE_string
(
map_dir
,
"/apollo/modules/map/data/demo"
,
"Directory which contains a group of related maps."
);
DEFINE_int32
(
local_utm_zone_id
,
10
,
"UTM zone id."
);
DEFINE_string
(
test_base_map_filename
,
""
,
"If not empty, use this test base map files."
);
DEFINE_string
(
base_map_filename
,
"base_map.bin|base_map.xml|base_map.txt"
,
"Base map files in the map_dir, search in order."
);
DEFINE_string
(
sim_map_filename
,
"sim_map.bin|sim_map.txt"
,
"Simulation map files in the map_dir, search in order."
);
DEFINE_string
(
routing_map_filename
,
"routing_map.bin|routing_map.txt"
,
...
...
modules/common/configs/config_gflags.h
浏览文件 @
5b853b4a
...
...
@@ -15,19 +15,16 @@
*****************************************************************************/
#pragma once
#include <string>
#include "absl/flags/flag.h"
#include "gflags/gflags.h"
// The directory which contains a group of related maps, such as base_map,
// sim_map, routing_topo_grapth, etc.
DECLARE_string
(
map_dir
);
DECLARE_int32
(
local_utm_zone_id
);
ABSL_DECLARE_FLAG
(
std
::
string
,
map_dir
);
ABSL_DECLARE_FLAG
(
int32_t
,
local_utm_zone_id
);
ABSL_DECLARE_FLAG
(
std
::
string
,
test_base_map_filename
);
ABSL_DECLARE_FLAG
(
std
::
string
,
base_map_filename
);
DECLARE_string
(
test_base_map_filename
);
DECLARE_string
(
base_map_filename
);
DECLARE_string
(
sim_map_filename
);
DECLARE_string
(
routing_map_filename
);
DECLARE_string
(
end_way_point_filename
);
...
...
modules/dreamview/backend/hmi/hmi_worker.cc
浏览文件 @
5b853b4a
...
...
@@ -210,7 +210,7 @@ HMIMode HMIWorker::LoadMode(const std::string& mode_config_path) {
void
HMIWorker
::
InitStatus
()
{
static
const
std
::
string
kDockerImageEnv
=
"DOCKER_IMG"
;
status_
.
set_docker_image
(
cyber
::
common
::
GetEnv
(
kDockerImageEnv
));
status_
.
set_utm_zone_id
(
absl
::
GetFlag
(
FLAGS_local_utm_zone_id
)
);
status_
.
set_utm_zone_id
(
FLAGS_local_utm_zone_id
);
// Populate modes and current_mode.
const
auto
&
modes
=
config_
.
modes
();
...
...
@@ -223,7 +223,7 @@ void HMIWorker::InitStatus() {
status_
.
add_maps
(
map_entry
.
first
);
// If current FLAG_map_dir is available, set it as current_map.
if
(
map_entry
.
second
==
absl
::
GetFlag
(
FLAGS_map_dir
)
)
{
if
(
map_entry
.
second
==
FLAGS_map_dir
)
{
status_
.
set_current_map
(
map_entry
.
first
);
}
}
...
...
@@ -444,9 +444,7 @@ void HMIWorker::ChangeMap(const std::string& map_name) {
status_changed_
=
true
;
}
// SetGlobalFlag("map_dir", *map_dir, &FLAGS_map_dir);
absl
::
SetFlag
(
&
FLAGS_map_dir
,
*
map_dir
);
SetGlobalFlag
(
"map_dir"
,
*
map_dir
,
&
FLAGS_map_dir
);
ResetMode
();
}
...
...
modules/dreamview/backend/map/map_service.cc
浏览文件 @
5b853b4a
...
...
@@ -102,7 +102,7 @@ bool MapService::ReloadMap(bool force_reload) {
void
MapService
::
UpdateOffsets
()
{
x_offset_
=
0.0
;
y_offset_
=
0.0
;
std
::
ifstream
ifs
(
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
kMetaFileName
)
);
std
::
ifstream
ifs
(
FLAGS_map_dir
+
kMetaFileName
);
if
(
!
ifs
.
is_open
())
{
AINFO
<<
"Failed to open map meta file: "
<<
kMetaFileName
;
}
else
{
...
...
modules/dreamview/backend/map/map_service.h
浏览文件 @
5b853b4a
...
...
@@ -79,7 +79,7 @@ class MapService {
bool
CheckRoutingPointLaneType
(
apollo
::
hdmap
::
LaneInfoConstPtr
lane
)
const
;
// Reload map from current
absl::GetFlag(FLAGS_map_dir)
.
// Reload map from current
FLAGS_map_dir
.
bool
ReloadMap
(
bool
force_reload
);
size_t
CalculateMapHash
(
const
MapElementIds
&
ids
)
const
;
...
...
modules/dreamview/backend/map/map_service_test.cc
浏览文件 @
5b853b4a
...
...
@@ -30,8 +30,8 @@ namespace dreamview {
class
MapServiceTest
:
public
::
testing
::
Test
{
protected:
MapServiceTest
()
{
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"modules/dreamview/backend/testdata"
)
;
absl
::
SetFlag
(
&
FLAGS_base_map_filename
,
"garage.bin"
)
;
FLAGS_map_dir
=
"modules/dreamview/backend/testdata"
;
FLAGS_base_map_filename
=
"garage.bin"
;
map_service
.
reset
(
new
MapService
(
false
));
}
...
...
modules/dreamview/backend/sim_control/sim_control_test.cc
浏览文件 @
5b853b4a
...
...
@@ -44,8 +44,8 @@ class SimControlTest : public ::testing::Test {
}
virtual
void
SetUp
()
{
absl
::
GetFlag
(
FLAGS_map_dir
)
=
"modules/dreamview/backend/testdata"
;
absl
::
GetFlag
(
FLAGS_base_map_filename
)
=
"garage.bin"
;
FLAGS_map_dir
=
"modules/dreamview/backend/testdata"
;
FLAGS_base_map_filename
=
"garage.bin"
;
map_service_
.
reset
(
new
MapService
(
false
));
sim_control_
.
reset
(
new
SimControl
(
map_service_
.
get
()));
...
...
modules/dreamview/backend/simulation_world/simulation_world_service_test.cc
浏览文件 @
5b853b4a
...
...
@@ -62,8 +62,8 @@ class SimulationWorldServiceTest : public ::testing::Test {
protected:
SimulationWorldServiceTest
()
{
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"modules/dreamview/backend/testdata"
)
;
absl
::
SetFlag
(
&
FLAGS_base_map_filename
,
"garage.bin"
)
;
FLAGS_map_dir
=
"modules/dreamview/backend/testdata"
;
FLAGS_base_map_filename
=
"garage.bin"
;
FLAGS_sim_world_with_routing_path
=
true
;
map_service_
.
reset
(
new
MapService
(
false
));
}
...
...
modules/dreamview/proto/hmi_status.proto
浏览文件 @
5b853b4a
...
...
@@ -23,7 +23,7 @@ message HMIStatus {
map
<
string
,
apollo.monitor.ComponentStatus
>
monitored_components
=
9
;
optional
string
docker_image
=
10
;
optional
int32
utm_zone_id
=
11
;
//
absl::GetFlag(FLAGS_local_utm_zone_id)
optional
int32
utm_zone_id
=
11
;
//
FLAGS_local_utm_zone_id
// Message which will be read aloud to drivers and passengers through
// Dreamview.
...
...
modules/localization/msf/README.md
浏览文件 @
5b853b4a
...
...
@@ -13,7 +13,7 @@
*
GNSS observation and ephemeris data from GNSS sensor (ROS topic
`/apollo/sensor/gnss/rtk_obs`
and
`/apollo/sensor/gnss/rtk_eph`
)
*
GNSS best pose from GNSS sensor (ROS topic is
`/apollo/sensor/gnss/best_pose`
)
*
Imu data from IMU sensor (ROS topic
`/apollo/sensor/gnss/imu`
)
*
Localization map
absl::StrCat(absl::GetFlag(FLAGS_map_dir), "/",
FLAGS_local_map_name)
*
Localization map
(FLAGS_map_dir + "/" +
FLAGS_local_map_name)
*
Parameter config files (velodyne64_novatel_extrinsics_example.yaml, velodyne64_height.yaml, and ant_imu_leverarm.yaml, located in
`modules/localization/msf/params/`
)
## Output
...
...
modules/localization/msf/local_tool/local_visualization/online_visual/online_visualizer_component.cc
浏览文件 @
5b853b4a
...
...
@@ -51,8 +51,7 @@ bool OnlineVisualizerComponent::Init() {
}
bool
OnlineVisualizerComponent
::
InitConfig
()
{
map_folder_
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/"
,
FLAGS_local_map_name
);
map_folder_
=
FLAGS_map_dir
+
"/"
+
FLAGS_local_map_name
;
map_visual_folder_
=
FLAGS_map_visual_dir
;
lidar_extrinsic_file_
=
FLAGS_lidar_extrinsics_file
;
...
...
modules/localization/msf/msf_localization.cc
浏览文件 @
5b853b4a
...
...
@@ -61,8 +61,7 @@ void MSFLocalization::InitParams() {
localization_param_
.
enable_ins_aid_rtk
=
FLAGS_enable_ins_aid_rtk
;
// lidar module
localization_param_
.
map_path
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/"
,
FLAGS_local_map_name
);
localization_param_
.
map_path
=
FLAGS_map_dir
+
"/"
+
FLAGS_local_map_name
;
localization_param_
.
lidar_extrinsic_file
=
FLAGS_lidar_extrinsics_file
;
localization_param_
.
lidar_height_file
=
FLAGS_lidar_height_file
;
localization_param_
.
lidar_height_default
=
FLAGS_lidar_height_default
;
...
...
@@ -77,7 +76,7 @@ void MSFLocalization::InitParams() {
AINFO
<<
"lidar_extrin: "
<<
localization_param_
.
lidar_extrinsic_file
;
AINFO
<<
"lidar_height: "
<<
localization_param_
.
lidar_height_file
;
localization_param_
.
utm_zone_id
=
absl
::
GetFlag
(
FLAGS_local_utm_zone_id
)
;
localization_param_
.
utm_zone_id
=
FLAGS_local_utm_zone_id
;
// try load zone id from local_map folder
if
(
FLAGS_if_utm_zone_id_from_folder
)
{
bool
success
=
LoadZoneIdFromFolder
(
localization_param_
.
map_path
,
...
...
modules/localization/ndt/README.md
浏览文件 @
5b853b4a
...
...
@@ -8,7 +8,7 @@
## Input
*
Point cloud data from LiDAR sensor (
`/apollo/sensor/velodyne64/compensator/PointCloud2`
)
*
Inspva message from integrated navigation sensor (
`/apollo/sensor/gnss/odometry`
)
*
Localization map
absl::strcat(absl::GetFlag(FLAGS_map_dir), "/", FLAGS_ndt_map_dir, "/",
FLAGS_local_map_name)
*
Localization map
(FLAGS_map_dir + "/" + FLAGS_ndt_map_dir + "/" +
FLAGS_local_map_name)
*
Parameter config files (velodyne64_novatel_extrinsics_example.yaml, velodyne64_height.yaml, located in
`modules/localization/msf/params/`
)
## Output
...
...
modules/localization/ndt/ndt_localization.cc
浏览文件 @
5b853b4a
...
...
@@ -35,7 +35,7 @@ void NDTLocalization::Init() {
tf_buffer_
->
Init
();
resolution_id_
=
0
;
zone_id_
=
absl
::
GetFlag
(
FLAGS_local_utm_zone_id
)
;
zone_id_
=
FLAGS_local_utm_zone_id
;
online_resolution_
=
FLAGS_online_resolution
;
ndt_debug_log_flag_
=
FLAGS_ndt_debug_log_flag
;
tf_source_frame_id_
=
FLAGS_broadcast_tf_frame_id
;
...
...
@@ -47,8 +47,7 @@ void NDTLocalization::Init() {
error_ndt_score_
=
FLAGS_ndt_error_ndt_score
;
std
::
string
map_path_
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/"
,
FLAGS_ndt_map_dir
,
"/"
,
FLAGS_local_map_name
);
FLAGS_map_dir
+
"/"
+
FLAGS_ndt_map_dir
+
"/"
+
FLAGS_local_map_name
;
AINFO
<<
"map folder: "
<<
map_path_
;
velodyne_extrinsic_
=
Eigen
::
Affine3d
::
Identity
();
bool
success
=
...
...
modules/localization/ndt/ndt_localization_test.cc
浏览文件 @
5b853b4a
...
...
@@ -38,7 +38,7 @@ class NDTLocalizationTest : public ::testing::Test {
};
TEST_F
(
NDTLocalizationTest
,
Init
)
{
absl
::
SetFlag
(
&
FLAGS_local_utm_zone_id
,
10
)
;
FLAGS_local_utm_zone_id
=
10
;
FLAGS_online_resolution
=
0.25
;
ndt_localization_ptr_
->
Init
();
EXPECT_EQ
(
ndt_localization_ptr_
->
GetZoneId
(),
10
);
...
...
modules/map/hdmap/hdmap_util.cc
浏览文件 @
5b853b4a
...
...
@@ -32,8 +32,7 @@ namespace {
std
::
string
FindFirstExist
(
const
std
::
string
&
dir
,
const
std
::
string
&
files
)
{
const
std
::
vector
<
std
::
string
>
candidates
=
absl
::
StrSplit
(
files
,
'|'
);
for
(
const
auto
&
filename
:
candidates
)
{
const
std
::
string
file_path
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/"
,
filename
);
const
std
::
string
file_path
=
absl
::
StrCat
(
FLAGS_map_dir
,
"/"
,
filename
);
if
(
cyber
::
common
::
PathExists
(
file_path
))
{
return
file_path
;
}
...
...
@@ -41,7 +40,7 @@ std::string FindFirstExist(const std::string& dir, const std::string& files) {
AERROR
<<
"No existing file found in "
<<
dir
<<
"/"
<<
files
<<
". Fallback to first candidate as default result."
;
ACHECK
(
!
candidates
.
empty
())
<<
"Please specify at least one map."
;
return
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
)
,
"/"
,
candidates
[
0
]);
return
absl
::
StrCat
(
FLAGS_map_dir
,
"/"
,
candidates
[
0
]);
}
}
// namespace
...
...
@@ -50,18 +49,16 @@ std::string BaseMapFile() {
if
(
FLAGS_use_navigation_mode
)
{
AWARN
<<
"base_map file is not used when FLAGS_use_navigation_mode is true"
;
}
return
absl
::
GetFlag
(
FLAGS_test_base_map_filename
).
empty
()
?
FindFirstExist
(
absl
::
GetFlag
(
FLAGS_map_dir
),
absl
::
GetFlag
(
FLAGS_base_map_filename
))
:
FindFirstExist
(
absl
::
GetFlag
(
FLAGS_map_dir
),
absl
::
GetFlag
(
FLAGS_test_base_map_filename
));
return
FLAGS_test_base_map_filename
.
empty
()
?
FindFirstExist
(
FLAGS_map_dir
,
FLAGS_base_map_filename
)
:
FindFirstExist
(
FLAGS_map_dir
,
FLAGS_test_base_map_filename
);
}
std
::
string
SimMapFile
()
{
if
(
FLAGS_use_navigation_mode
)
{
AWARN
<<
"sim_map file is not used when FLAGS_use_navigation_mode is true"
;
}
return
FindFirstExist
(
absl
::
GetFlag
(
FLAGS_map_dir
)
,
FLAGS_sim_map_filename
);
return
FindFirstExist
(
FLAGS_map_dir
,
FLAGS_sim_map_filename
);
}
std
::
string
RoutingMapFile
()
{
...
...
@@ -69,8 +66,7 @@ std::string RoutingMapFile() {
AWARN
<<
"routing_map file is not used when FLAGS_use_navigation_mode is "
"true"
;
}
return
FindFirstExist
(
absl
::
GetFlag
(
FLAGS_map_dir
),
FLAGS_routing_map_filename
);
return
FindFirstExist
(
FLAGS_map_dir
,
FLAGS_routing_map_filename
);
}
std
::
unique_ptr
<
HDMap
>
CreateMap
(
const
std
::
string
&
map_file_path
)
{
...
...
modules/map/hdmap/hdmap_util.h
浏览文件 @
5b853b4a
...
...
@@ -57,8 +57,7 @@ inline std::string EndWayPointFile() {
if
(
FLAGS_use_navigation_mode
)
{
return
absl
::
StrCat
(
FLAGS_navigation_mode_end_way_point_file
);
}
else
{
return
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/"
,
FLAGS_end_way_point_filename
);
return
absl
::
StrCat
(
FLAGS_map_dir
,
"/"
,
FLAGS_end_way_point_filename
);
}
}
...
...
modules/map/tools/bin_map_generator.cc
浏览文件 @
5b853b4a
...
...
@@ -33,7 +33,7 @@ int main(int argc, char **argv) {
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
const
auto
map_filename
=
absl
::
GetFlag
(
FLAGS_map_dir
)
+
"/base_map.txt"
;
const
auto
map_filename
=
FLAGS_map_dir
+
"/base_map.txt"
;
apollo
::
hdmap
::
Map
pb_map
;
ACHECK
(
apollo
::
cyber
::
common
::
GetProtoFromFile
(
map_filename
,
&
pb_map
))
<<
"fail to load data from : "
<<
map_filename
;
...
...
modules/map/tools/proto_map_generator.cc
浏览文件 @
5b853b4a
...
...
@@ -33,8 +33,7 @@ int main(int argc, char **argv) {
google
::
ParseCommandLineFlags
(
&
argc
,
&
argv
,
true
);
const
auto
map_filename
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/base_map.xml"
);
const
auto
map_filename
=
FLAGS_map_dir
+
"/base_map.xml"
;
apollo
::
hdmap
::
Map
pb_map
;
ACHECK
(
apollo
::
hdmap
::
adapter
::
OpendriveAdapter
::
LoadData
(
map_filename
,
&
pb_map
))
...
...
modules/perception/map/hdmap/hdmap_input.cc
浏览文件 @
5b853b4a
...
...
@@ -87,7 +87,7 @@ bool HDMapInput::InitHDMap() {
// Option2: Load own map with different hdmap_sample_step_
// Load hdmap path from global_flagfile.txt
hdmap_file_
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
)
,
"/base_map.bin"
);
hdmap_file_
=
absl
::
StrCat
(
FLAGS_map_dir
,
"/base_map.bin"
);
AINFO
<<
"hdmap_file_: "
<<
hdmap_file_
;
if
(
!
apollo
::
cyber
::
common
::
PathExists
(
hdmap_file_
))
{
AERROR
<<
"Failed to find hadmap file: "
<<
hdmap_file_
;
...
...
modules/planning/common/message_process.cc
浏览文件 @
5b853b4a
...
...
@@ -58,7 +58,8 @@ using apollo::routing::RoutingResponse;
using
apollo
::
storytelling
::
CloseToJunction
;
using
apollo
::
storytelling
::
Stories
;
bool
MessageProcess
::
Init
(
const
PlanningConfig
&
planning_config
)
{
bool
MessageProcess
::
Init
(
const
PlanningConfig
&
planning_config
)
{
planning_config_
.
CopyFrom
(
planning_config
);
map_m_
[
"Sunnyvale"
]
=
"sunnyvale"
;
...
...
@@ -68,8 +69,7 @@ bool MessageProcess::Init(const PlanningConfig& planning_config) {
map_m_
[
"Sunnyvale Loop"
]
=
"sunnyvale_loop"
;
map_m_
[
"San Mateo"
]
=
"san_mateo"
;
map_name_
=
absl
::
GetFlag
(
FLAGS_map_dir
)
.
substr
(
absl
::
GetFlag
(
FLAGS_map_dir
).
find_last_of
(
"/"
)
+
1
);
map_name_
=
FLAGS_map_dir
.
substr
(
FLAGS_map_dir
.
find_last_of
(
"/"
)
+
1
);
obstacle_history_map_
.
clear
();
...
...
@@ -85,8 +85,9 @@ bool MessageProcess::Init(const PlanningConfig& planning_config) {
return
true
;
}
bool
MessageProcess
::
Init
(
const
PlanningConfig
&
planning_config
,
const
std
::
shared_ptr
<
DependencyInjector
>&
injector
)
{
bool
MessageProcess
::
Init
(
const
PlanningConfig
&
planning_config
,
const
std
::
shared_ptr
<
DependencyInjector
>&
injector
)
{
injector_
=
injector
;
return
Init
(
planning_config
);
}
...
...
@@ -123,7 +124,7 @@ void MessageProcess::OnHMIStatus(apollo::dreamview::HMIStatus hmi_status) {
if
(
map_m_
.
count
(
current_map
)
>
0
)
{
map_name_
=
map_m_
[
current_map
];
const
std
::
string
&
map_base_folder
=
"/apollo/modules/map/data/"
;
absl
::
SetFlag
(
&
FLAGS_map_dir
,
(
map_base_folder
+
map_name_
))
;
FLAGS_map_dir
=
map_base_folder
+
map_name_
;
}
}
...
...
@@ -173,8 +174,8 @@ void MessageProcess::OnLocalization(const LocalizationEstimate& le) {
FeatureOutput
::
InsertLearningDataFrame
(
record_file_
,
learning_data_frame
);
}
else
{
// online
injector_
->
learning_based_data
()
->
InsertLearningDataFrame
(
learning_data_frame
);
injector_
->
learning_based_data
()
->
InsertLearningDataFrame
(
learning_data_frame
);
}
}
...
...
modules/planning/integration_tests/garage_test.cc
浏览文件 @
5b853b4a
...
...
@@ -37,8 +37,8 @@ class GarageTest : public PlanningTestBase {
FLAGS_use_multi_thread_to_add_obstacles
=
false
;
FLAGS_enable_multi_thread_in_dp_st_graph
=
false
;
FLAGS_use_navigation_mode
=
false
;
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"modules/planning/testdata/garage_map"
)
;
absl
::
SetFlag
(
&
FLAGS_base_map_filename
,
"base_map.txt"
)
;
FLAGS_map_dir
=
"modules/planning/testdata/garage_map"
;
FLAGS_base_map_filename
=
"base_map.txt"
;
FLAGS_test_data_dir
=
"modules/planning/testdata/garage_test"
;
FLAGS_planning_upper_speed_limit
=
12.5
;
FLAGS_test_routing_response_file
=
"garage_routing.pb.txt"
;
...
...
modules/planning/integration_tests/planning_test_base.cc
浏览文件 @
5b853b4a
...
...
@@ -56,7 +56,7 @@ void PlanningTestBase::SetUpTestCase() {
"/apollo/modules/planning/conf/traffic_rule_config.pb.txt"
;
FLAGS_smoother_config_filename
=
"/apollo/modules/planning/conf/qp_spline_smoother_config.pb.txt"
;
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"/apollo/modules/planning/testdata"
)
;
FLAGS_map_dir
=
"/apollo/modules/planning/testdata"
;
FLAGS_test_localization_file
=
""
;
FLAGS_test_chassis_file
=
""
;
FLAGS_test_routing_response_file
=
""
;
...
...
modules/planning/integration_tests/sunnyvale_big_loop_test.cc
浏览文件 @
5b853b4a
...
...
@@ -45,8 +45,8 @@ class SunnyvaleBigLoopTest : public PlanningTestBase {
public:
virtual
void
SetUp
()
{
FLAGS_use_navigation_mode
=
false
;
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"modules/map/data/sunnyvale_big_loop"
)
;
absl
::
SetFlag
(
&
FLAGS_test_base_map_filename
,
"base_map.bin"
)
;
FLAGS_map_dir
=
"modules/map/data/sunnyvale_big_loop"
;
FLAGS_test_base_map_filename
=
"base_map.bin"
;
FLAGS_test_data_dir
=
"modules/planning/testdata/sunnyvale_big_loop_test"
;
FLAGS_planning_upper_speed_limit
=
12.5
;
...
...
modules/planning/integration_tests/sunnyvale_loop_test.cc
浏览文件 @
5b853b4a
...
...
@@ -33,8 +33,8 @@ class SunnyvaleLoopTest : public PlanningTestBase {
public:
virtual
void
SetUp
()
{
FLAGS_use_navigation_mode
=
false
;
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"modules/map/data/sunnyvale_loop"
)
;
absl
::
SetFlag
(
&
FLAGS_test_base_map_filename
,
"base_map_test.bin"
)
;
FLAGS_map_dir
=
"modules/map/data/sunnyvale_loop"
;
FLAGS_test_base_map_filename
=
"base_map_test.bin"
;
FLAGS_test_data_dir
=
"modules/planning/testdata/sunnyvale_loop_test"
;
FLAGS_planning_upper_speed_limit
=
12.5
;
FLAGS_use_multi_thread_to_add_obstacles
=
false
;
...
...
modules/planning/learning_based/img_feature_renderer/birdview_img_feature_renderer.cc
浏览文件 @
5b853b4a
...
...
@@ -46,8 +46,7 @@ bool BirdviewImgFeatureRenderer::Init(const PlanningSemanticMapConfig& config) {
apollo
::
hdmap
::
HDMapUtil
::
BaseMap
();
const
std
::
string
map_name
=
absl
::
GetFlag
(
FLAGS_map_dir
)
.
substr
(
absl
::
GetFlag
(
FLAGS_map_dir
).
find_last_of
(
"/"
)
+
1
);
FLAGS_map_dir
.
substr
(
FLAGS_map_dir
.
find_last_of
(
"/"
)
+
1
);
if
(
map_name
!=
"sunnyvale_with_two_offices"
&&
map_name
!=
"sunnyvale"
)
{
AERROR
<<
"Map other than sunnyvale_with_two_offices are not supported"
;
}
...
...
modules/planning/learning_based/model_inference/model_inference_test.cc
浏览文件 @
5b853b4a
...
...
@@ -43,9 +43,8 @@ class ModelInferenceTest : public ::testing::Test {
public:
virtual
~
ModelInferenceTest
()
=
default
;
virtual
void
SetUp
()
{
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"/apollo/modules/map/data/sunnyvale_with_two_offices"
);
absl
::
SetFlag
(
&
FLAGS_base_map_filename
,
"base_map.bin"
);
FLAGS_map_dir
=
"/apollo/modules/map/data/sunnyvale_with_two_offices"
;
FLAGS_base_map_filename
=
"base_map.bin"
;
}
};
...
...
modules/planning/pipeline/record_to_learning_data.cc
浏览文件 @
5b853b4a
...
...
@@ -30,7 +30,7 @@ namespace apollo {
namespace
planning
{
void
GenerateLearningData
()
{
AINFO
<<
"map_dir: "
<<
absl
::
GetFlag
(
FLAGS_map_dir
)
;
AINFO
<<
"map_dir: "
<<
FLAGS_map_dir
;
if
(
FLAGS_planning_offline_bags
.
empty
())
{
return
;
}
...
...
modules/prediction/common/kml_map_based_test.h
浏览文件 @
5b853b4a
...
...
@@ -26,8 +26,8 @@ namespace prediction {
class
KMLMapBasedTest
:
public
::
testing
::
Test
{
public:
KMLMapBasedTest
()
{
absl
::
SetFlag
(
&
FLAGS_map_dir
,
"modules/prediction/testdata"
)
;
absl
::
SetFlag
(
&
FLAGS_base_map_filename
,
"kml_map.bin"
)
;
FLAGS_map_dir
=
"modules/prediction/testdata"
;
FLAGS_base_map_filename
=
"kml_map.bin"
;
}
};
...
...
modules/v2x/v2x_proxy/app/v2x_proxy.cc
浏览文件 @
5b853b4a
...
...
@@ -35,14 +35,14 @@ V2xProxy::V2xProxy()
auto
x2v_trafficlight_timer_period
=
ceil
(
(
1.0
/
static_cast
<
int
>
(
FLAGS_x2v_trafficlight_timer_frequency
))
*
1000
);
x2v_trafficlight_timer_
.
reset
(
new
cyber
::
Timer
(
static_cast
<
uint32_t
>
(
x2v_trafficlight_timer_period
),
[
this
]()
{
this
->
OnX2vTrafficLightTimer
();
},
false
));
x2v_trafficlight_timer_
.
reset
(
new
cyber
::
Timer
(
static_cast
<
uint32_t
>
(
x2v_trafficlight_timer_period
),
[
this
]()
{
this
->
OnX2vTrafficLightTimer
();
},
false
));
auto
v2x_carstatus_timer_period
=
ceil
(
(
1.0
/
static_cast
<
int
>
(
FLAGS_v2x_carstatus_timer_frequency
))
*
1000
);
v2x_carstatus_timer_
.
reset
(
new
cyber
::
Timer
(
static_cast
<
uint32_t
>
(
v2x_carstatus_timer_period
),
[
this
]()
{
this
->
OnV2xCarStatusTimer
();
},
false
));
v2x_carstatus_timer_
.
reset
(
new
cyber
::
Timer
(
static_cast
<
uint32_t
>
(
v2x_carstatus_timer_period
),
[
this
]()
{
this
->
OnV2xCarStatusTimer
();
},
false
));
os_interface_
.
reset
(
new
OsInterFace
());
obu_interface_
.
reset
(
new
ObuInterFaceGrpcImpl
());
...
...
@@ -57,8 +57,7 @@ V2xProxy::V2xProxy()
}
hdmap_
.
reset
(
new
apollo
::
hdmap
::
HDMap
());
std
::
string
map_name
=
absl
::
StrCat
(
absl
::
GetFlag
(
FLAGS_map_dir
),
"/"
,
absl
::
GetFlag
(
FLAGS_base_map_filename
));
std
::
string
map_name
=
FLAGS_map_dir
+
"/"
+
FLAGS_base_map_filename
;
if
(
FLAGS_debug_flag
)
{
map_name
=
FLAGS_hdmap_file_name
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录