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
Lennard Hofmann
RobotAPI
Commits
1faa9c9c
Commit
1faa9c9c
authored
3 years ago
by
Fabian Reister
Committed by
robdekon_h2t
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ObstacleAwarePlatformUnit: using new interface
parent
c25cb9be
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/units/ObstacleAwarePlatformUnit/ObstacleAwarePlatformUnit.cpp
+5
-6
5 additions, 6 deletions
...s/ObstacleAwarePlatformUnit/ObstacleAwarePlatformUnit.cpp
with
5 additions
and
6 deletions
source/RobotAPI/components/units/ObstacleAwarePlatformUnit/ObstacleAwarePlatformUnit.cpp
+
5
−
6
View file @
1faa9c9c
...
...
@@ -354,18 +354,17 @@ armarx::ObstacleAwarePlatformUnit::get_velocities()
// Acquire control_data mutex to ensure data remains consistent.
std
::
scoped_lock
l
{
m_control_data
.
mutex
};
ARMARX_LOG
<<
__LINE__
;
// Update agent and get target velocities.
update_agent_dependent_values
();
ARMARX_LOG
<<
__LINE__
;
const
Eigen
::
Vector2f
target_vel
=
get_target_velocity
();
ARMARX_LOG
<<
__LINE__
;
const
float
target_rot_vel
=
get_target_rotational_velocity
();
ARMARX_LOG
<<
__LINE__
;
const
Eigen
::
Vector2f
extents
=
Eigen
::
Affine3f
(
m_robot
->
getRobotNode
(
"PlatformCornerFrontLeft"
)
->
getPoseInRootFrame
()).
translation
().
head
<
2
>
();
// Apply obstacle avoidance and apply post processing to get the modulated velocity.
const
Eigen
::
Vector2f
modulated_vel
=
[
this
,
&
target_vel
]
const
Eigen
::
Vector2f
modulated_vel
=
[
this
,
&
target_vel
,
&
extents
]
{
const
float
distance
=
m_obsman
->
distanceToObstacle
(
m_control_data
.
agent_pos
,
m_control_data
.
target_pos
);
const
float
distance
=
m_obsman
->
distanceToObstacle
(
m_control_data
.
agent_pos
,
extents
,
m_control_data
.
agent_ori
,
m_control_data
.
target_pos
);
ARMARX_DEBUG
<<
"Distance to obstacle: "
<<
distance
;
...
...
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