Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
3e5d860c
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 搜索 >>
提交
3e5d860c
编写于
11月 26, 2018
作者:
T
Tae Eun Choe
提交者:
Jiangtao Hu
12月 13, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perception: Handle velocity with NaN; Removed some warnings
上级
0d4c12b0
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
43 addition
and
26 deletion
+43
-26
modules/common/time/time_util.h
modules/common/time/time_util.h
+2
-1
modules/perception/camera/lib/obstacle/tracker/omt/omt_obstacle_tracker.cc
...n/camera/lib/obstacle/tracker/omt/omt_obstacle_tracker.cc
+10
-10
modules/perception/fusion/base/sensor.cc
modules/perception/fusion/base/sensor.cc
+1
-1
modules/perception/fusion/common/kalman_filter.cc
modules/perception/fusion/common/kalman_filter.cc
+1
-1
modules/perception/fusion/common/kalman_filter.h
modules/perception/fusion/common/kalman_filter.h
+4
-4
modules/perception/fusion/lib/data_fusion/motion_fusion/kalman_motion_fusion/kalman_motion_fusion.cc
...otion_fusion/kalman_motion_fusion/kalman_motion_fusion.cc
+2
-2
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_filter.cc
...lidar/lib/tracker/multi_lidar_fusion/mlf_motion_filter.cc
+3
-0
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_filter.h
.../lidar/lib/tracker/multi_lidar_fusion/mlf_motion_filter.h
+2
-0
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_measurement.cc
.../lib/tracker/multi_lidar_fusion/mlf_motion_measurement.cc
+3
-1
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_measurement.h
...r/lib/tracker/multi_lidar_fusion/mlf_motion_measurement.h
+2
-0
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_refiner.cc
...idar/lib/tracker/multi_lidar_fusion/mlf_motion_refiner.cc
+6
-1
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_refiner.h
...lidar/lib/tracker/multi_lidar_fusion/mlf_motion_refiner.h
+1
-0
modules/perception/onboard/component/fusion_camera_detection_component.cc
...on/onboard/component/fusion_camera_detection_component.cc
+6
-5
未找到文件。
modules/common/time/time_util.h
浏览文件 @
3e5d860c
...
...
@@ -51,7 +51,8 @@ class TimeUtil {
static
double
GetCurrentTime
()
{
struct
timeval
tv
;
gettimeofday
(
&
tv
,
nullptr
);
const
double
timestamp
=
tv
.
tv_sec
*
1000000
+
tv
.
tv_usec
;
const
double
timestamp
=
static_cast
<
double
>
(
tv
.
tv_sec
*
1000000
+
tv
.
tv_usec
);
return
timestamp
/
1000000
;
}
...
...
modules/perception/camera/lib/obstacle/tracker/omt/omt_obstacle_tracker.cc
浏览文件 @
3e5d860c
...
...
@@ -133,9 +133,9 @@ bool OMTObstacleTracker::CombineDuplicateTargets() {
<<
","
<<
targets_
[
j
].
id
<<
") score "
<<
score
<<
" count "
<<
count
;
hypo
.
target
=
i
;
hypo
.
object
=
j
;
hypo
.
score
=
(
count
>
0
)
?
score
/
(
count
)
:
0
;
hypo
.
target
=
static_cast
<
int
>
(
i
)
;
hypo
.
object
=
static_cast
<
int
>
(
j
)
;
hypo
.
score
=
(
count
>
0
)
?
score
/
static_cast
<
float
>
(
count
)
:
0
;
if
(
hypo
.
score
<
omt_param_
.
target_combine_iou_threshold
())
{
continue
;
}
...
...
@@ -185,8 +185,8 @@ void OMTObstacleTracker::GenerateHypothesis(const TrackObjectPtrs &objects) {
for
(
size_t
i
=
0
;
i
<
targets_
.
size
();
++
i
)
{
ADEBUG
<<
"Target "
<<
targets_
[
i
].
id
;
for
(
size_t
j
=
0
;
j
<
objects
.
size
();
++
j
)
{
hypo
.
target
=
i
;
hypo
.
object
=
j
;
hypo
.
target
=
static_cast
<
int
>
(
i
)
;
hypo
.
object
=
static_cast
<
int
>
(
j
)
;
float
sa
=
ScoreAppearance
(
targets_
[
i
],
objects
[
j
]);
float
sm
=
ScoreMotion
(
targets_
[
i
],
objects
[
j
]);
float
ss
=
ScoreShape
(
targets_
[
i
],
objects
[
j
]);
...
...
@@ -279,7 +279,7 @@ float OMTObstacleTracker::ScoreAppearance(const Target &target,
count
+=
1
;
}
return
energy
/
(
0.1
f
+
count
*
0.9
f
);
return
energy
/
(
0.1
f
+
static_cast
<
float
>
(
count
)
*
0.9
f
);
}
// [new]
...
...
@@ -347,8 +347,8 @@ int OMTObstacleTracker::CreateNewTarget(const TrackObjectPtrs &objects) {
continue
;
}
for
(
auto
&&
target_rect
:
target_rects
)
{
if
(
IsCovered
(
rect
,
target_rect
,
0.4
)
||
IsCoveredHorizon
(
rect
,
target_rect
,
0.5
))
{
if
(
IsCovered
(
rect
,
target_rect
,
0.4
f
)
||
IsCoveredHorizon
(
rect
,
target_rect
,
0.5
f
))
{
is_covered
=
true
;
break
;
}
...
...
@@ -391,9 +391,9 @@ bool OMTObstacleTracker::Associate2D(const ObstacleTrackerOptions &options,
// TODO(gaohan): use pool
TrackObjectPtr
track_ptr
(
new
TrackObject
);
track_ptr
->
object
=
frame
->
detected_objects
[
i
];
track_ptr
->
object
->
id
=
i
;
track_ptr
->
object
->
id
=
static_cast
<
int
>
(
i
)
;
track_ptr
->
timestamp
=
frame
->
timestamp
;
track_ptr
->
indicator
=
PatchIndicator
(
frame
->
frame_id
,
i
,
track_ptr
->
indicator
=
PatchIndicator
(
frame
->
frame_id
,
static_cast
<
int
>
(
i
)
,
frame
->
data_provider
->
sensor_name
());
track_ptr
->
object
->
camera_supplement
.
sensor_name
=
frame
->
data_provider
->
sensor_name
();
...
...
modules/perception/fusion/base/sensor.cc
浏览文件 @
3e5d860c
...
...
@@ -55,7 +55,7 @@ bool Sensor::GetPose(double timestamp, Eigen::Affine3d* pose) const {
for
(
int
i
=
static_cast
<
int
>
(
frames_
.
size
())
-
1
;
i
>=
0
;
--
i
)
{
double
time_diff
=
timestamp
-
frames_
[
i
]
->
GetTimestamp
();
if
(
fabs
(
time_diff
)
<
1.0e-3
)
{
if
(
fabs
(
time_diff
)
<
1.0e-3
)
{
// > ?
return
frames_
[
i
]
->
GetPose
(
pose
);
}
}
...
...
modules/perception/fusion/common/kalman_filter.cc
浏览文件 @
3e5d860c
...
...
@@ -28,7 +28,7 @@ bool KalmanFilter::Init(const Eigen::VectorXd &initial_belief_states,
AERROR
<<
"the cols and rows of uncertainty martix should be equal"
;
return
false
;
}
states_num_
=
initial_uncertainty
.
rows
(
);
states_num_
=
static_cast
<
int
>
(
initial_uncertainty
.
rows
()
);
if
(
states_num_
<=
0
)
{
AERROR
<<
"state_num should be greater than zero"
;
...
...
modules/perception/fusion/common/kalman_filter.h
浏览文件 @
3e5d860c
...
...
@@ -55,9 +55,9 @@ class KalmanFilter : public BaseFilter {
bool
DeCorrelation
(
int
x
,
int
y
,
int
x_len
,
int
y_len
);
void
CorrectionBreakdown
();
bool
SetGainBreakdownThresh
(
const
std
::
vector
<
bool
>
&
break_down
,
const
float
threshold
=
2.0
);
const
float
threshold
=
2.0
f
);
bool
SetValueBreakdownThresh
(
const
std
::
vector
<
bool
>
&
break_down
,
const
float
threshold
=
0.05
);
const
float
threshold
=
0.05
f
);
private:
// @brief kalman gain
...
...
@@ -66,8 +66,8 @@ class KalmanFilter : public BaseFilter {
Eigen
::
VectorXd
value_break_down_
;
Eigen
::
MatrixXd
kalman_gain_
;
float
value_break_down_threshold_
=
999.0
;
float
gain_break_down_threshold_
=
0.0
;
float
value_break_down_threshold_
=
999.0
f
;
float
gain_break_down_threshold_
=
0.0
f
;
};
}
// namespace fusion
...
...
modules/perception/fusion/lib/data_fusion/motion_fusion/kalman_motion_fusion/kalman_motion_fusion.cc
浏览文件 @
3e5d860c
...
...
@@ -372,8 +372,8 @@ void KalmanMotionFusion::RewardRMatrix(const base::SensorType& sensor_type,
Eigen
::
MatrixXd
*
r_matrix
)
{
common
::
SensorManager
*
sensor_manager
=
lib
::
Singleton
<
common
::
SensorManager
>::
get_instance
();
const
float
converged_scale
=
0.01
;
const
float
unconverged_scale
=
1000.0
;
const
float
converged_scale
=
0.01
f
;
const
float
unconverged_scale
=
1000.0
f
;
if
(
sensor_manager
->
IsLidar
(
sensor_type
))
{
if
(
converged
)
{
r_matrix
->
setIdentity
();
...
...
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_filter.cc
浏览文件 @
3e5d860c
...
...
@@ -148,6 +148,9 @@ void MlfMotionFilter::KalmanFilterUpdateWithPartialObservation(
double
time_diff
=
new_object
->
object_ptr
->
latest_tracked_time
-
latest_object
->
object_ptr
->
latest_tracked_time
;
if
(
time_diff
<
EPSION_TIME
)
{
// Very small time than assign
time_diff
=
DEFAULT_FPS
;
}
Eigen
::
Matrix4d
transition
=
Eigen
::
Matrix4d
::
Identity
();
transition
(
0
,
2
)
=
transition
(
1
,
3
)
=
time_diff
;
...
...
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_filter.h
浏览文件 @
3e5d860c
...
...
@@ -135,6 +135,8 @@ class MlfMotionFilter : public MlfBaseFilter {
void
BeliefToOutput
(
TrackedObjectPtr
object
);
protected:
const
double
EPSION_TIME
=
1e-3
;
const
double
DEFAULT_FPS
=
0.1
;
// motion measurement
std
::
shared_ptr
<
MlfMotionMeasurement
>
motion_measurer_
;
// motion refiner
...
...
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_measurement.cc
浏览文件 @
3e5d860c
...
...
@@ -41,7 +41,9 @@ void MlfMotionMeasurement::ComputeMotionMeasurment(
double
latest_time
=
latest_object
->
object_ptr
->
latest_tracked_time
;
double
current_time
=
new_object
->
object_ptr
->
latest_tracked_time
;
double
time_diff
=
current_time
-
latest_time
;
if
(
fabs
(
time_diff
)
<
EPSILON_TIME
)
{
time_diff
=
DEFAULT_FPS
;
}
MeasureAnchorPointVelocity
(
new_object
,
latest_object
,
time_diff
);
MeasureBboxCenterVelocity
(
new_object
,
latest_object
,
time_diff
);
MeasureBboxCornerVelocity
(
new_object
,
latest_object
,
time_diff
);
...
...
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_measurement.h
浏览文件 @
3e5d860c
...
...
@@ -51,6 +51,8 @@ class MlfMotionMeasurement {
TrackedObjectPtr
new_object
);
private:
const
double
EPSILON_TIME
=
1e-3
;
// or numeric_limits<double>::epsilon()
const
double
DEFAULT_FPS
=
0.1
;
DISALLOW_COPY_AND_ASSIGN
(
MlfMotionMeasurement
);
};
// class MlfMotionMeasurement
...
...
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_refiner.cc
浏览文件 @
3e5d860c
...
...
@@ -56,7 +56,12 @@ bool MlfMotionRefiner::Refine(const MlfTrackDataConstPtr& track_data,
double
time_diff
=
new_object
->
object_ptr
->
latest_tracked_time
-
latest_object
->
object_ptr
->
latest_tracked_time
;
Eigen
::
Vector3d
filter_velocity_gain
=
new_object
->
belief_velocity_gain
;
double
filter_acceleration_gain
=
filter_velocity_gain
.
norm
()
/
time_diff
;
double
filter_acceleration_gain
=
0.0
;
if
(
fabs
(
time_diff
)
<
EPSION_TIME
)
{
filter_acceleration_gain
=
0.0
;
}
else
{
filter_acceleration_gain
=
filter_velocity_gain
.
norm
()
/
time_diff
;
}
bool
need_keep_motion
=
filter_acceleration_gain
>
claping_acceleration_threshold_
;
// use tighter threshold for pedestrian
...
...
modules/perception/lidar/lib/tracker/multi_lidar_fusion/mlf_motion_refiner.h
浏览文件 @
3e5d860c
...
...
@@ -70,6 +70,7 @@ class MlfMotionRefiner {
protected:
double
claping_acceleration_threshold_
=
10
;
double
claping_speed_threshold_
=
1.0
;
const
double
EPSION_TIME
=
1e-3
;
};
// class MlfMotionRefiner
}
// namespace lidar
...
...
modules/perception/onboard/component/fusion_camera_detection_component.cc
浏览文件 @
3e5d860c
...
...
@@ -331,9 +331,10 @@ int FusionCameraDetectionComponent::InitConfig() {
fusion_camera_detection_param
.
output_final_obstacles
();
prefused_channel_name_
=
fusion_camera_detection_param
.
prefused_channel_name
();
default_camera_pitch_
=
fusion_camera_detection_param
.
default_camera_pitch
();
default_camera_pitch_
=
static_cast
<
float
>
(
fusion_camera_detection_param
.
default_camera_pitch
());
default_camera_height_
=
fusion_camera_detection_param
.
default_camera_height
(
);
static_cast
<
float
>
(
fusion_camera_detection_param
.
default_camera_height
()
);
output_camera_debug_msg_
=
fusion_camera_detection_param
.
output_camera_debug_msg
();
camera_debug_channel_name_
=
...
...
@@ -398,8 +399,8 @@ int FusionCameraDetectionComponent::InitSensorInfo() {
// assume all camera have same image size
base
::
BaseCameraModelPtr
camera_model_ptr
=
sensor_manager
->
GetUndistortCameraModel
(
camera_names_
[
0
]);
image_width_
=
camera_model_ptr
->
get_width
(
);
image_height_
=
camera_model_ptr
->
get_height
(
);
image_width_
=
static_cast
<
int
>
(
camera_model_ptr
->
get_width
()
);
image_height_
=
static_cast
<
int
>
(
camera_model_ptr
->
get_height
()
);
std
::
string
format_str
=
R"(
camera_names: %s %s
...
...
@@ -704,7 +705,7 @@ int FusionCameraDetectionComponent::ConvertObjectToPb(
pb_msg
->
set_height
(
object_ptr
->
size
(
2
));
// convert 3d bbox to polygon
int
polygon_point_size
=
object_ptr
->
polygon
.
size
(
);
int
polygon_point_size
=
static_cast
<
int
>
(
object_ptr
->
polygon
.
size
()
);
for
(
int
i
=
0
;
i
<
polygon_point_size
;
++
i
)
{
auto
&
pt
=
object_ptr
->
polygon
.
at
(
i
);
apollo
::
common
::
Point3D
*
p
=
pb_msg
->
add_polygon_point
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录