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
415099ee
Commit
415099ee
authored
9 years ago
by
andreucm
Browse files
Options
Downloads
Patches
Plain Diff
Working commit, adding extra features to LaserScan class to be used in corner detection
parent
72286d2e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/corner_finder_range_diff.cpp
+29
-1
29 additions, 1 deletion
src/corner_finder_range_diff.cpp
src/laser_scan.h
+10
-3
10 additions, 3 deletions
src/laser_scan.h
with
39 additions
and
4 deletions
src/corner_finder_range_diff.cpp
+
29
−
1
View file @
415099ee
...
@@ -13,10 +13,38 @@ CornerFinderRangeDiff::~CornerFinderRangeDiff()
...
@@ -13,10 +13,38 @@ CornerFinderRangeDiff::~CornerFinderRangeDiff()
}
}
unsigned
int
CornerFinderRangeDiff
::
findCorners
(
const
Eigen
::
MatrixXs
&
_points
,
// unsigned int CornerFinderRangeDiff::findCorners( const Eigen::MatrixXs & _points,
// std::list<laserscanutils::CornerPoint> & _corner_list)
unsigned
int
CornerFinderRangeDiff
::
findCorners
(
const
laserscanutils
::
LaserScan
&
_scan
,
std
::
list
<
laserscanutils
::
CornerPoint
>
&
_corner_list
)
std
::
list
<
laserscanutils
::
CornerPoint
>
&
_corner_list
)
{
{
ScalarT
range_diff
;
for
(
unsigned
int
ii
=
1
;
ii
<
_scan
.
ranges
.
size
();
ii
++
)
{
if
(
no
jump
)
{
range_diff
=
_scan
.
ranges
[
ii
]
-
_scan
.
ranges
[
ii
-
1
]
}
}
/*
range_diff_i
=
range_i
-
range_
(
i
-
1
)
if
(
range_diff_i
<
ZERO_RANGE_DIFF
)
{
v1
,
b1
=
check
{
r_
{
i
-
CORNER_WINDOW_SIZE
},
r_i
}
is
line
(
with
FIT_ERROR
)
v2
,
b2
=
check
{
r_i
,
r_
{
i
-
CORNER_WINDOW_SIZE
}}
is
line
(
with
FIT_ERROR
)
angle
=
getAngle
(
b1
,
b2
);
if
(
b1
&&
b2
)
&&
(
angle
in
(
0
,
135
)
U
(
225
,
360
)
)
//CORNER_MIN_ANGLE
{
//corner found
//set corner
// _corner_list.push_back();
}
}
}
}
void
CornerFinderRangeDiff
::
print
()
const
void
CornerFinderRangeDiff
::
print
()
const
...
...
This diff is collapsed.
Click to expand it.
src/laser_scan.h
+
10
−
3
View file @
415099ee
...
@@ -45,13 +45,19 @@ class LaserScan
...
@@ -45,13 +45,19 @@ class LaserScan
public:
public:
//Ordered raw range data
//Ordered raw range data
std
::
vector
<
float
>
ranges_raw_
;
//Ordered range data, without NaN's, Inf's
std
::
vector
<
float
>
ranges_
;
std
::
vector
<
float
>
ranges_
;
//ordered 2D points, each one expressed in homogeneous coordinates (x,y,1)^T. NaN and inf's are filtered out.
//ordered 2D points, each one expressed in homogeneous coordinates (x,y,1)^T. NaN and inf's are filtered out.
Eigen
::
MatrixXs
points_
;
Eigen
::
MatrixXs
points_
;
//list of indexes where a scan jump is found. Indexes incicate start of a scan segment
//list of indexes where a scan jump is found. Indexes indicate the second point of the jump (start of a scan segment)
std
::
list
<
unsigned
int
>
jumps_
;
std
::
list
<
unsigned
int
>
jumps_indexes_
;
//For each element in ranges_, r_i, indicates if there is a jump (true) between that element and the previouos.
std
::
vector
<
bool
>
jumps_mask_
;
public:
public:
/** \brief Constructor
/** \brief Constructor
...
@@ -88,7 +94,8 @@ class LaserScan
...
@@ -88,7 +94,8 @@ class LaserScan
* Set also the jumps_ vector, which after the call holds the indexes to points_ where a scan segment starts
* Set also the jumps_ vector, which after the call holds the indexes to points_ where a scan segment starts
*
*
**/
**/
void
ranges2xy
(
Eigen
::
Matrix4s
_device_T
=
Eigen
::
Matrix4s
::
Identity
());
void
ranges2xy
(
Eigen
::
Matrix4s
_device_T
=
Eigen
::
Matrix4s
::
Identity
());
//TODO void processRaw()-> from ranges_raw_ fills: ranges_, points_, jumps_indexes and jumps_mask
/** \brief Find segments based on jumps of consecutive scan points
/** \brief Find segments based on jumps of consecutive scan points
*
*
...
...
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