Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
Navigation
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
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Software
ArmarX
Skills
Navigation
Commits
8dc47d9b
Commit
8dc47d9b
authored
2 years ago
by
Corvin-N
Browse files
Options
Downloads
Patches
Plain Diff
Implement basic version of getClusterSize
parent
d6027916
No related branches found
Branches containing commit
Tags
demo/2022-11-17/armar6a-1
Tags containing commit
2 merge requests
!68
Add human tracking
,
!28
Draft: Dev -> Main
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/armarx/navigation/human/HumanTracker.cpp
+18
-0
18 additions, 0 deletions
source/armarx/navigation/human/HumanTracker.cpp
source/armarx/navigation/human/HumanTracker.h
+7
-0
7 additions, 0 deletions
source/armarx/navigation/human/HumanTracker.h
with
25 additions
and
0 deletions
source/armarx/navigation/human/HumanTracker.cpp
+
18
−
0
View file @
8dc47d9b
...
...
@@ -220,4 +220,22 @@ namespace armarx::navigation::human
trackedHuman
->
trackingId
=
detectedHuman
->
trackingId
;
}
float
HumanTracker
::
getClusterSize
(
armem
::
vision
::
LaserScannerFeature
cluster
)
{
float
maxSize
=
0
;
for
(
auto
it1
=
cluster
.
points
.
begin
();
it1
!=
cluster
.
points
.
end
();)
{
auto
&
point1
=
*
it1
;
for
(
auto
it2
=
it1
+
1
;
it2
!=
cluster
.
points
.
end
();)
{
auto
&
point2
=
*
it2
;
float
xdiff
=
point2
.
x
()
-
point1
.
x
();
float
ydiff
=
point2
.
y
()
-
point1
.
y
();
maxSize
=
std
::
max
(
maxSize
,
std
::
sqrt
(
xdiff
*
xdiff
+
ydiff
*
ydiff
));
}
}
return
maxSize
;
}
}
// namespace armarx::navigation::human
This diff is collapsed.
Click to expand it.
source/armarx/navigation/human/HumanTracker.h
+
7
−
0
View file @
8dc47d9b
...
...
@@ -167,6 +167,13 @@ namespace armarx::navigation::human
* @param detectedHuman the detected human
*/
void
associate
(
TrackedHuman
*
tracked
,
DetectedHuman
*
detected
);
/**
* @brief getClusterSize Returns the size of the given cluster. That is for now the maximum
* distance between two points.
* @param cluster The cluster whose size is measured
* @return the size
*/
float
getClusterSize
(
armem
::
vision
::
LaserScannerFeature
cluster
);
private
:
...
...
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