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
6242f7ab
Commit
6242f7ab
authored
2 years ago
by
Timo Weberruß
Browse files
Options
Downloads
Patches
Plain Diff
Save WIP state of human tracker test
parent
71f79526
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!68
Add human tracking
,
!28
Draft: Dev -> Main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/armarx/navigation/human/test/human_tracker_test.cpp
+22
-4
22 additions, 4 deletions
source/armarx/navigation/human/test/human_tracker_test.cpp
with
22 additions
and
4 deletions
source/armarx/navigation/human/test/human_tracker_test.cpp
+
22
−
4
View file @
6242f7ab
...
...
@@ -58,13 +58,15 @@ namespace armarx::navigation::human
HumanTracker
tracker
=
HumanTracker
();
Eigen
::
Vector3f
initialPosition
(
0
,
0
,
2
);
Eigen
::
Quaternionf
orientation
=
quatFromEuler
(
0
,
0
,
M_PI_2
);
float
orientation
=
M_PI_2
;
Eigen
::
Quaternionf
orientationQuat
=
quatFromEuler
(
0
,
0
,
orientation
);
std
::
int64_t
timestepMs
=
100
;
Eigen
::
Vector3f
movementSpeedMetPerSec
(
1
,
0
,
0
);
int
cameraSteps
=
10
;
Eigen
::
Vector3f
posDelta
=
movementSpeedMetPerSec
*
(
timestepMs
/
1000
);
Eigen
::
Vector3f
posDelta
=
movementSpeedMetPerSec
*
(
static_cast
<
float
>
(
timestepMs
)
/
1000.0
);
std
::
vector
<
CamMm
>
camMeasurements
=
std
::
vector
<
CamMm
>
();
for
(
int
i
=
0
;
i
<
cameraSteps
;
i
++
)
...
...
@@ -73,7 +75,7 @@ namespace armarx::navigation::human
Eigen
::
Vector3f
newPos
=
initialPosition
+
i
*
posDelta
;
FramedPosition
headPosition
=
FramedPosition
(
newPos
,
""
,
""
);
FramedOrientation
headOrientation
=
FramedOrientation
(
orientation
,
""
,
""
);
FramedOrientation
headOrientation
=
FramedOrientation
(
orientation
Quat
,
""
,
""
);
PoseKeypoint
head
=
{.
label
=
"HEAD"
,
.
confidence
=
0.95
,
.
positionGlobal
=
headPosition
,
...
...
@@ -85,10 +87,26 @@ namespace armarx::navigation::human
tracker
.
update
(
camMm
);
}
// TODO: now add a lasersensor measurement roughly at the next human pose
DateTime
tLaser
=
DateTime
(
Duration
::
MilliSeconds
(
cameraSteps
*
timestepMs
));
using
Point
=
Eigen
::
Vector2f
;
std
::
vector
<
Point
>
relOffsets
=
{
Point
(
0.01
,
0.003
),
Point
(
-
0.02
,
0.007
),
Point
(
-
0.01
,
-
0.01
),
Point
(
0.015
,
0.009
),
Point
(
0.002
,
0.001
)};
Eigen
::
Vector3f
laserPos
=
initialPosition
+
cameraSteps
*
posDelta
;
//Eigen::Vector3f leftFootPos = laserPos
std
::
vector
<
Point
>
leftFootPoints
=
std
::
vector
<
Point
>
();
for
(
Point
&
offset
:
relOffsets
)
{
//leftFootPoints.emplace_back();
}
std
::
vector
<
Cluster
>
clusters
=
std
::
vector
<
Cluster
>
();
LaserMm
laserMm
;
tracker
.
update
(
laserMm
);
...
...
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