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
f7475472
Commit
f7475472
authored
4 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add getters for OOBB in robot and global frame
parent
9999e0e2
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
source/RobotAPI/components/ObjectPoseObserver/ObjectPose.cpp
+19
-0
19 additions, 0 deletions
source/RobotAPI/components/ObjectPoseObserver/ObjectPose.cpp
source/RobotAPI/components/ObjectPoseObserver/ObjectPose.h
+8
-0
8 additions, 0 deletions
source/RobotAPI/components/ObjectPoseObserver/ObjectPose.h
with
27 additions
and
0 deletions
source/RobotAPI/components/ObjectPoseObserver/ObjectPose.cpp
+
19
−
0
View file @
f7475472
...
...
@@ -113,6 +113,25 @@ namespace armarx::objpose
objpose
::
fromIce
(
provided
.
localOOBB
,
localOOBB
);
}
std
::
optional
<
simox
::
OrientedBoxf
>
ObjectPose
::
oobbRobot
()
const
{
if
(
localOOBB
)
{
return
localOOBB
->
transformed
(
objectPoseRobot
);
}
return
std
::
nullopt
;
}
std
::
optional
<
simox
::
OrientedBoxf
>
ObjectPose
::
oobbGlobal
()
const
{
if
(
localOOBB
)
{
return
localOOBB
->
transformed
(
objectPoseGlobal
);
}
return
std
::
nullopt
;
}
}
namespace
armarx
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/components/ObjectPoseObserver/ObjectPose.h
+
8
−
0
View file @
f7475472
...
...
@@ -54,7 +54,15 @@ namespace armarx::objpose
IceUtil
::
Time
timestamp
=
IceUtil
::
Time
::
microSeconds
(
-
1
);
/// Object bounding box in object's local coordinate frame.
/// @see oobbRobot(), oobbGlobal()
std
::
optional
<
simox
::
OrientedBoxf
>
localOOBB
;
/// Get the OOBB in the robot frame (according to `objectPoseRobot`).
std
::
optional
<
simox
::
OrientedBoxf
>
oobbRobot
()
const
;
/// Get the OOBB in the global frame (according to `objectPoseGlobal`).
std
::
optional
<
simox
::
OrientedBoxf
>
oobbGlobal
()
const
;
};
using
ObjectPoseSeq
=
std
::
vector
<
ObjectPose
>
;
...
...
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