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
5ab16e9e
Commit
5ab16e9e
authored
4 years ago
by
Fabian Tërnava
Browse files
Options
Downloads
Plain Diff
Merge branch 'armem/dev' of
https://gitlab.com/ArmarX/RobotAPI
into armem/dev
parents
cac20719
912c36b0
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/libraries/ArmarXObjects/aron/ObjectPose.xml
+2
-2
2 additions, 2 deletions
source/RobotAPI/libraries/ArmarXObjects/aron/ObjectPose.xml
source/RobotAPI/libraries/ArmarXObjects/aron_conversions.cpp
+15
-12
15 additions, 12 deletions
source/RobotAPI/libraries/ArmarXObjects/aron_conversions.cpp
with
17 additions
and
14 deletions
source/RobotAPI/libraries/ArmarXObjects/aron/ObjectPose.xml
+
2
−
2
View file @
5ab16e9e
...
...
@@ -6,7 +6,7 @@
</CodeIncludes>
<GenerateTypes>
<IntEnum
name=
"armarx::objpose::aron::ObjectType
Enum
"
>
<IntEnum
name=
"armarx::objpose::aron::ObjectType
s
"
>
<EnumValue
key=
"ANY_OBJECT"
value=
"0"
/>
<EnumValue
key=
"KNOWN_OBJECT"
value=
"1"
/>
<EnumValue
key=
"UNKNOWN_OBJECT"
value=
"2"
/>
...
...
@@ -52,7 +52,7 @@
</ObjectChild>
<ObjectChild
key=
'objectType'
>
<armarx::objpose::aron::ObjectType
Enum
/>
<armarx::objpose::aron::ObjectType
s
/>
</ObjectChild>
<ObjectChild
key=
'objectID'
>
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/ArmarXObjects/aron_conversions.cpp
+
15
−
12
View file @
5ab16e9e
...
...
@@ -11,7 +11,9 @@
#include
<SimoxUtility/shapes/OrientedBox.h>
// RobotAPI
// TODO: ice dependency! header should be removed.
#include
<RobotAPI/interface/objectpose/object_pose_types.h>
#include
<RobotAPI/libraries/ArmarXObjects/ObjectPose.h>
#include
<RobotAPI/libraries/ArmarXObjects/aron/ObjectPose.aron.generated.h>
...
...
@@ -24,19 +26,20 @@ namespace armarx::objpose
return
ObjectID
(
id
.
dataset
,
id
.
className
,
id
.
instanceName
);
}
ObjectTypeEnum
fromAron
(
const
aron
::
ObjectType
Enum
&
objectType
)
ObjectTypeEnum
fromAron
(
const
aron
::
ObjectType
s
&
objectType
)
{
using
AronObjectType
=
aron
::
ObjectTypes
::
__ImplEnum
;
switch
(
objectType
.
value
)
{
case
a
ron
::
ObjectType
Enum
::
ANY_OBJECT
:
case
A
ronObjectType
::
ANY_OBJECT
:
return
ObjectTypeEnum
::
AnyObject
;
case
a
ron
::
ObjectType
Enum
::
KNOWN_OBJECT
:
case
A
ronObjectType
::
KNOWN_OBJECT
:
return
ObjectTypeEnum
::
KnownObject
;
case
a
ron
::
ObjectType
Enum
::
UNKNOWN_OBJECT
:
case
A
ronObjectType
::
UNKNOWN_OBJECT
:
return
ObjectTypeEnum
::
UnknownObject
;
default:
// TODO(fabian.reister): do it the ARMARX way ...
throw
std
::
invalid_argument
(
"Invalid ObjectTypeEnum value: "
+
std
::
to_string
(
objectType
.
value
));
throw
std
::
invalid_argument
(
"Invalid aron::ObjectTypes value: "
+
std
::
to_string
(
objectType
));
}
}
...
...
@@ -76,7 +79,6 @@ namespace armarx::objpose
objectPose
.
confidence
=
aronObjectPose
.
confidence
;
// TODO(fabian.reister): check if micro seconds is correct
objectPose
.
timestamp
=
IceUtil
::
Time
::
microSeconds
(
aronObjectPose
.
timestamp
);
objectPose
.
localOOBB
=
fromAron
(
aronObjectPose
.
localOOBB
);
...
...
@@ -93,16 +95,16 @@ namespace armarx::objpose
return
aronId
;
}
decltype
(
aron
::
ObjectType
Enum
::
value
)
toAron
Value
(
const
ObjectTypeEnum
&
objectType
)
aron
::
ObjectType
s
toAron
(
const
ObjectTypeEnum
&
objectType
)
{
switch
(
objectType
)
{
case
ObjectTypeEnum
::
AnyObject
:
return
aron
::
ObjectType
Enum
::
ANY_OBJECT
;
return
aron
::
ObjectType
s
::
ANY_OBJECT
;
case
ObjectTypeEnum
::
KnownObject
:
return
aron
::
ObjectType
Enum
::
KNOWN_OBJECT
;
return
aron
::
ObjectType
s
::
KNOWN_OBJECT
;
case
ObjectTypeEnum
::
UnknownObject
:
return
aron
::
ObjectType
Enum
::
UNKNOWN_OBJECT
;
return
aron
::
ObjectType
s
::
UNKNOWN_OBJECT
;
default:
// TODO(fabian.reister): do it the ARMARX way ...
throw
std
::
invalid_argument
(
"Invalid ObjectTypeEnum value: "
+
std
::
to_string
(
objectType
));
...
...
@@ -144,7 +146,8 @@ namespace armarx::objpose
{
aronObjectPose
.
providerName
=
objectPose
.
providerName
;
aronObjectPose
.
objectType
.
value
=
toAronValue
(
objectPose
.
objectType
);
// TODO(fabian.reister): remove .value
aronObjectPose
.
objectType
.
value
=
toAron
(
objectPose
.
objectType
).
value
;
aronObjectPose
.
objectID
=
toAron
(
objectPose
.
objectID
);
...
...
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