Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Florian Leander Singer
RobotAPI
Commits
a7e460c3
Commit
a7e460c3
authored
3 years ago
by
robdekon_h2t
Browse files
Options
Downloads
Patches
Plain Diff
Uncommited changes from testing obstacle awareness
on the robot
parent
95836be2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scenarios/dasd/config/DynamicObstacleManager.cfg
+2
-2
2 additions, 2 deletions
scenarios/dasd/config/DynamicObstacleManager.cfg
source/RobotAPI/components/DynamicObstacleManager/DynamicObstacleManager.cpp
+18
-1
18 additions, 1 deletion
...ponents/DynamicObstacleManager/DynamicObstacleManager.cpp
with
20 additions
and
3 deletions
scenarios/dasd/config/DynamicObstacleManager.cfg
+
2
−
2
View file @
a7e460c3
...
...
@@ -147,7 +147,7 @@ ArmarX.DynamicObstacleManager.MaxObstacleSize = 400
# - Default: 50
# - Case sensitivity: yes
# - Required: no
ArmarX.DynamicObstacleManager.MinLengthOfLines
=
20
0
ArmarX.DynamicObstacleManager.MinLengthOfLines
=
5
0
# ArmarX.DynamicObstacleManager.MinObstacleSize: The minimal obstacle size in mm.
...
...
@@ -163,7 +163,7 @@ ArmarX.DynamicObstacleManager.MinObstacleSize = 5
# - Default: 1000
# - Case sensitivity: yes
# - Required: no
ArmarX.DynamicObstacleManager.MinObstacleValueForAccepting
=
5
0
ArmarX.DynamicObstacleManager.MinObstacleValueForAccepting
=
5
# ArmarX.DynamicObstacleManager.MinSampleRatioPerEllipsis: Minimum percentage of samples which have to be in an elllipsis to be considered as known obsacle
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/components/DynamicObstacleManager/DynamicObstacleManager.cpp
+
18
−
1
View file @
a7e460c3
...
...
@@ -259,8 +259,13 @@ namespace armarx
{
std
::
shared_lock
<
std
::
shared_mutex
>
l
{
m_managed_obstacles_mutex
};
const
Eigen
::
Vector2f
diff
=
goal
-
agentPosition
;
const
Eigen
::
Vector2f
orthogonal_normalized
=
Eigen
::
Vector2f
(
Eigen
::
Rotation2Df
(
M_PI_2f32
)
*
diff
).
normalized
();
const
float
sample_step
=
5
;
// in [mm], sample step size towards goal.
const
float
distance_to_goal
=
(
goal
-
agentPosition
)
.
norm
()
+
safetyRadius
;
const
float
distance_to_goal
=
diff
.
norm
()
+
safetyRadius
;
float
current_distance
=
safetyRadius
;
while
(
current_distance
<
distance_to_goal
)
...
...
@@ -268,6 +273,8 @@ namespace armarx
for
(
const
auto
man_obstacle
:
m_managed_obstacles
)
{
Eigen
::
Vector2f
sample
=
agentPosition
+
((
goal
-
agentPosition
).
normalized
()
*
current_distance
);
Eigen
::
Vector2f
sample_left
=
sample
+
(
orthogonal_normalized
*
250
);
Eigen
::
Vector2f
sample_right
=
sample
-
(
orthogonal_normalized
*
250
);
obstacledetection
::
Obstacle
obstacle
=
man_obstacle
->
m_obstacle
;
Eigen
::
Vector2f
obstacle_origin
{
obstacle
.
posX
,
obstacle
.
posY
};
...
...
@@ -275,6 +282,16 @@ namespace armarx
{
return
current_distance
-
safetyRadius
;
}
if
(
ManagedObstacle
::
point_ellipsis_coverage
(
obstacle_origin
,
obstacle
.
axisLengthX
,
obstacle
.
axisLengthY
,
obstacle
.
yaw
,
sample_left
))
{
return
current_distance
-
safetyRadius
;
}
if
(
ManagedObstacle
::
point_ellipsis_coverage
(
obstacle_origin
,
obstacle
.
axisLengthX
,
obstacle
.
axisLengthY
,
obstacle
.
yaw
,
sample_right
))
{
return
current_distance
-
safetyRadius
;
}
}
current_distance
+=
sample_step
;
...
...
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