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
Container Registry
Model registry
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
RobotAPI
Merge requests
!124
new types: PoseStamped and VelocityStamped
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
new types: PoseStamped and VelocityStamped
feature/poses-and-velocities-with-timestamp
into
master
Overview
11
Commits
49
Pipelines
0
Changes
15
Merged
Fabian Reister
requested to merge
feature/poses-and-velocities-with-timestamp
into
master
4 years ago
Overview
8
Commits
49
Pipelines
0
Changes
15
Expand
see
https://gitlab.com/h2t/organization/software-organization/-/issues/33
Edited
4 years ago
by
Fabian Reister
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
f70689e0
49 commits,
4 years ago
15 files
+
446
−
284
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
15
Search (e.g. *.vue) (Ctrl+P)
source/RobotAPI/components/RobotState/RobotStateComponent.cpp
+
8
−
51
Options
@@ -38,6 +38,8 @@
#include
<ArmarXCore/core/system/ArmarXDataPath.h>
#include
<ArmarXCore/core/time/TimeUtil.h>
#include
<RobotAPI/interface/units/PlatformUnitInterface.h>
using
namespace
Eigen
;
using
namespace
Ice
;
@@ -342,21 +344,19 @@ namespace armarx
void
RobotStateComponent
::
reportGlobalRobotPose
(
const
std
::
string
&
robotName
,
const
Eigen
::
Matrix4f
&
pose
,
const
long
timestamp
,
const
TransformStamped
&
globalRobotPose
,
const
Ice
::
Current
&
)
{
if
(
_synchronized
)
{
std
::
string
localRobotName
=
_synchronized
->
getName
();
ARMARX_DEBUG
<<
"Comparing "
<<
localRobotName
<<
" and "
<<
robotName
<<
"."
;
if
(
localRobotName
==
robotName
)
ARMARX_DEBUG
<<
"Comparing "
<<
localRobotName
<<
" and "
<<
globalRobotPose
.
header
.
agent
<<
"."
;
if
(
localRobotName
==
globalRobotPose
.
header
.
agent
)
{
const
IceUtil
::
Time
time
=
IceUtil
::
Time
::
microSeconds
(
timestamp
);
const
IceUtil
::
Time
time
=
IceUtil
::
Time
::
microSeconds
(
globalRobotPose
.
header
.
timestampInMicroSeconds
);
insertPose
(
time
,
pose
);
_synchronized
->
setGlobalPose
(
pose
);
insertPose
(
time
,
globalRobotPose
.
transform
);
_synchronized
->
setGlobalPose
(
globalRobotPose
.
transform
);
if
(
_sharedRobotServant
)
{
@@ -371,49 +371,6 @@ namespace armarx
}
void
RobotStateComponent
::
reportPlatformPose
(
const
PlatformPose
&
currentPose
,
const
Current
&
)
{
const
float
z
=
0
;
const
Eigen
::
Vector3f
position
(
currentPose
.
x
,
currentPose
.
y
,
z
);
const
Eigen
::
Matrix3f
orientation
=
Eigen
::
AngleAxisf
(
currentPose
.
rotationAroundZ
,
Eigen
::
Vector3f
::
UnitZ
()).
toRotationMatrix
();
const
Eigen
::
Matrix4f
globalPose
=
math
::
Helpers
::
Pose
(
position
,
orientation
);
IceUtil
::
Time
time
=
IceUtil
::
Time
::
microSeconds
(
currentPose
.
timestampInMicroSeconds
);
insertPose
(
time
,
globalPose
);
if
(
_sharedRobotServant
)
{
_sharedRobotServant
->
setTimestamp
(
time
);
}
}
void
RobotStateComponent
::
reportNewTargetPose
(
Float
newPlatformPositionX
,
Float
newPlatformPositionY
,
Float
newPlatformRotation
,
const
Current
&
)
{
// Unused.
(
void
)
newPlatformPositionX
,
(
void
)
newPlatformPositionY
,
(
void
)
newPlatformRotation
;
}
void
RobotStateComponent
::
reportPlatformVelocity
(
Float
currentPlatformVelocityX
,
Float
currentPlatformVelocityY
,
Float
currentPlatformVelocityRotation
,
const
Current
&
)
{
// Unused.
(
void
)
currentPlatformVelocityX
,
(
void
)
currentPlatformVelocityY
,
(
void
)
currentPlatformVelocityRotation
;
}
void
RobotStateComponent
::
reportPlatformOdometryPose
(
Float
x
,
Float
y
,
Float
angle
,
const
Current
&
)
{
// Unused.
(
void
)
x
,
(
void
)
y
,
(
void
)
angle
;
}
std
::
vector
<
std
::
string
>
RobotStateComponent
::
getArmarXPackages
(
const
Current
&
)
const
{
std
::
vector
<
std
::
string
>
result
;
Loading