Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
d2de5e1a
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,体验更适合开发者的 AI 搜索 >>
提交
d2de5e1a
编写于
6月 07, 2019
作者:
X
Xiangquan Xiao
提交者:
Kecheng Xu
6月 07, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Robot: Code clean with clang-format.
上级
d52602bb
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
60 addition
and
86 deletion
+60
-86
modules/perception/camera/app/cipv_camera.cc
modules/perception/camera/app/cipv_camera.cc
+1
-1
modules/perception/camera/lib/obstacle/detector/yolo/yolo_obstacle_detector.cc
...mera/lib/obstacle/detector/yolo/yolo_obstacle_detector.cc
+8
-10
modules/planning/scenarios/lane_follow/lane_follow_stage.cc
modules/planning/scenarios/lane_follow/lane_follow_stage.cc
+2
-1
modules/planning/scenarios/park/pull_over/stage_approach.cc
modules/planning/scenarios/park/pull_over/stage_approach.cc
+4
-4
modules/planning/scenarios/scenario_manager.cc
modules/planning/scenarios/scenario_manager.cc
+2
-2
modules/planning/scenarios/util/util.cc
modules/planning/scenarios/util/util.cc
+27
-44
modules/planning/scenarios/util/util.h
modules/planning/scenarios/util/util.h
+3
-6
modules/planning/tasks/deciders/open_space_decider/open_space_pre_stop_decider.cc
...eciders/open_space_decider/open_space_pre_stop_decider.cc
+1
-2
modules/planning/tasks/deciders/open_space_decider/open_space_roi_decider.cc
...sks/deciders/open_space_decider/open_space_roi_decider.cc
+1
-2
modules/planning/tasks/deciders/path_bounds_decider/path_bounds_decider.cc
...tasks/deciders/path_bounds_decider/path_bounds_decider.cc
+6
-7
modules/planning/tasks/optimizers/piecewise_jerk_path/piecewise_jerk_path_optimizer.cc
...zers/piecewise_jerk_path/piecewise_jerk_path_optimizer.cc
+0
-1
modules/planning/tasks/optimizers/piecewise_jerk_path/piecewise_jerk_path_optimizer.h
...izers/piecewise_jerk_path/piecewise_jerk_path_optimizer.h
+2
-1
modules/planning/traffic_rules/destination.cc
modules/planning/traffic_rules/destination.cc
+1
-2
modules/prediction/evaluator/vehicle/junction_map_evaluator.cc
...es/prediction/evaluator/vehicle/junction_map_evaluator.cc
+2
-3
未找到文件。
modules/perception/camera/app/cipv_camera.cc
浏览文件 @
d2de5e1a
...
...
@@ -338,7 +338,7 @@ bool Cipv::FindClosestObjectGround(const std::shared_ptr<base::Object> &object,
double
theta_ray
=
atan2
(
pos
(
0
),
pos
(
2
));
double
theta
=
object
->
camera_supplement
.
alpha
+
theta_ray
;
theta
-=
M_PI_2
;
theta
-=
M_PI_2
;
if
(
debug_level_
>=
3
)
{
AINFO
<<
"object->camera_supplement.box = base::RectF("
...
...
modules/perception/camera/lib/obstacle/detector/yolo/yolo_obstacle_detector.cc
浏览文件 @
d2de5e1a
...
...
@@ -150,19 +150,17 @@ void YoloObstacleDetector::InitYoloBlob(const yolo::NetworkParam &net_param) {
auto
obj_blob_scale3
=
inference_
->
get_blob
(
net_param
.
det3_obj_blob
());
int
output_height_scale1
=
obj_blob_scale1
->
shape
(
1
);
int
output_width_scale1
=
obj_blob_scale1
->
shape
(
2
);
int
obj_size
=
output_height_scale1
*
output_width_scale1
*
static_cast
<
int
>
(
anchors_
.
size
())
/
anchorSizeFactor
;
int
obj_size
=
output_height_scale1
*
output_width_scale1
*
static_cast
<
int
>
(
anchors_
.
size
())
/
anchorSizeFactor
;
if
(
obj_blob_scale2
)
{
int
output_height_scale2
=
obj_blob_scale2
->
shape
(
1
);
int
output_width_scale2
=
obj_blob_scale2
->
shape
(
2
);
int
output_height_scale3
=
obj_blob_scale3
->
shape
(
1
);
int
output_width_scale3
=
obj_blob_scale3
->
shape
(
2
);
obj_size
=
(
output_height_scale1
*
output_width_scale1
+
output_height_scale2
*
output_width_scale2
+
output_height_scale3
*
output_width_scale3
)
*
static_cast
<
int
>
(
anchors_
.
size
())
/
anchorSizeFactor
/
numScales
;
obj_size
=
(
output_height_scale1
*
output_width_scale1
+
output_height_scale2
*
output_width_scale2
+
output_height_scale3
*
output_width_scale3
)
*
static_cast
<
int
>
(
anchors_
.
size
())
/
anchorSizeFactor
/
numScales
;
}
yolo_blobs_
.
res_box_blob
.
reset
(
...
...
@@ -341,8 +339,8 @@ bool YoloObstacleDetector::Detect(const ObstacleDetectorOptions &options,
/////////////////////////// detection part ///////////////////////////
inference_
->
Infer
();
AINFO
<<
"Network Forward: "
<<
static_cast
<
double
>
(
timer
.
Toc
())
*
0.001
<<
"ms"
;
AINFO
<<
"Network Forward: "
<<
static_cast
<
double
>
(
timer
.
Toc
())
*
0.001
<<
"ms"
;
get_objects_gpu
(
yolo_blobs_
,
stream_
,
types_
,
nms_
,
yolo_param_
.
model_param
(),
light_vis_conf_threshold_
,
light_swt_conf_threshold_
,
overlapped_
.
get
(),
idx_sm_
.
get
(),
&
(
frame
->
detected_objects
));
...
...
modules/planning/scenarios/lane_follow/lane_follow_stage.cc
浏览文件 @
d2de5e1a
...
...
@@ -285,7 +285,8 @@ void LaneFollowStage::PlanFallbackTrajectory(
const
double
min_speed_limit_v
=
reference_line_info
->
st_graph_data
().
is_initialized
()
?
reference_line_info
->
st_graph_data
()
.
speed_limit
().
GetMinSpeedLimitV
()
.
speed_limit
()
.
GetMinSpeedLimitV
()
:
std
::
numeric_limits
<
double
>::
infinity
();
const
double
curr_speed_distance
=
FLAGS_fallback_total_time
*
...
...
modules/planning/scenarios/park/pull_over/stage_approach.cc
浏览文件 @
d2de5e1a
...
...
@@ -76,7 +76,7 @@ Stage::StageStatus PullOverStageApproach::Process(
for
(
size_t
i
=
path_data
.
discretized_path
().
size
()
-
1
;
i
>=
0
;
--
i
)
{
if
(
path_data
.
frenet_frame_path
().
back
().
s
()
-
path_data
.
frenet_frame_path
()[
i
].
s
()
<
path_data
.
frenet_frame_path
()[
i
].
s
()
<
kNumExtraTailBoundPoint
*
kPathBoundsDeciderResolution
)
{
continue
;
}
...
...
@@ -106,14 +106,14 @@ Stage::StageStatus PullOverStageApproach::Process(
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()},
&
pull_over_sl
);
const
double
stop_line_s
=
pull_over_sl
.
s
()
-
const
double
stop_line_s
=
pull_over_sl
.
s
()
-
scenario_config_
.
s_distance_to_stop_for_open_space_parking
();
const
std
::
string
virtual_obstacle_id
=
"DEST_PULL_OVER_PREPARKING"
;
const
std
::
vector
<
std
::
string
>
wait_for_obstacle_ids
;
planning
::
util
::
BuildStopDecision
(
virtual_obstacle_id
,
stop_line_s
,
1.0
,
StopReasonCode
::
STOP_REASON_PREPARKING
,
wait_for_obstacle_ids
,
StopReasonCode
::
STOP_REASON_PREPARKING
,
wait_for_obstacle_ids
,
"PULL-OVER-scenario"
,
frame
,
&
(
frame
->
mutable_reference_line_info
()
->
front
()));
...
...
modules/planning/scenarios/scenario_manager.cc
浏览文件 @
d2de5e1a
...
...
@@ -976,8 +976,8 @@ void ScenarioManager::UpdatePlanningContextPullOverScenario(
const
auto
&
pull_over_status
=
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
pull_over_status
.
has_position
()
&&
pull_over_status
.
position
().
has_x
()
&&
pull_over_status
.
position
().
has_y
())
{
if
(
pull_over_status
.
has_position
()
&&
pull_over_status
.
position
().
has_x
()
&&
pull_over_status
.
position
().
has_y
())
{
const
auto
&
routing
=
frame
.
local_view
().
routing
;
if
(
routing
->
routing_request
().
waypoint_size
()
>=
2
)
{
// keep pull-over stop fence if destination not changed
...
...
modules/planning/scenarios/util/util.cc
浏览文件 @
d2de5e1a
...
...
@@ -73,11 +73,9 @@ PullOverStatus CheckADCPullOver(const ReferenceLineInfo& reference_line_info,
const
ScenarioPullOverConfig
&
scenario_config
)
{
const
auto
&
pull_over_status
=
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
!
pull_over_status
.
is_feasible
()
||
!
pull_over_status
.
has_position
()
||
if
(
!
pull_over_status
.
is_feasible
()
||
!
pull_over_status
.
has_position
()
||
!
pull_over_status
.
position
().
has_x
()
||
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
ADEBUG
<<
"pull_over status not set properly: "
<<
pull_over_status
.
DebugString
();
return
UNKNOWN
;
...
...
@@ -112,16 +110,13 @@ PullOverStatus CheckADCPullOver(const ReferenceLineInfo& reference_line_info,
const
common
::
math
::
Vec2d
adc_position
=
{
common
::
VehicleStateProvider
::
Instance
()
->
x
(),
common
::
VehicleStateProvider
::
Instance
()
->
y
()};
const
common
::
math
::
Vec2d
target_position
=
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()};
const
common
::
math
::
Vec2d
target_position
=
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()};
const
bool
position_check
=
CheckPullOverPositionBySL
(
reference_line_info
,
scenario_config
,
adc_position
,
common
::
VehicleStateProvider
::
Instance
()
->
heading
(),
target_position
,
pull_over_status
.
theta
(),
true
);
reference_line_info
,
scenario_config
,
adc_position
,
common
::
VehicleStateProvider
::
Instance
()
->
heading
(),
target_position
,
pull_over_status
.
theta
(),
true
);
return
position_check
?
PARK_COMPLETE
:
PARK_FAIL
;
}
...
...
@@ -135,24 +130,19 @@ PullOverStatus CheckADCPullOverPathPoint(
const
common
::
PathPoint
&
path_point
)
{
const
auto
&
pull_over_status
=
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
!
pull_over_status
.
is_feasible
()
||
!
pull_over_status
.
has_position
()
||
if
(
!
pull_over_status
.
is_feasible
()
||
!
pull_over_status
.
has_position
()
||
!
pull_over_status
.
position
().
has_x
()
||
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
ADEBUG
<<
"pull_over status not set properly: "
<<
pull_over_status
.
DebugString
();
return
UNKNOWN
;
}
const
common
::
math
::
Vec2d
target_position
=
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()};
const
common
::
math
::
Vec2d
target_position
=
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()};
const
bool
position_check
=
CheckPullOverPositionBySL
(
reference_line_info
,
scenario_config
,
{
path_point
.
x
(),
path_point
.
y
()},
path_point
.
theta
(),
target_position
,
pull_over_status
.
theta
(),
reference_line_info
,
scenario_config
,
{
path_point
.
x
(),
path_point
.
y
()},
path_point
.
theta
(),
target_position
,
pull_over_status
.
theta
(),
false
);
// check l + theta only
return
position_check
?
PARK_COMPLETE
:
PARK_FAIL
;
...
...
@@ -162,11 +152,9 @@ PullOverStatus CheckADCPullOverOpenSpace(
const
ScenarioPullOverConfig
&
scenario_config
)
{
const
auto
&
pull_over_status
=
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
!
pull_over_status
.
is_feasible
()
||
!
pull_over_status
.
has_position
()
||
if
(
!
pull_over_status
.
is_feasible
()
||
!
pull_over_status
.
has_position
()
||
!
pull_over_status
.
position
().
has_x
()
||
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
ADEBUG
<<
"pull_over status not set properly: "
<<
pull_over_status
.
DebugString
();
return
UNKNOWN
;
...
...
@@ -175,14 +163,12 @@ PullOverStatus CheckADCPullOverOpenSpace(
const
common
::
math
::
Vec2d
adc_position
=
{
common
::
VehicleStateProvider
::
Instance
()
->
x
(),
common
::
VehicleStateProvider
::
Instance
()
->
y
()};
const
common
::
math
::
Vec2d
target_position
=
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()};
const
common
::
math
::
Vec2d
target_position
=
{
pull_over_status
.
position
().
x
(),
pull_over_status
.
position
().
y
()};
const
bool
position_check
=
CheckPullOverPositionByDistance
(
scenario_config
,
adc_position
,
common
::
VehicleStateProvider
::
Instance
()
->
heading
(),
target_position
,
scenario_config
,
adc_position
,
common
::
VehicleStateProvider
::
Instance
()
->
heading
(),
target_position
,
pull_over_status
.
theta
());
return
position_check
?
PARK_COMPLETE
:
PARK_FAIL
;
...
...
@@ -193,8 +179,7 @@ bool CheckPullOverPositionBySL(const ReferenceLineInfo& reference_line_info,
const
common
::
math
::
Vec2d
&
adc_position
,
const
double
adc_theta
,
const
common
::
math
::
Vec2d
&
target_position
,
const
double
target_theta
,
const
bool
check_s
)
{
const
double
target_theta
,
const
bool
check_s
)
{
const
auto
&
reference_line
=
reference_line_info
.
reference_line
();
common
::
SLPoint
target_sl
;
reference_line
.
XYToSL
(
target_position
,
&
target_sl
);
...
...
@@ -212,10 +197,10 @@ bool CheckPullOverPositionBySL(const ReferenceLineInfo& reference_line_info,
// check s/l/theta diff
bool
ret
=
(
l_diff
<=
scenario_config
.
max_l_error_to_end_point
()
&&
theta_diff
<=
scenario_config
.
max_theta_error_to_end_point
());
theta_diff
<=
scenario_config
.
max_theta_error_to_end_point
());
if
(
check_s
)
{
ret
=
(
ret
&&
s_diff
>=
0
&&
s_diff
<=
scenario_config
.
max_s_error_to_end_point
());
s_diff
<=
scenario_config
.
max_s_error_to_end_point
());
}
return
ret
;
...
...
@@ -223,19 +208,17 @@ bool CheckPullOverPositionBySL(const ReferenceLineInfo& reference_line_info,
bool
CheckPullOverPositionByDistance
(
const
ScenarioPullOverConfig
&
scenario_config
,
const
common
::
math
::
Vec2d
&
adc_position
,
const
double
adc_theta
,
const
common
::
math
::
Vec2d
&
target_position
,
const
double
target_theta
)
{
const
common
::
math
::
Vec2d
&
adc_position
,
const
double
adc_theta
,
const
common
::
math
::
Vec2d
&
target_position
,
const
double
target_theta
)
{
const
double
distance_diff
=
adc_position
.
DistanceTo
(
target_position
);
const
double
theta_diff
=
std
::
fabs
(
common
::
math
::
NormalizeAngle
(
target_theta
-
adc_theta
));
ADEBUG
<<
"distance_diff["
<<
distance_diff
<<
"]
theta_diff["
<<
theta_diff
<<
"]
"
;
ADEBUG
<<
"distance_diff["
<<
distance_diff
<<
"] theta_diff["
<<
theta_diff
<<
"]"
;
// check distance/theta diff
return
(
distance_diff
<=
scenario_config
.
max_distance_error_to_end_point
()
&&
theta_diff
<=
scenario_config
.
max_theta_error_to_end_point
());
theta_diff
<=
scenario_config
.
max_theta_error_to_end_point
());
}
}
// namespace util
...
...
modules/planning/scenarios/util/util.h
浏览文件 @
d2de5e1a
...
...
@@ -53,15 +53,12 @@ bool CheckPullOverPositionBySL(const ReferenceLineInfo& reference_line_info,
const
common
::
math
::
Vec2d
&
adc_position
,
const
double
adc_theta
,
const
common
::
math
::
Vec2d
&
target_position
,
const
double
target_theta
,
const
bool
check_s
);
const
double
target_theta
,
const
bool
check_s
);
bool
CheckPullOverPositionByDistance
(
const
ScenarioPullOverConfig
&
scenario_config
,
const
common
::
math
::
Vec2d
&
adc_position
,
const
double
adc_theta
,
const
common
::
math
::
Vec2d
&
target_position
,
const
double
target_theta
);
const
common
::
math
::
Vec2d
&
adc_position
,
const
double
adc_theta
,
const
common
::
math
::
Vec2d
&
target_position
,
const
double
target_theta
);
}
// namespace util
}
// namespace scenario
...
...
modules/planning/tasks/deciders/open_space_decider/open_space_pre_stop_decider.cc
浏览文件 @
d2de5e1a
...
...
@@ -82,8 +82,7 @@ bool OpenSpacePreStopDecider::CheckPullOverPreStop(
*
target_s
=
0.0
;
const
auto
&
pull_over_status
=
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
pull_over_status
.
has_position
()
&&
pull_over_status
.
position
().
has_x
()
&&
if
(
pull_over_status
.
has_position
()
&&
pull_over_status
.
position
().
has_x
()
&&
pull_over_status
.
position
().
has_y
())
{
common
::
SLPoint
pull_over_sl
;
const
auto
&
reference_line
=
reference_line_info
->
reference_line
();
...
...
modules/planning/tasks/deciders/open_space_decider/open_space_roi_decider.cc
浏览文件 @
d2de5e1a
...
...
@@ -763,8 +763,7 @@ bool OpenSpaceRoiDecider::GetPullOverSpot(
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
!
pull_over_status
.
has_position
()
||
!
pull_over_status
.
position
().
has_x
()
||
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
!
pull_over_status
.
position
().
has_y
()
||
!
pull_over_status
.
has_theta
())
{
AERROR
<<
"Pull over position not set in planning context"
;
return
false
;
}
...
...
modules/planning/tasks/deciders/path_bounds_decider/path_bounds_decider.cc
浏览文件 @
d2de5e1a
...
...
@@ -351,10 +351,9 @@ std::string PathBoundsDecider::GeneratePullOverPathBound(
->
mutable_pull_over
();
// If already found a pull-over position, simply check if it's valid.
if
(
pull_over_status
->
is_feasible
()
&&
pull_over_status
->
has_position
())
{
int
curr_idx
=
IsPointWithinPathBound
(
reference_line_info
,
pull_over_status
->
position
().
x
(),
pull_over_status
->
position
().
y
(),
*
path_bound
);
int
curr_idx
=
IsPointWithinPathBound
(
reference_line_info
,
pull_over_status
->
position
().
x
(),
pull_over_status
->
position
().
y
(),
*
path_bound
);
if
(
curr_idx
>=
0
)
{
// Trim path-bound properly.
while
(
static_cast
<
int
>
(
path_bound
->
size
())
-
1
>
...
...
@@ -398,9 +397,9 @@ std::string PathBoundsDecider::GeneratePullOverPathBound(
pull_over_status
->
set_width_right
(
VehicleConfigHelper
::
GetConfig
().
vehicle_param
().
width
()
/
2.0
);
ADEBUG
<<
"Pull Over: x["
<<
pull_over_status
->
position
().
x
()
<<
"] y["
<<
pull_over_status
->
position
().
y
()
<<
"] theta["
<<
pull_over_status
->
theta
()
<<
"]"
;
ADEBUG
<<
"Pull Over: x["
<<
pull_over_status
->
position
().
x
()
<<
"] y["
<<
pull_over_status
->
position
().
y
()
<<
"] theta["
<<
pull_over_status
->
theta
()
<<
"]"
;
while
(
static_cast
<
int
>
(
path_bound
->
size
())
-
1
>
std
::
get
<
3
>
(
pull_over_configuration
)
+
kNumExtraTailBoundPoint
)
{
...
...
modules/planning/tasks/optimizers/piecewise_jerk_path/piecewise_jerk_path_optimizer.cc
浏览文件 @
d2de5e1a
...
...
@@ -170,7 +170,6 @@ bool PiecewiseJerkPathOptimizer::OptimizePath(
FLAGS_lateral_derivative_bound_default
);
piecewise_jerk_problem
.
set_dddx_bound
(
FLAGS_lateral_jerk_bound
);
/**
// Experimental code to be tested
// TODO(all): find the params in vehicle config
...
...
modules/planning/tasks/optimizers/piecewise_jerk_path/piecewise_jerk_path_optimizer.h
浏览文件 @
d2de5e1a
...
...
@@ -55,7 +55,8 @@ class PiecewiseJerkPathOptimizer : public PathOptimizer {
const
double
start_s
)
const
;
double
EstimateJerkBoundary
(
const
double
vehicle_speed
,
const
double
axis_distance
,
const
double
max_steering_rate
)
const
;
const
double
axis_distance
,
const
double
max_steering_rate
)
const
;
};
}
// namespace planning
...
...
modules/planning/traffic_rules/destination.cc
浏览文件 @
d2de5e1a
...
...
@@ -84,8 +84,7 @@ int Destination::MakeDecisions(Frame* frame,
if
(
FLAGS_enable_scenario_pull_over
)
{
const
auto
&
pull_over_status
=
PlanningContext
::
Instance
()
->
planning_status
().
pull_over
();
if
(
pull_over_status
.
is_feasible
()
&&
pull_over_status
.
has_position
()
&&
if
(
pull_over_status
.
is_feasible
()
&&
pull_over_status
.
has_position
()
&&
pull_over_status
.
position
().
has_x
()
&&
pull_over_status
.
position
().
has_y
())
{
// build stop decision based on pull-over position
...
...
modules/prediction/evaluator/vehicle/junction_map_evaluator.cc
浏览文件 @
d2de5e1a
...
...
@@ -88,9 +88,8 @@ bool JunctionMapEvaluator::Evaluate(Obstacle* obstacle_ptr) {
for
(
size_t
i
=
0
;
i
<
feature_values
.
size
();
++
i
)
{
junction_exit_mask
[
0
][
i
]
=
static_cast
<
float
>
(
feature_values
[
i
]);
}
torch_inputs
.
push_back
(
torch
::
jit
::
Tuple
::
create
({
img_tensor
.
to
(
device_
),
junction_exit_mask
.
to
(
device_
)}));
torch_inputs
.
push_back
(
torch
::
jit
::
Tuple
::
create
(
{
img_tensor
.
to
(
device_
),
junction_exit_mask
.
to
(
device_
)}));
// Compute probability
std
::
vector
<
double
>
probability
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录