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
Commits
02e764a1
Commit
02e764a1
authored
3 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add setters for object pose robot and global
parent
d9038dde
No related branches found
No related tags found
1 merge request
!157
armem/dev => master
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/ArmarXObjects/ObjectPose.cpp
+22
-0
22 additions, 0 deletions
source/RobotAPI/libraries/ArmarXObjects/ObjectPose.cpp
source/RobotAPI/libraries/ArmarXObjects/ObjectPose.h
+3
-0
3 additions, 0 deletions
source/RobotAPI/libraries/ArmarXObjects/ObjectPose.h
with
25 additions
and
0 deletions
source/RobotAPI/libraries/ArmarXObjects/ObjectPose.cpp
+
22
−
0
View file @
02e764a1
#include
"ObjectPose.h"
#include
<SimoxUtility/math/pose/invert.h>
#include
<VirtualRobot/Robot.h>
#include
<VirtualRobot/RobotConfig.h>
...
...
@@ -100,6 +102,26 @@ namespace armarx::objpose
objpose
::
fromIce
(
provided
.
localOOBB
,
localOOBB
);
}
void
ObjectPose
::
setObjectPoseRobot
(
const
Eigen
::
Matrix4f
&
objectPoseRobot
,
bool
updateObjectPoseGlobal
)
{
this
->
objectPoseRobot
=
objectPoseRobot
;
if
(
updateObjectPoseGlobal
)
{
this
->
objectPoseGlobal
=
robotPose
*
objectPoseRobot
;
}
}
void
ObjectPose
::
setObjectPoseGlobal
(
const
Eigen
::
Matrix4f
&
objectPoseGlobal
,
bool
updateObjectPoseRobot
)
{
this
->
objectPoseGlobal
=
objectPoseGlobal
;
if
(
updateObjectPoseRobot
)
{
this
->
objectPoseRobot
=
simox
::
math
::
inverted_pose
(
robotPose
)
*
objectPoseGlobal
;
}
}
std
::
optional
<
simox
::
OrientedBoxf
>
ObjectPose
::
oobbRobot
()
const
{
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/ArmarXObjects/ObjectPose.h
+
3
−
0
View file @
02e764a1
...
...
@@ -39,6 +39,9 @@ namespace armarx::objpose
void
fromProvidedPose
(
const
data
::
ProvidedObjectPose
&
provided
,
VirtualRobot
::
RobotPtr
robot
);
void
setObjectPoseRobot
(
const
Eigen
::
Matrix4f
&
objectPoseRobot
,
bool
updateObjectPoseGlobal
=
true
);
void
setObjectPoseGlobal
(
const
Eigen
::
Matrix4f
&
objectPoseGlobal
,
bool
updateObjectPoseRobot
=
true
);
/// Name of the providing component.
std
::
string
providerName
;
...
...
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