Skip to content

Commit 044003b

Browse files
author
wangchuang03
committed
fix: cyber_recorder and some path fix
- cyber: - 663c028c77 fix(tools):fix path bug - f2f411550e fix: cyber_recorder bugfix - dreamview: - 67b71f2783 Feat(dreamview_plus\dreamview): change absolute path to relative path to load vehicle configs,distinguish different logics between modules/calibration/data and profiles - planning: - 11bde9ccfa fix(planning): set planning_interface_base enable_source=True - a2bd3b5cd5 fix(tools): fix planning tool bug - perception: - c78716b538 fix(perception): update launch command in scripts Signed-off-by: wangchuang03 <[email protected]> Change-Id: I00d148549db9e2fd0e3f42666587fd65af0e9447
1 parent 411b692 commit 044003b

File tree

16 files changed

+36
-22
lines changed

16 files changed

+36
-22
lines changed

cyber/tools/cyber_recorder/recorder.cc

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,16 @@ bool Recorder::InitReadersImpl() {
202202
}
203203

204204
// listen new writers in future
205-
change_conn_ = channel_manager->AddChangeListener(
206-
std::bind(&Recorder::TopologyCallback, this, std::placeholders::_1));
205+
// must use async callback, otherwise deadlock may be occurred.
206+
auto topology_callback =
207+
[this](const apollo::cyber::proto::ChangeMsg& change_msg) {
208+
apollo::cyber::Async(
209+
[this, change_msg] { this->TopologyCallback(change_msg); });
210+
};
211+
change_conn_ = channel_manager->AddChangeListener(topology_callback);
212+
// change_conn_ = channel_manager->AddChangeListener(
213+
// std::bind(&Recorder::TopologyCallback, this, std::placeholders::_1));
214+
207215
if (!change_conn_.IsConnected()) {
208216
AERROR << "change connection is not connected";
209217
return false;

modules/dreamview/backend/common/util/hmi_util.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "absl/strings/str_split.h"
2424

2525
#include "cyber/common/file.h"
26+
#include "cyber/common/environment.h"
2627
#include "modules/common/util/map_util.h"
2728
#include "modules/dreamview/backend/common/dreamview_gflags.h"
2829

@@ -92,7 +93,13 @@ HMIConfig HMIUtil::LoadConfig(std::string config_path) {
9293
<< "No modes config loaded";
9394

9495
*config.mutable_maps() = ListDirAsDict(FLAGS_maps_data_path);
95-
*config.mutable_vehicles() = ListDirAsDict(FLAGS_vehicles_config_path);
96+
std::string vehicles_config_path;
97+
if (apollo::cyber::common::GetFilePathWithEnv(FLAGS_vehicles_config_path,
98+
"APOLLO_ENV_WORKROOT",
99+
&vehicles_config_path)) {
100+
AINFO << "Get vehicles config path success: " << vehicles_config_path;
101+
*config.mutable_vehicles() = ListDirAsDict(vehicles_config_path);
102+
}
96103
AINFO << "Loaded HMI config: " << config.DebugString();
97104
return config;
98105
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--flagfile=modules/common/data/global_flagfile.txt
22

33
# If you are in package develop mode, use profiles change vehicle type.
4-
# --vehicles_config_path=/apollo_workspace/profiles
4+
# --vehicles_config_path=profiles
55
# --vehicle_changed_use_copy_mode=false

modules/dreamview_plus/conf/dreamview.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
--default_hmi_mode=Default
88
--server_ports=8888
99
# If you are in package develop mode, use profiles change vehicle type.
10-
# --vehicles_config_path=/apollo_workspace/profiles
10+
# --vehicles_config_path=profiles
1111
# --vehicle_changed_use_copy_mode=false

modules/perception/lidar_detection/tools/offline_lidar_detection.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ output_path="/apollo/data/output/"
2121

2222
mkdir -p $output_path && rm -rf $output_path/*
2323

24-
/apollo/bazel-bin/modules/perception/lidar_detection/tools/offline_lidar_detection \
24+
offline_lidar_detection \
2525
--pcd_path=$pcd_path \
2626
--output_path=$output_path \
2727
--detector_name=CNNSegmentation \

modules/perception/pointcloud_ground_detection/tools/offline_pointcloud_ground_detection.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ output_path="/apollo/data/output/"
2121

2222
mkdir -p $output_path && rm -rf $output_path/*
2323

24-
/apollo/bazel-bin/modules/perception/pointcloud_ground_detection/tools/offline_pointcloud_ground_detection \
24+
offline_pointcloud_ground_detection \
2525
--pcd_path=$pcd_path \
2626
--output_path=$output_path \
2727
--ground_detector_name=SpatioTemporalGroundDetector \

modules/perception/tools/offline_camera_detection/offline_camera_detection.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@
1717
###############################################################################
1818

1919

20-
/apollo/bazel-bin/modules/perception/tools/offline_camera_detection/offline_camera_detection "$@"
20+
offline_camera_detection "$@"

modules/planning/planning_base/tools/planning_task_stats.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#!/usr/bin/env python3
12
import argparse
23
import os
34
import fnmatch

modules/planning/planning_interface_base/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,6 @@ apollo_cc_library(
6262
],
6363
)
6464

65-
apollo_package(enable_source=False)
65+
apollo_package()
6666

6767
cpplint()

modules/tools/open_space_visualization/distance_approach_python_interface.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,7 @@
2727

2828
APOLLO_DISTRIBUTION_HOME = os.environ.get(
2929
'APOLLO_DISTRIBUTION_HOME', '/opt/apollo/neo')
30-
if APOLLO_DISTRIBUTION_HOME.startswith('/opt/apollo/neo'):
31-
lib_path = f"{APOLLO_DISTRIBUTION_HOME}/lib/modules/planning/planning_open_space/distance_approach_problem_wrapper_lib.so"
32-
else:
33-
lib_path = f"{APOLLO_DISTRIBUTION_HOME}/bazel-bin/modules/planning/planning_open_space/distance_approach_problem_wrapper_lib.so"
30+
lib_path = f"{APOLLO_DISTRIBUTION_HOME}/lib/modules/planning/planning_open_space/distance_approach_problem_wrapper_lib.so"
3431

3532
lib = cdll.LoadLibrary(lib_path)
3633

0 commit comments

Comments
 (0)