Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
laser_scan_utils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
labrobotica
algorithms
laser_scan_utils
Commits
5726c81a
Commit
5726c81a
authored
10 years ago
by
vvaquero
Browse files
Options
Downloads
Patches
Plain Diff
Object_Detection cleaned up
parent
5c3d924e
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/entities.cpp
+10
-8
10 additions, 8 deletions
src/entities.cpp
src/entities.h
+10
-18
10 additions, 18 deletions
src/entities.h
src/object_detector.cpp
+122
-155
122 additions, 155 deletions
src/object_detector.cpp
with
142 additions
and
181 deletions
src/entities.cpp
+
10
−
8
View file @
5726c81a
...
...
@@ -43,15 +43,17 @@ void laserscanutils::Object::print() const
std
::
endl
<<
"---------------------------------------------"
<<
std
::
endl
<<
"--- Object Detected Information ---"
<<
std
::
endl
<<
"---------------------------------------------"
<<
std
::
endl
<<
" * Initial Global Point : "
<<
this
->
first_
<<
std
::
endl
<<
" * Final Global Point : "
<<
this
->
last_
<<
std
::
endl
<<
" * Number of Points: "
<<
this
->
num_points_
<<
std
::
endl
// << " * Velocity: " << std::endl
// << " Linear " << this->linear_velocity_.transpose() << "; " << std::endl
// << " Angular " << this->angular_velocity_.transpose() << "; " << std::endl
<<
" * Associated?: "
<<
this
->
associated_
<<
std
::
endl
<<
" * Initial Global Point :
\t
"
<<
this
->
first_
<<
std
::
endl
<<
" * Final Global Point :
\t
"
<<
this
->
last_
<<
std
::
endl
<<
" * Number of Points:
\t
"
<<
this
->
num_points_
<<
std
::
endl
<<
" * Associated?:
\t\t
"
<<
this
->
associated_
<<
std
::
endl
<<
" * Structured?:
\t\t
"
<<
this
->
structured_
<<
std
::
endl
<<
" * Bounding Box Center :
\t
"
<<
this
->
object_center_
.
transpose
()
<<
std
::
endl
<<
" * Bounding Box Size :
\t\t
"
<<
this
->
size_x_
<<
" x "
<<
this
->
size_y_
<<
std
::
endl
<<
" * Bounding Box Orientation :"
<<
this
->
obj_orientation_
<<
std
::
endl
<<
" * Polyline: "
<<
std
::
endl
<<
"
\t\t
"
<<
this
->
polyline_points_
<<
std
::
endl
<<
" * Lines: "
<<
std
::
endl
;
//std::cout << "object Line list SIZE: " << this->line_list_.size() << std::endl;
if
(
this
->
line_list_
.
size
()
>=
1
)
{
for
(
auto
it1
=
this
->
line_list_
.
begin
();
it1
!=
this
->
line_list_
.
end
();
it1
++
)
...
...
This diff is collapsed.
Click to expand it.
src/entities.h
+
10
−
18
View file @
5726c81a
...
...
@@ -61,10 +61,10 @@ namespace laserscanutils
this
->
first_
=
0
;
this
->
last_
=
0
;
this
->
associated_
=
false
;
this
->
structured_
=
false
;
this
->
id_
=
-
1
;
this
->
ref_middle_point_
=
{
0.0
,
0.0
,
0.0
};
this
->
ref_centroid_point_
=
{
0.0
,
0.0
,
0.0
};
this
->
ref_act_point_
=
{
0.0
,
0.0
,
0.0
};
this
->
ref_old_point_
=
{
0.0
,
0.0
,
0.0
};
...
...
@@ -73,35 +73,32 @@ namespace laserscanutils
this
->
min_y_
=
1000.0
;
this
->
max_x_
=
-
1000.0
;
this
->
max_y_
=
-
1000.0
;
this
->
angle_
=
0.0
;
this
->
orientation_
=
0.0
;
this
->
obj_orientation_
=
0.0
;
this
->
object_center_
<<
0.0
,
0.0
;
this
->
size_x_
=
0.0
;
this
->
size_y_
=
0.0
;
// this->polyline_points_ << 0.0, 0.0, 0.0, 0.0, 0.0,
// 0.0, 0.0, 0.0, 0.0, 0.0;
this
->
ref_type_
=
-
1
;
this
->
ref_position_
=
-
1
;
this
->
ref_position_
=
-
1
;
// TBR??? Position of the corner/line in the respective list...
this
->
asso_to_prev_obj_in_pos_
=
-
1
;
// TBR??? Position of the corner/line in the respective list...
}
bool
associated_
;
bool
structured_
;
unsigned
int
num_points_
;
// number of points of the cluster
unsigned
int
first_
;
//index of the Homogeneous Matrix column for the first point used (GLOBAL)
unsigned
int
last_
;
//index of the Homogeneous Matrix column for the last point used (GLOBAL)
std
::
list
<
laserscanutils
::
Line
>
line_list_
;
// list of lines contained in the cluster (Refs Points are LOCAL)
std
::
list
<
laserscanutils
::
Corner
>
corner_list_
;
// list of corners contained in the cluster (Refs Points are LOCAL)
// Eigen::Vector2f linear_velocity_; // WRT??
// Eigen::Vector2f angular_velocity_; // WRT??
ScalarT
id_
;
// Id of the object. -1 if unknown or MOBILE; other number if pre-associated.
unsigned
int
asso_to_prev_obj_in_pos_
;
// For tracking help, this object has been associated to the object in position
// "asso_to_obj_in_pos_" from the previous scan. (-1 if not)
// Description
Eigen
::
Vector3s
ref_middle_point_
;
Eigen
::
Vector3s
ref_centroid_point_
;
Eigen
::
Vector3s
ref_act_point_
;
Eigen
::
Vector3s
ref_old_point_
;
...
...
@@ -110,25 +107,20 @@ namespace laserscanutils
float
min_y_
;
float
max_x_
;
float
max_y_
;
float
angle_
;
float
orientation_
;
float
obj_orientation_
;
float
size_x_
;
float
size_y_
;
Eigen
::
Vector2s
object_center_
;
Eigen
::
MatrixXs
polyline_points_
;
//<float,2,5>
int
ref_type_
;
// Type of the reference. 8 = corner; 4 = init_line ; 2 = end_line; 1 = centroid. -1 = unkonwn;
int
ref_position_
;
// The position of the referenced corner (or line) in its corresponding list;
int
ref_position_
;
//
[TODO]
The position of the referenced corner (or line) in its corresponding list;
// TODO: Reference Point
// TODO: Bounding Box
void
print
()
const
;
float
getArea
();
float
getPerimeter
();
};
}
#endif
This diff is collapsed.
Click to expand it.
src/object_detector.cpp
+
122
−
155
View file @
5726c81a
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