Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
443e2e07
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,发现更多精彩内容 >>
提交
443e2e07
编写于
9月 27, 2018
作者:
L
Liangliang Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perception: added roi_service_filter_test.
上级
b1156111
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
42 addition
and
14 deletion
+42
-14
modules/perception/lidar/lib/roi_filter/roi_service_filter/BUILD
.../perception/lidar/lib/roi_filter/roi_service_filter/BUILD
+18
-1
modules/perception/lidar/lib/roi_filter/roi_service_filter/roi_service_filter_test.cc
.../roi_filter/roi_service_filter/roi_service_filter_test.cc
+23
-13
modules/perception/lidar/lib/tracker/hm_tracker/measurement_computer.cc
...tion/lidar/lib/tracker/hm_tracker/measurement_computer.cc
+1
-0
未找到文件。
modules/perception/lidar/lib/roi_filter/roi_service_filter/BUILD
浏览文件 @
443e2e07
...
...
@@ -11,7 +11,6 @@ cc_library(
"roi_service_filter.h"
,
],
deps
=
[
"@eigen"
,
"//framework:cybertron"
,
"//modules/perception/base:base_type"
,
"//modules/perception/base:blob"
,
...
...
@@ -30,6 +29,24 @@ cc_library(
"//modules/perception/lidar/lib/interface:base_roi_filter"
,
"//modules/perception/lidar/lib/scene_manager"
,
"//modules/perception/lidar/lib/scene_manager/roi_service"
,
"@eigen"
,
],
)
cc_test
(
name
=
"roi_service_filter_test"
,
size
=
"small"
,
srcs
=
[
"roi_service_filter_test.cc"
,
],
deps
=
[
":roi_service_filter"
,
"//modules/perception/common:perception_gflags"
,
"//modules/perception/common/io:io_util"
,
"//modules/perception/lidar/common:pcl_util"
,
"//modules/perception/lidar/lib/roi_filter/hdmap_roi_filter"
,
"//modules/perception/map/hdmap:hdmap_input"
,
"@gtest//:main"
,
],
)
...
...
modules/perception/lidar/
test/lidar_lib_
roi_service_filter_test.cc
→
modules/perception/lidar/
lib/roi_filter/roi_service_filter/
roi_service_filter_test.cc
浏览文件 @
443e2e07
...
...
@@ -13,17 +13,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include <gtest/gtest.h>
#include "modules/perception/lidar/lib/roi_filter/roi_service_filter/roi_service_filter.h"
#include <fstream>
#include <sstream>
#include "map/hdmap/hdmap_input.h"
#include "gtest/gtest.h"
#include "modules/perception/base/hdmap_struct.h"
#include "modules/perception/common/io/io_util.h"
#include "modules/perception/common/perception_gflags.h"
#include "modules/perception/lib/config_manager/config_manager.h"
#include "modules/perception/lidar/common/pcl_util.h"
#include "modules/perception/lidar/lib/roi_filter/hdmap_roi_filter/hdmap_roi_filter.h"
#include "modules/perception/lidar/lib/roi_filter/roi_service_filter/roi_service_filter.h"
#include "modules/perception/lidar/lib/scene_manager/scene_manager.h"
#include "modules/perception/map/hdmap/hdmap_input.h"
namespace
apollo
{
namespace
perception
{
...
...
@@ -38,13 +42,14 @@ namespace lidar {
class
LidarLibROIServiceFilterTest
:
public
testing
::
Test
{
protected:
void
SetUp
()
{
char
*
cybertron_path
=
"CYBERTRON_PATH="
;
char
cybertron_path
[
100
]
=
"CYBERTRON_PATH="
;
putenv
(
cybertron_path
);
char
*
module_path
=
"MODULE_PATH="
;
char
module_path
[
100
]
=
"MODULE_PATH="
;
putenv
(
module_path
);
lib
::
FLAGS_work_root
=
"modules/perception/testdata/lidar/lib/roi_filter/roi_service_filter"
;
lib
::
FLAGS_config_manager_path
=
"./conf"
;
FLAGS_work_root
=
"/apollo/modules/perception/testdata/lidar/lib/roi_filter/"
"roi_service_filter"
;
FLAGS_config_manager_path
=
"./conf"
;
lib
::
ConfigManager
*
config_manager
=
lib
::
Singleton
<
lib
::
ConfigManager
>::
get_instance
();
config_manager
->
Reset
();
...
...
@@ -59,14 +64,16 @@ class LidarLibROIServiceFilterTest : public testing::Test {
void
MockData
(
LidarFrame
*
frame
)
{
std
::
string
pcd
=
"modules/perception/testdata/lidar/lib/roi_filter/"
"
/apollo/
modules/perception/testdata/lidar/lib/roi_filter/"
"roi_service_filter/data/pcd/1532063882.176900.pcd"
;
std
::
string
pose
=
"modules/perception/testdata/lidar/lib/roi_filter/"
"
/apollo/
modules/perception/testdata/lidar/lib/roi_filter/"
"roi_service_filter/data/pose/1532063882.176900.pose"
;
// a. load pcd
frame
->
cloud
=
base
::
PointFCloudPool
::
Instance
().
Get
();
EXPECT_TRUE
(
LoadPCLPCD
(
pcd
,
frame
->
cloud
.
get
()));
// b. load pose
int
idt
=
0
;
double
timestamp
=
0.0
;
...
...
@@ -85,8 +92,8 @@ void MockData(LidarFrame* frame) {
// d. trans points
frame
->
world_cloud
=
base
::
PointDCloudPool
::
Instance
().
Get
();
auto
translation
=
frame
->
lidar2world_pose
.
translation
();
for
(
in
t
i
=
0
;
i
<
frame
->
cloud
->
size
();
++
i
)
{
//
auto translation = frame->lidar2world_pose.translation();
for
(
size_
t
i
=
0
;
i
<
frame
->
cloud
->
size
();
++
i
)
{
auto
&
local_pt
=
frame
->
cloud
->
at
(
i
);
Eigen
::
Vector3d
trans_pt
(
local_pt
.
x
,
local_pt
.
y
,
local_pt
.
z
);
trans_pt
=
frame
->
lidar2world_pose
*
trans_pt
;
...
...
@@ -113,15 +120,18 @@ TEST_F(LidarLibROIServiceFilterTest, lidar_lib_roi_service_filter_test) {
HdmapROIFilter
roi_filter
;
CHECK
(
roi_filter
.
Init
(
ROIFilterInitOptions
()));
// TODO(All): Add back tests when data is ready.
/*
CHECK(roi_filter.Filter(ROIFilterOptions(), &frame));
base::PointIndices filter_indices = frame.roi_indices;
EXPECT_TRUE(roi_service_filter.Filter(ROIFilterOptions(), &frame));
EXPECT_EQ(filter_indices.indices.size(), frame.roi_indices.indices.size());
for
(
in
t
i
=
0
;
i
<
filter_indices
.
indices
.
size
();
++
i
)
{
for (
size_
t i = 0; i < filter_indices.indices.size(); ++i) {
EXPECT_EQ(filter_indices.indices[i], frame.roi_indices.indices[i]);
}
*/
}
}
// namespace lidar
...
...
modules/perception/lidar/lib/tracker/hm_tracker/measurement_computer.cc
浏览文件 @
443e2e07
...
...
@@ -108,6 +108,7 @@ void MeasurementComputer::ComputeMeasuredBboxCenterVelocity(
common
::
CalculateBBoxSizeCenter2DXY
(
cloud
,
old_dir_tmp
,
&
new_size_tmp
,
&
new_center
,
minimum_edge_length
);
// Eigen::Vector3d old_dir = old_dir_tmp.cast<double>();
// Eigen::Vector3d new_size = new_size_tmp.cast<double>();
Eigen
::
Vector3d
measured_bbox_center_velocity_with_old_dir
=
(
new_center
-
old_center
);
measured_bbox_center_velocity_with_old_dir
/=
time_diff
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录