Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
Python3 ArmarX
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
Releases
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
Python3 ArmarX
Commits
3ec16f03
Commit
3ec16f03
authored
2 years ago
by
Rainer Kartmann
Browse files
Options
Downloads
Patches
Plain Diff
Add example skills_client
parent
e596c0e3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!27
Add support for skills framework
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/skills_client.py
+36
-0
36 additions, 0 deletions
examples/skills_client.py
with
36 additions
and
0 deletions
examples/skills_client.py
0 → 100755
+
36
−
0
View file @
3ec16f03
#!/usr/bin/env python3
from
armarx_skills.provider.skill_id
import
SkillID
from
armarx_skills.manager.skill_manager
import
SkillManager
from
armarx_skills.manager.skill_execution_request
import
SkillExecutionRequest
def
main
():
name
=
"
execute_skill_example
"
manager
=
SkillManager
.
wait_for_manager
()
statuses
=
manager
.
get_skill_execution_statuses
()
for
x_name
,
update_map
in
statuses
.
items
():
print
(
f
"
-
'
{
x_name
}
'"
)
for
y_name
,
update
in
update_map
.
items
():
print
(
f
"
-
'
{
y_name
}
'
:
"
)
print
(
update
)
execution_req
=
SkillExecutionRequest
(
executor_name
=
name
,
skill_id
=
SkillID
(
provider_name
=
"
SkillProviderExample
"
,
skill_name
=
"
HelloWorld
"
,
),
params
=
{
"
some_float
"
:
42.0
,
"
some_int
"
:
0x42
,
"
some_text
"
:
"
fourty two
"
,
}
)
manager
.
execute_skill
()
if
__name__
==
"
__main__
"
:
main
()
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