CloseHand.cpp
Go to the documentation of this file.
1
#include "
CloseHand.h
"
2
3
#include "
util/HandUtil.h
"
4
5
namespace
armarx::skills
6
{
7
8
SkillDescription
CloseHand::Description
=
9
skills::SkillDescription{
"CloseHand"
,
10
"Close a hand"
,
11
{},
12
armarx::Duration::MilliSeconds
(2000),
13
hand_control::arondto::CloseHandAcceptedType::ToAronType()};
14
15
CloseHand::CloseHand
(
HandControlSkillContext
& context) :
16
HandControlSkill
(context),
SimpleSpecializedSkill
<
ArgType
>(Description)
17
{
18
}
19
20
Skill::MainResult
21
CloseHand::main
(
const
SpecializedMainInput& in)
22
{
23
if
(
simox::alg::starts_with
(in.parameters.kinematicChainName,
"Left"
))
24
{
25
closeLeftHand
();
26
return
{
TerminatedSkillStatus::Succeeded
,
nullptr
};
27
}
28
29
if
(
simox::alg::starts_with
(in.parameters.kinematicChainName,
"Right"
))
30
{
31
closeRightHand
();
32
return
{
TerminatedSkillStatus::Succeeded
,
nullptr
};
33
}
34
35
return
{
TerminatedSkillStatus::Failed
,
nullptr
};
36
}
37
}
// namespace armarx::skills
armarx::skills::CloseHand::Description
static SkillDescription Description
Definition:
CloseHand.h:46
armarx::skills::TerminatedSkillStatus::Succeeded
@ Succeeded
armarx::skills::CloseHand::ArgType
hand_control::arondto::CloseHandAcceptedType ArgType
Definition:
CloseHand.h:38
armarx::skills
This file is part of ArmarX.
Definition:
PeriodicUpdateWidget.cpp:11
armarx::skills::CloseHand::CloseHand
CloseHand(HandControlSkillContext &context)
Definition:
CloseHand.cpp:15
armarx::starts_with
bool starts_with(const std::string &haystack, const std::string &needle)
Definition:
StringHelpers.cpp:47
armarx::skills::SimpleSpecializedSkill
Definition:
SimpleSpecializedSkill.h:10
armarx::skills::HandControlSkill
Definition:
HandControlSkill.h:62
armarx::skills::HandControlSkill::closeRightHand
void closeRightHand()
Definition:
HandControlSkill.h:83
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition:
Skill.h:39
armarx::skills::HandControlSkillContext
Definition:
HandControlSkill.h:45
armarx::skills::TerminatedSkillStatus::Failed
@ Failed
armarx::skills::SimpleSpecializedSkill< hand_control::arondto::CloseHandAcceptedType >::main
Skill::MainResult main() final
Definition:
SimpleSpecializedSkill.h:71
CloseHand.h
armarx::skills::HandControlSkill::closeLeftHand
void closeLeftHand()
Definition:
HandControlSkill.h:69
HandUtil.h
armarx::core::time::Duration::MilliSeconds
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition:
Duration.cpp:48
RobotSkillTemplates
libraries
skill_hand_control
CloseHand.cpp
Generated on Sat Mar 29 2025 09:17:33 for armarx_documentation by
1.8.17