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
cb37cc10
Commit
cb37cc10
authored
7 months ago
by
Fabian Tërnava
Browse files
Options
Downloads
Patches
Plain Diff
add debug output to memory. should be reverted later on.
parent
053e2455
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!475
Improvement of Skill Memory and Skill Memory GUI
,
!474
Draft: Improvement of Skill Memory and Skill Memory GUI
Pipeline
#20868
passed
7 months ago
Stage: build-and-test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
source/RobotAPI/components/armem/server/SkillsMemory/SkillsMemory.cpp
+25
-1
25 additions, 1 deletion
...API/components/armem/server/SkillsMemory/SkillsMemory.cpp
with
25 additions
and
1 deletion
source/RobotAPI/components/armem/server/SkillsMemory/SkillsMemory.cpp
+
25
−
1
View file @
cb37cc10
...
...
@@ -115,8 +115,12 @@ namespace armarx
{
ARMARX_CHECK_NOT_NULL
(
instance
);
skills
::
SkillExecutionRequest
exInfo
=
skillExecutionRequestCoreSegment
.
convertCommit
(
instance
);
ARMARX_INFO
<<
"Execute Skill from commit: "
<<
exInfo
.
skillId
.
skillName
;
SkillManagerComponentPluginUser
::
executeSkill
(
exInfo
.
toManagerIce
(),
current
);
}
}
...
...
@@ -141,6 +145,7 @@ namespace armarx
SkillsMemory
::
removeProvider
(
const
skills
::
manager
::
dto
::
ProviderID
&
provider
,
const
Ice
::
Current
&
current
)
{
ARMARX_INFO
<<
"Remove provider from skill memory: "
<<
provider
.
providerName
;
executableSkillCoreSegment
.
removeSkillProvider
(
provider
.
providerName
);
// remove skills from memory
...
...
@@ -151,6 +156,8 @@ namespace armarx
SkillsMemory
::
executeSkill
(
const
skills
::
manager
::
dto
::
SkillExecutionRequest
&
info
,
const
Ice
::
Current
&
current
)
{
ARMARX_DEBUG
<<
"executeSkill "
<<
info
.
skillId
.
providerId
.
providerName
<<
"::"
<<
info
.
skillId
.
skillName
;
auto
e
=
skills
::
SkillExecutionRequest
::
FromIce
(
info
);
skillExecutionRequestCoreSegment
.
addSkillExecutionRequest
(
e
);
...
...
@@ -161,10 +168,14 @@ namespace armarx
SkillsMemory
::
executeSkillAsync
(
const
skills
::
manager
::
dto
::
SkillExecutionRequest
&
info
,
const
Ice
::
Current
&
current
)
{
ARMARX_DEBUG
<<
"executeSkillAsync "
<<
info
.
skillId
.
providerId
.
providerName
<<
"::"
<<
info
.
skillId
.
skillName
;
auto
e
=
skills
::
SkillExecutionRequest
::
FromIce
(
info
);
skillExecutionRequestCoreSegment
.
addSkillExecutionRequest
(
e
);
return
SkillManagerComponentPluginUser
::
executeSkillAsync
(
info
,
current
);
auto
ret
=
SkillManagerComponentPluginUser
::
executeSkillAsync
(
info
,
current
);
ARMARX_DEBUG
<<
"END executeSkillAsync "
;
return
ret
;
}
void
...
...
@@ -172,33 +183,46 @@ namespace armarx
const
skills
::
callback
::
dto
::
ProviderID
&
providerId
,
const
Ice
::
Current
&
current
)
{
ARMARX_DEBUG
<<
"updateStatusForSkill "
<<
providerId
.
providerName
;
auto
p
=
skills
::
ProviderID
::
FromIce
(
providerId
);
auto
u
=
skills
::
SkillStatusUpdate
::
FromIce
(
update
,
p
);
skillEventCoreSegment
.
addSkillUpdateEvent
(
u
);
ARMARX_DEBUG
<<
"END updateStatusForSkill "
<<
providerId
.
providerName
;
}
IceUtil
::
Optional
<
skills
::
manager
::
dto
::
SkillStatusUpdate
>
SkillsMemory
::
getSkillExecutionStatus
(
const
skills
::
manager
::
dto
::
SkillExecutionID
&
executionId
,
const
Ice
::
Current
&
current
)
{
ARMARX_DEBUG
<<
"getSkillExecutionStatus "
;
auto
eid
=
skills
::
SkillExecutionID
::
FromIce
(
executionId
);
auto
op
=
this
->
skillEventCoreSegment
.
getSkillStatusUpdate
(
eid
);
if
(
op
.
has_value
())
{
ARMARX_DEBUG
<<
"END getSkillExecutionStatus2"
;
return
op
->
toManagerIce
();
}
ARMARX_DEBUG
<<
"END getSkillExecutionStatus "
;
return
{};
}
skills
::
manager
::
dto
::
SkillStatusUpdateMap
SkillsMemory
::
getSkillExecutionStatuses
(
const
Ice
::
Current
&
current
)
{
ARMARX_DEBUG
<<
"getSkillExecutionStatuses "
;
skills
::
manager
::
dto
::
SkillStatusUpdateMap
ret
;
auto
updates
=
this
->
skillEventCoreSegment
.
getSkillStatusUpdates
();
for
(
const
auto
&
[
k
,
v
]
:
updates
)
{
ret
.
insert
({
k
.
toManagerIce
(),
v
.
toManagerIce
()});
}
ARMARX_DEBUG
<<
"END getSkillExecutionStatuses "
;
return
ret
;
}
...
...
This diff is collapsed.
Click to expand it.
Andre Meixner
@meixner
mentioned in commit
a5d6fb85
·
7 months ago
mentioned in commit
a5d6fb85
mentioned in commit a5d6fb85309dd8db6e566fafcba84fde9f73da4d
Toggle commit list
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