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
56d9efa6
Commit
56d9efa6
authored
2 years ago
by
Tobias Gröger
Browse files
Options
Downloads
Plain Diff
Merge branch 'feature/path-alternatives-visualization' into feature/teb-visualization
parents
9c99adbb
7e8ee330
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!48
Set visualization of teb
,
!28
Draft: Dev -> Main
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/armarx/navigation/local_planning/TimedElasticBands.cpp
+27
-0
27 additions, 0 deletions
...ce/armarx/navigation/local_planning/TimedElasticBands.cpp
with
27 additions
and
0 deletions
source/armarx/navigation/local_planning/TimedElasticBands.cpp
+
27
−
0
View file @
56d9efa6
#include
"TimedElasticBands.h"
#include
<SimoxUtility/algorithm/apply.hpp>
#include
<SimoxUtility/json/json.hpp>
#include
<VirtualRobot/MathTools.h>
#include
<VirtualRobot/Robot.h>
...
...
@@ -128,6 +129,32 @@ namespace armarx::navigation::local_planning
core
::
LocalTrajectory
best
=
conv
::
fromRos
(
hcp_
->
findBestTeb
()
->
teb
());
// visualize path alternatives
if
(
arviz
!=
nullptr
)
{
auto
layer
=
arviz
->
layer
(
"local_planner_path_alternatives"
);
int
i
=
0
;
int
bestTebIdx
=
hcp_
->
bestTebIdx
();
for
(
const
auto
&
teb
:
hcp_
->
getTrajectoryContainer
())
{
if
(
i
==
bestTebIdx
)
{
continue
;
}
const
core
::
LocalTrajectory
trajectory
=
conv
::
fromRos
(
teb
->
teb
());
const
std
::
vector
<
Eigen
::
Vector3f
>
points
=
simox
::
alg
::
apply
(
trajectory
.
points
(),
[](
const
core
::
LocalTrajectoryPoint
&
pt
)
->
Eigen
::
Vector3f
{
return
pt
.
pose
.
translation
();
});
layer
.
add
(
viz
::
Path
(
"path_alternative_"
+
std
::
to_string
(
i
))
.
points
(
points
)
.
color
(
simox
::
Color
::
gray
()));
i
++
;
}
arviz
->
commit
(
layer
);
}
return
{{.
trajectory
=
best
}};
}
...
...
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