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
37b9fd9f
Commit
37b9fd9f
authored
2 years ago
by
Timo Weberruß
Browse files
Options
Downloads
Patches
Plain Diff
Draw proxemic zones to own layer & clean up
parent
d9a08301
No related branches found
Branches containing commit
No related tags found
1 merge request
!109
Social layers
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/armarx/navigation/components/navigation_memory/Visu.cpp
+20
-15
20 additions, 15 deletions
...e/armarx/navigation/components/navigation_memory/Visu.cpp
source/armarx/navigation/components/navigation_memory/Visu.h
+1
-0
1 addition, 0 deletions
source/armarx/navigation/components/navigation_memory/Visu.h
with
21 additions
and
15 deletions
source/armarx/navigation/components/navigation_memory/Visu.cpp
+
20
−
15
View file @
37b9fd9f
...
...
@@ -187,16 +187,6 @@ namespace armarx::navigation::memory
ARMARX_INFO
<<
"Visualizing "
<<
humans
.
size
()
<<
" humans"
;
for
(
const
auto
&
human
:
humans
)
{
// viz::Cylinder cylinder(std::to_string(layer.size()));
// cylinder.fromTo(conv::to3D(human.pose.translation()),
// conv::to3D(human.pose.translation()) + Eigen::Vector3f{0, 0, 10});
// cylinder.color(simox::Color::orange());
// cylinder.radius(300);
// layer.add(cylinder);
viz
::
Robot
mmm
(
std
::
to_string
(
layer
.
size
()));
mmm
.
file
(
"RobotAPI"
,
"RobotAPI/robots/MMM/mmm.xml"
);
mmm
.
pose
(
conv
::
to3D
(
human
.
pose
)
*
human_T_mmm
);
...
...
@@ -220,7 +210,14 @@ namespace armarx::navigation::memory
arrow
.
width
(
10
);
layer
.
add
(
arrow
);
}
}
}
void
Visu
::
visualizeProxemicZones
(
const
human
::
Humans
&
humans
,
viz
::
Layer
&
layer
)
{
for
(
const
auto
&
human
:
humans
)
{
auto
proxemicZones
=
human
.
proxemicZones
;
int
i
=
0
;
...
...
@@ -230,10 +227,13 @@ namespace armarx::navigation::memory
proxemicZone
.
shape
.
a
,
proxemicZone
.
shape
.
b
,
10.
f
-
i
);
const
core
::
Pose
pose3d
=
conv
::
to3D
(
proxemicZone
.
pose
);
layer
.
add
(
viz
::
Ellipsoid
(
"proxemicZone_"
+
std
::
to_string
(
visualizationIndex
))
.
pose
(
pose3d
)
.
axisLengths
(
axisLength
)
.
color
(
PROXEMIC_ZONE_COLOR
[
i
%
PROXEMIC_ZONE_COLOR
.
size
()]));
viz
::
Ellipsoid
zoneEllipse
(
"proxemicZone_"
+
std
::
to_string
(
visualizationIndex
));
zoneEllipse
.
pose
(
pose3d
);
zoneEllipse
.
axisLengths
(
axisLength
);
zoneEllipse
.
color
(
PROXEMIC_ZONE_COLOR
[
i
%
PROXEMIC_ZONE_COLOR
.
size
()]);
layer
.
add
(
zoneEllipse
);
i
++
;
}
}
...
...
@@ -325,11 +325,13 @@ namespace armarx::navigation::memory
[
&
namedProviderHumans
](
const
armarx
::
armem
::
wm
::
EntityInstance
&
instance
)
{
ARMARX_TRACE
;
const
auto
dto
=
navigation
::
human
::
arondto
::
Human
::
FromAron
(
instance
.
data
());
ARMARX_TRACE
;
navigation
::
human
::
Human
human
;
fromAron
(
dto
,
human
);
ARMARX_TRACE
;
namedProviderHumans
[
instance
.
id
().
providerSegmentName
].
emplace_back
(
std
::
move
(
human
));
...
...
@@ -340,7 +342,10 @@ namespace armarx::navigation::memory
for
(
const
auto
&
[
providerName
,
humans
]
:
namedProviderHumans
)
{
viz
::
Layer
&
layer
=
layers
.
emplace_back
(
arviz
.
layer
(
"humans_"
+
providerName
));
viz
::
Layer
&
proxZoneLayer
=
layers
.
emplace_back
(
arviz
.
layer
(
"proxemic_zones_"
+
providerName
));
visualize
(
humans
,
layer
,
visuTransparent
);
visualizeProxemicZones
(
humans
,
proxZoneLayer
);
}
}
...
...
This diff is collapsed.
Click to expand it.
source/armarx/navigation/components/navigation_memory/Visu.h
+
1
−
0
View file @
37b9fd9f
...
...
@@ -78,6 +78,7 @@ namespace armarx::navigation::memory
void
visualize
(
const
navigation
::
human
::
Humans
&
humans
,
viz
::
Layer
&
layer
,
const
bool
visuTransparent
);
void
visualizeProxemicZones
(
const
navigation
::
human
::
Humans
&
humans
,
viz
::
Layer
&
layer
);
void
visualize
(
const
human
::
HumanGroups
&
humanGroups
,
viz
::
Layer
&
layer
);
void
visualize
(
const
algorithms
::
Costmap
&
costmap
,
viz
::
Layer
&
layer
,
const
std
::
string
&
name
);
...
...
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