Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Pinoxchio
apollo
提交
03b5ee3b
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,发现更多精彩内容 >>
提交
03b5ee3b
编写于
9月 24, 2018
作者:
L
Liangliang Zhang
提交者:
GitHub
9月 24, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Perception: added build for box and object. (#436)
上级
96457781
变更
12
显示空白变更内容
内联
并排
Showing
12 changed file
with
93 addition
and
39 deletion
+93
-39
.travis.yml
.travis.yml
+1
-1
apollo.sh
apollo.sh
+2
-1
modules/perception/base/BUILD
modules/perception/base/BUILD
+52
-0
modules/perception/base/box.h
modules/perception/base/box.h
+6
-16
modules/perception/base/box_test.cc
modules/perception/base/box_test.cc
+5
-2
modules/perception/base/comparison_traits.h
modules/perception/base/comparison_traits.h
+1
-0
modules/perception/base/object.cc
modules/perception/base/object.cc
+1
-0
modules/perception/base/object.h
modules/perception/base/object.h
+4
-5
modules/perception/base/object_supplement.h
modules/perception/base/object_supplement.h
+13
-12
modules/perception/base/object_test.cc
modules/perception/base/object_test.cc
+2
-2
modules/perception/base/object_types.h
modules/perception/base/object_types.h
+3
-0
modules/perception/base/vehicle_struct.h
modules/perception/base/vehicle_struct.h
+3
-0
未找到文件。
.travis.yml
浏览文件 @
03b5ee3b
...
...
@@ -7,7 +7,7 @@ os: linux
env
:
-
JOB=lint
-
JOB=cibuild
-
JOB=
test_cpu
-
JOB=
citest
cache
:
directories
:
-
$HOME/.cache/bazel
...
...
apollo.sh
浏览文件 @
03b5ee3b
...
...
@@ -396,6 +396,7 @@ function gen_coverage() {
}
function
run_test
()
{
generate_build_targets
if
[
"
$USE_GPU
"
==
"1"
]
;
then
echo
-e
"
${
YELLOW
}
Running tests under GPU mode. GPU is required to run the tests.
${
NO_COLOR
}
"
...
...
@@ -497,7 +498,7 @@ function citest() {
bash cybertron.sh build_fast
cd
/apollo
citest_basic
run_test
if
[
$?
-eq
0
]
;
then
success
'Test passed!'
return
0
...
...
modules/perception/base/BUILD
浏览文件 @
03b5ee3b
...
...
@@ -26,4 +26,56 @@ cc_test(
],
)
cc_library
(
name
=
"object"
,
hdrs
=
[
"object.h"
,
"object_supplement.h"
,
"object_types.h"
,
"vehicle_struct.h"
,
],
srcs
=
[
"object.cc"
,
],
deps
=
[
":point_cloud"
,
":box"
,
],
)
cc_test
(
name
=
"object_test"
,
size
=
"small"
,
srcs
=
[
"object_test.cc"
,
],
deps
=
[
":object"
,
"@gtest//:main"
,
],
)
cc_library
(
name
=
"box"
,
hdrs
=
[
"box.h"
,
"comparison_traits.h"
,
],
deps
=
[
":point_cloud"
,
],
)
cc_test
(
name
=
"box_test"
,
size
=
"small"
,
srcs
=
[
"box_test.cc"
,
],
deps
=
[
":box"
,
"@gtest//:main"
,
],
)
cpplint
()
modules/perception/base/box.h
浏览文件 @
03b5ee3b
...
...
@@ -13,16 +13,17 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#ifndef MODULES_PERCEPTION_BASE_
IMAGE_CORE
_H_
#define MODULES_PERCEPTION_BASE_
IMAGE_CORE
_H_
#ifndef MODULES_PERCEPTION_BASE_
BOX
_H_
#define MODULES_PERCEPTION_BASE_
BOX
_H_
#include <float.h>
#include <stdint.h>
#include <algorithm>
#include <cfloat>
#include <cstdint>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
#include "modules/perception/base/comparison_traits.h"
#include "modules/perception/base/point.h"
...
...
@@ -30,9 +31,6 @@ namespace apollo {
namespace
perception
{
namespace
base
{
template
<
typename
T
>
struct
Rect
;
template
<
typename
T
>
struct
BBox2D
;
...
...
@@ -163,16 +161,8 @@ struct BBox2D {
T
ymax
=
0
;
// bottom-right
};
typedef
Rect
<
int
>
RectI
;
typedef
Rect
<
float
>
RectF
;
typedef
Rect
<
double
>
RectD
;
typedef
BBox2D
<
int
>
BBox2DI
;
typedef
BBox2D
<
float
>
BBox2DF
;
typedef
BBox2D
<
double
>
BBox2DD
;
}
// namespace base
}
// namespace perception
}
// namespace apollo
#endif // MODULES_PERCEPTION_BASE_
IMAGE_CORE
_H_
#endif // MODULES_PERCEPTION_BASE_
BOX
_H_
\ No newline at end of file
modules/perception/base/
test/base_
box_test.cc
→
modules/perception/base/box_test.cc
浏览文件 @
03b5ee3b
...
...
@@ -13,10 +13,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include <gtest/gtest.h>
#include "modules/perception/base/box.h"
#include <limits>
#include <vector>
#include "modules/perception/base/box.h"
#include "gtest/gtest.h"
namespace
apollo
{
namespace
perception
{
...
...
modules/perception/base/comparison_traits.h
浏览文件 @
03b5ee3b
...
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#ifndef MODULES_PERCEPTION_BASE_COMPARISON_TRAITS_H_
#define MODULES_PERCEPTION_BASE_COMPARISON_TRAITS_H_
...
...
modules/perception/base/object.cc
浏览文件 @
03b5ee3b
...
...
@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include "modules/perception/base/object.h"
#include <sstream>
...
...
modules/perception/base/object.h
浏览文件 @
03b5ee3b
...
...
@@ -15,11 +15,12 @@
*****************************************************************************/
#ifndef MODULES_PERCEPTION_BASE_OBJECT_H_
#define MODULES_PERCEPTION_BASE_OBJECT_H_
#include <Eigen/Core>
#include <string>
#include <vector>
#include "Eigen/Core"
#include "modules/perception/base/object_supplement.h"
#include "modules/perception/base/object_types.h"
#include "modules/perception/base/point_cloud_types.h"
...
...
@@ -28,6 +29,7 @@
namespace
apollo
{
namespace
perception
{
namespace
base
{
struct
alignas
(
16
)
Object
{
Object
();
Object
(
const
Object
&
)
=
default
;
...
...
@@ -39,7 +41,7 @@ struct alignas(16) Object {
int
id
=
-
1
;
// @brief convex hull of the object, required
Po
lygonDType
polygon
;
Po
intCloud
<
PointD
>
polygon
;
// oriented boundingbox information
// @brief main direction of the object, required
...
...
@@ -110,9 +112,6 @@ struct alignas(16) Object {
FusionObjectSupplement
fusion_supplement
;
};
typedef
std
::
shared_ptr
<
Object
>
ObjectPtr
;
typedef
std
::
shared_ptr
<
const
Object
>
ObjectConstPtr
;
}
// namespace base
}
// namespace perception
}
// namespace apollo
...
...
modules/perception/base/object_supplement.h
浏览文件 @
03b5ee3b
...
...
@@ -15,6 +15,7 @@
*****************************************************************************/
#ifndef MODULES_PERCEPTION_BASE_OBJECT_SUPPLEMENT_H_
#define MODULES_PERCEPTION_BASE_OBJECT_SUPPLEMENT_H_
#include <memory>
#include <string>
#include <vector>
...
...
@@ -47,9 +48,9 @@ struct alignas(16) LidarObjectSupplement {
// @brief valid only for on_use = true
bool
on_use
=
false
;
// @brief cloud of the object in lidar coordinates
PointFCloud
cloud
;
base
::
AttributePointCloud
<
PointF
>
cloud
;
// @brief cloud of the object in world coordinates
PointDCloud
cloud_world
;
base
::
AttributePointCloud
<
PointD
>
cloud_world
;
// @brief background indicator
bool
is_background
=
false
;
// @brief false positive indicator
...
...
@@ -107,10 +108,10 @@ struct alignas(16) CameraObjectSupplement {
pts8
.
clear
();
object_feature
.
clear
();
alpha
=
0.0
;
box
=
BBox2D
F
();
projected_box
=
BBox2D
F
();
front_box
=
BBox2D
F
();
back_box
=
BBox2D
F
();
box
=
BBox2D
<
float
>
();
projected_box
=
BBox2D
<
float
>
();
front_box
=
BBox2D
<
float
>
();
back_box
=
BBox2D
<
float
>
();
local_center
=
Eigen
::
Vector3f
(
0.0
f
,
0.0
f
,
0.0
f
);
visual_type
=
VisualObjectType
::
MAX_OBJECT_TYPE
;
visual_type_probs
.
resize
(
...
...
@@ -130,10 +131,10 @@ struct alignas(16) CameraObjectSupplement {
std
::
string
sensor_name
;
// @brief 2d box
BBox2D
F
box
;
BBox2D
<
float
>
box
;
// @brief projected 2d box
BBox2D
F
projected_box
;
BBox2D
<
float
>
projected_box
;
// @brief local track id
int
local_track_id
=
-
1
;
...
...
@@ -142,10 +143,10 @@ struct alignas(16) CameraObjectSupplement {
std
::
vector
<
float
>
pts8
;
// @brief front box
BBox2D
F
front_box
;
BBox2D
<
float
>
front_box
;
// @brief back box
BBox2D
F
back_box
;
BBox2D
<
float
>
back_box
;
std
::
vector
<
float
>
object_feature
;
// @brief alpha angle from KITTI: Observation angle of object, in [-pi..pi]
...
...
@@ -191,7 +192,7 @@ struct SensorObjectMeasurement {
size
=
Eigen
::
Vector3f
(
0
,
0
,
0
);
velocity
=
Eigen
::
Vector3f
(
0
,
0
,
0
);
type
=
ObjectType
::
UNKNOWN
;
box
=
BBox2D
F
();
box
=
BBox2D
<
float
>
();
}
std
::
string
sensor_id
=
"unknown_sensor"
;
...
...
@@ -203,7 +204,7 @@ struct SensorObjectMeasurement {
Eigen
::
Vector3f
velocity
=
Eigen
::
Vector3f
(
0
,
0
,
0
);
ObjectType
type
=
ObjectType
::
UNKNOWN
;
// @brief only for camera measurement
BBox2D
F
box
;
BBox2D
<
float
>
box
;
};
struct
alignas
(
16
)
FusionObjectSupplement
{
...
...
modules/perception/base/
test/base_
object_test.cc
→
modules/perception/base/object_test.cc
浏览文件 @
03b5ee3b
...
...
@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
#include <gtest/gtest.h>
#include "modules/perception/base/object.h"
#include "gtest/gtest.h"
namespace
apollo
{
namespace
perception
{
namespace
base
{
...
...
modules/perception/base/object_types.h
浏览文件 @
03b5ee3b
...
...
@@ -17,6 +17,7 @@
#define MODULES_PERCEPTION_BASE_OBJECT_TYPES_H_
#include <map>
#include <string>
namespace
apollo
{
namespace
perception
{
...
...
@@ -93,6 +94,7 @@ enum class VisualLandmarkType {
TrafficLight
,
MAX_LANDMARK_TYPE
,
};
const
std
::
map
<
VisualLandmarkType
,
std
::
string
>
kVisualLandmarkType2NameMap
=
{
{
VisualLandmarkType
::
RoadArrow
,
"RoadArrow"
},
{
VisualLandmarkType
::
RoadText
,
"RoadText"
},
...
...
@@ -228,4 +230,5 @@ const std::map<std::string, ObjectSubType> kName2SubTypeMap = {
}
// namespace base
}
// namespace perception
}
// namespace apollo
#endif // MODULES_PERCEPTION_BASE_OBJECT_TYPES_H_
modules/perception/base/vehicle_struct.h
浏览文件 @
03b5ee3b
...
...
@@ -15,9 +15,11 @@
*****************************************************************************/
#ifndef MODULES_PERCEPTION_BASE_VEHICLE_STRUCT_H_
#define MODULES_PERCEPTION_BASE_VEHICLE_STRUCT_H_
namespace
apollo
{
namespace
perception
{
namespace
base
{
struct
CarLight
{
float
brake_visible
=
0
;
float
brake_switch_on
=
0
;
...
...
@@ -35,6 +37,7 @@ struct CarLight {
right_turn_switch_on
=
0
;
}
};
}
// namespace base
}
// namespace perception
}
// namespace apollo
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录