ShapeHand.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
RobotAPI/libraries/skills/provider/SpecializedSkill.h
>
4
5
#include <armarx/control/skills/aron/ShapeHandParams.aron.generated.h>
6
#include <
armarx/control/skills/constants/constants.h
>
7
8
#include "
HandUnitServices.h
"
9
10
namespace
armarx::control::skills::skills
11
{
12
13
class
ShapeHand
:
public
::armarx::skills::SpecializedSkill
<arondto::ShapeHandParams>
14
{
15
16
public
:
17
static ::armarx::skills::SkillDescription
18
GetSkillDescription
()
19
{
20
ParamType
defaultParams;
21
22
return ::armarx::skills::SkillDescription{
23
.
skillId
= {.
skillName
=
constants::SHAPE_HAND_SKILL_NAME
},
24
.description =
25
"Shapes the hand according to a predefined shape or passed joint angles"
,
26
.rootProfileDefaults = defaultParams.toAron(),
27
.timeout =
::armarx::Duration::Minutes
(1),
28
.parametersType = ParamType::ToAronType(),
29
};
30
}
31
32
ShapeHand
(
const
HandUnitServices
&);
33
34
private
:
35
::armarx::skills::Skill::MainResult
main()
override
;
36
Skill::MainResult waitUntilFinished(
const
NameValueMap
& targetAngles);
37
38
private
:
39
HandUnitServices
srv_;
40
41
float
getAccuracy(
const
std::string& jointName);
42
};
43
44
class
OpenHand
:
public
::armarx::skills::SpecializedSkill
<arondto::OpenHandParams>
45
{
46
public
:
47
static ::armarx::skills::SkillDescription
48
GetSkillDescription
()
49
{
50
ParamType
defaultParams;
51
52
return ::armarx::skills::SkillDescription{
53
.
skillId
= {.
skillName
=
constants::OPEN_HAND_SKILL_NAME
},
54
.description =
"Sets hand shape to 'Open'"
,
55
.rootProfileDefaults = defaultParams.toAron(),
56
.timeout =
::armarx::Duration::Minutes
(1),
57
.parametersType = ParamType::ToAronType()};
58
}
59
60
OpenHand
();
61
62
private
:
63
::armarx::skills::Skill::MainResult
main()
override
;
64
};
65
66
class
CloseHand
:
public
::armarx::skills::SpecializedSkill
<arondto::CloseHandParams>
67
{
68
public
:
69
static ::armarx::skills::SkillDescription
70
GetSkillDescription
()
71
{
72
ParamType
defaultParams;
73
74
return ::armarx::skills::SkillDescription{
75
.
skillId
= {.
skillName
=
constants::CLOSE_HAND_SKILL_NAME
},
76
.description =
"Sets hand shape to 'Close'"
,
77
.rootProfileDefaults = defaultParams.toAron(),
78
.timeout =
::armarx::Duration::Minutes
(1),
79
.parametersType = ParamType::ToAronType()};
80
}
81
82
CloseHand
();
83
84
private
:
85
::armarx::skills::Skill::MainResult
main()
override
;
86
};
87
88
}
// namespace armarx::control::skills::skills
armarx::control::skills::skills::ShapeHand::GetSkillDescription
::armarx::skills::SkillDescription GetSkillDescription()
Definition:
ShapeHand.h:18
armarx::skills::SpecializedSkill
Definition:
SpecializedSkill.h:9
armarx::control::skills::skills::ShapeHand::ShapeHand
ShapeHand(const HandUnitServices &)
Definition:
ShapeHand.cpp:8
armarx::control::skills::HandUnitServices
Definition:
HandUnitServices.h:17
armarx::control::skills::skills::OpenHand
Definition:
ShapeHand.h:44
armarx::skills::SkillID::skillName
std::string skillName
Definition:
SkillID.h:41
HandUnitServices.h
armarx::control::skills::skills::OpenHand::GetSkillDescription
::armarx::skills::SkillDescription GetSkillDescription()
Definition:
ShapeHand.h:48
armarx::control::skills::constants::CLOSE_HAND_SKILL_NAME
std::string CLOSE_HAND_SKILL_NAME
Definition:
constants.cpp:14
constants.h
armarx::control::skills::skills::OpenHand::OpenHand
OpenHand()
Definition:
ShapeHand.cpp:176
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition:
SkillDescription.h:19
armarx::control::skills::constants::OPEN_HAND_SKILL_NAME
std::string OPEN_HAND_SKILL_NAME
Definition:
constants.cpp:13
armarx::core::time::Duration::Minutes
static Duration Minutes(std::int64_t minutes)
Constructs a duration in minutes.
Definition:
Duration.cpp:96
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition:
Skill.h:39
armarx::control::skills::constants::SHAPE_HAND_SKILL_NAME
std::string SHAPE_HAND_SKILL_NAME
Definition:
constants.cpp:12
armarx::control::njoint_controller::platform::platform_follower_controller::NameValueMap
std::map< std::string, float > NameValueMap
Definition:
PlatformFollowerController.h:88
armarx::control::skills::skills::CloseHand
Definition:
ShapeHand.h:66
armarx::skills::SpecializedSkill< arondto::ShapeHandParams >::ParamType
arondto::ShapeHandParams ParamType
Definition:
SpecializedSkill.h:13
armarx::control::skills::skills
Definition:
ExecuteTrajectory.cpp:18
armarx::control::skills::skills::CloseHand::GetSkillDescription
::armarx::skills::SkillDescription GetSkillDescription()
Definition:
ShapeHand.h:70
SpecializedSkill.h
armarx::control::skills::skills::ShapeHand
Definition:
ShapeHand.h:13
armarx::control::skills::skills::CloseHand::CloseHand
CloseHand()
Definition:
ShapeHand.cpp:196
armarx
control
skills
skills
ShapeHand.h
Generated on Sat Mar 29 2025 09:17:33 for armarx_documentation by
1.8.17