Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kf_based_terrain_analysis
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Iván del Pino
kf_based_terrain_analysis
Commits
02b79435
Commit
02b79435
authored
3 years ago
by
Iván del Pino
Browse files
Options
Downloads
Patches
Plain Diff
added semantic kitti classes
parent
a3fd31e0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
include/structs_definitions.h
+17
-3
17 additions, 3 deletions
include/structs_definitions.h
src/kf_based_terrain_analysis.cpp
+18
-8
18 additions, 8 deletions
src/kf_based_terrain_analysis.cpp
with
35 additions
and
11 deletions
include/structs_definitions.h
+
17
−
3
View file @
02b79435
...
...
@@ -47,18 +47,31 @@ const float PROB_UNKNOWN = -1.0;
const
float
Z_GROUND_UNKNOWN
=
-
1000000.0
;
const
int
KITTI_NUMBER_OF_PRECISION_RECALL_INTERVALES
=
40
;
// EVALUATION EXCLUDED CLASSES ///////
const
int
UNLABELED
=
0
;
const
int
OUTLIER
=
1
;
const
int
OTHER_STRUCTURE
=
52
;
const
int
OTHER_OBJECT
=
99
;
// GROUND CLASSES /////
const
int
ROAD
=
40
;
const
int
PARKING
=
44
;
const
int
SIDEWALK
=
48
;
const
int
OTHER_GROUND
=
49
;
const
int
OTHER_STRUCTURE
=
52
;
const
int
LANE_MARKING
=
60
;
const
int
TERRAIN
=
72
;
// ORDINARY OBSTACLES //////
const
int
BUILDING
=
50
;
const
int
FENCE
=
51
;
const
int
VEGETATION
=
70
;
const
int
TRUNK
=
71
;
const
int
POLE
=
80
;
const
int
TRAFFIC_SIGN
=
81
;
const
int
OTHER_OBJECT
=
99
;
const
int
TERRAIN
=
72
;
// Key obstacles like cars, pedestrians and so on are the rest of the classes so we will not explicitly write them here
//Custom labels not present in Kitti semantic
const
int
CLASS_GROUND
=
46
;
...
...
@@ -115,6 +128,7 @@ struct FilteringConfiguration
float
robot_height
;
float
ROI_delta_x_and_y
;
float
ROI_shadow_area
;
float
ground_reference_search_resolution
;
float
elevation_grid_resolution
;
...
...
This diff is collapsed.
Click to expand it.
src/kf_based_terrain_analysis.cpp
+
18
−
8
View file @
02b79435
...
...
@@ -27,10 +27,18 @@ void CKf_Based_Terrain_Analysis::extractPointsInROI(
//std::cout << "Extracting points in ROI: reference.x = " << reference.x << " reference.y = " << reference.y
// << " reference.z = " << reference.z << std::endl;
float
x_min
,
x_max
,
y_min
,
y_max
;
float
x_min
,
x_max
,
y_min
,
y_max
,
x_search_range
,
y_search_range
;
float
x_search_range
=
filtering_configuration
.
ROI_delta_x_and_y
;
float
y_search_range
=
filtering_configuration
.
ROI_delta_x_and_y
;
if
(
reference
.
data_n
[
GRND_REF_DATA_N_3_ORIGINAL_INDEX
]
>
0.5
)
{
x_search_range
=
filtering_configuration
.
ROI_delta_x_and_y
;
y_search_range
=
filtering_configuration
.
ROI_delta_x_and_y
;
}
else
{
x_search_range
=
filtering_configuration
.
ROI_shadow_area
;
y_search_range
=
filtering_configuration
.
ROI_shadow_area
;
}
x_min
=
reference
.
x
-
x_search_range
;
y_min
=
reference
.
y
-
y_search_range
;
...
...
@@ -846,7 +854,8 @@ void CKf_Based_Terrain_Analysis::labelPointcloudUsingGroundModel(
std
::
vector
<
int
>
pointIdxKNNSearch
(
K
);
std
::
vector
<
float
>
pointKNNSquaredDistance
(
K
);
int
num_of_references_found
=
kdtree
.
nearestKSearch
(
point_in_sensor_frame
,
K
,
pointIdxKNNSearch
,
pointKNNSquaredDistance
);
int
num_of_references_found
=
kdtree
.
nearestKSearch
(
point_in_sensor_frame
,
K
,
pointIdxKNNSearch
,
pointKNNSquaredDistance
);
int
best_reference_index
=
-
1
;
int
best_reference_index_predicting_ground
=
-
1
;
...
...
@@ -861,9 +870,9 @@ void CKf_Based_Terrain_Analysis::labelPointcloudUsingGroundModel(
pcl
::
PointXYZRGBNormal
reference_in_sensor_frame
=
ground_reference_cloud_ptr
->
points
[
pointIdxKNNSearch
[
reference_iterator
]];
if
(
!
filtering_configuration
.
discard_not_connected_references_for_labelling
||
(
reference_in_sensor_frame
.
data_n
[
GRND_REF_DATA_N_2_VERTEX_CLASS
]
==
VERTEX_CONNECTED_TO_ROOT
&&
edges
[
reference_in_sensor_frame
.
data_n
[
GRND_REF_DATA_N_3_ORIGINAL_INDEX
]].
size
()
>
0
))
if
(
!
filtering_configuration
.
discard_not_connected_references_for_labelling
||
(
reference_in_sensor_frame
.
data_n
[
GRND_REF_DATA_N_2_VERTEX_CLASS
]
==
VERTEX_CONNECTED_TO_ROOT
&&
edges
[
reference_in_sensor_frame
.
data_n
[
GRND_REF_DATA_N_3_ORIGINAL_INDEX
]].
size
()
>
0
))
{
bool
observation_z_is_below_prediction
=
false
;
float
prediction_std_dev
=
-
1.0
;
...
...
@@ -917,8 +926,9 @@ void CKf_Based_Terrain_Analysis::labelPointcloudUsingGroundModel(
{
pcl
::
PointXYZRGBNormal
reference_in_sensor_frame
=
ground_reference_cloud_ptr
->
points
[
pointIdxKNNSearch
[
best_reference_index
]];
if
(
elevation_cloud_point_is_ground
)
if
(
elevation_cloud_point_is_ground
)
//&& sqrt(reference_in_sensor_frame.data_c[GRND_REF_DATA_C_3_Z_VARIANCE]) < 0.06) //TODO!!!
{
//std::cout << "std_dev_z = " << sqrt(reference_in_sensor_frame.data_c[GRND_REF_DATA_C_3_Z_VARIANCE]) << std::endl;
// We classify the elevation cloud point as ground
i
->
data_n
[
DATA_N_1_Z_GROUND
]
=
i
->
z
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment