CreateHumanProfile.cpp
Go to the documentation of this file.
1
/*
2
* This file is part of ArmarX.
3
*
4
* ArmarX is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation.
7
*
8
* ArmarX is distributed in the hope that it will be useful, but
9
* WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
* @package VisionX::COMPONENT_NAME_SNAKE::skills
17
* @author Peter Albrecht ( usnlf at student dot kit dot edu)
18
* @date 2024
19
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20
* GNU General Public License
21
*/
22
23
#include "
CreateHumanProfile.h
"
24
25
#include "
VisionX/libraries/person_simulator/core/PersonSimulator.h
"
26
#include "
VisionX/libraries/person_simulator/skills/constants.h
"
27
#include "
VisionX/libraries/person_simulator/skills/skill_ids.h
"
28
29
namespace
VisionX::person_simulator::skills
30
{
31
32
::armarx::skills::SkillDescription
33
CreateHumanProfile::GetSkillDescription
()
34
{
35
ParamType
defaultParams;
36
defaultParams.profileName =
"John Handover"
;
37
38
const
std::string skillName =
39
VisionX::person_simulator::skills::constants::CreateHumanProfile
;
40
const
armarx::skills::SkillID
skillId =
41
VisionX::person_simulator::skills::skill_ids::CreateHumanProfile
;
42
43
return ::armarx::skills::SkillDescription{
44
.skillId = skillId,
45
.description =
"Creates and commits an empty profile with the defined name."
,
46
.rootProfileDefaults = defaultParams.toAron(),
47
.timeout =
::armarx::Duration::MilliSeconds
(1000),
48
.parametersType = ParamType::ToAronType()};
49
}
50
51
CreateHumanProfile::CreateHumanProfile
(
const
core::PersonSimulator::Remote
& r,
52
const
core::PersonSimulator::Properties
& p) :
53
Base
(GetSkillDescription()), remote(r), properties(p)
54
{
55
}
56
57
CreateHumanProfile::MainResult
58
CreateHumanProfile::main
(
const
SpecializedMainInput& in)
59
{
60
core::PersonSimulator
simulator(remote, properties);
61
simulator.createHumanProfile(in.parameters.profileName);
62
return
Skill::MakeSucceededResult();
63
}
64
65
}
// namespace VisionX::person_simulator::skills
armarx::skills::SimpleSpecializedSkill< ::VisionX::person_simulator::skills::arondto::CreateHumanProfileParams >::ParamType
::VisionX::person_simulator::skills::arondto::CreateHumanProfileParams ParamType
Definition:
SimpleSpecializedSkill.h:14
armarx::skills::SkillDescription
Definition:
SkillDescription.h:17
PersonSimulator.h
VisionX::person_simulator::skills::CreateHumanProfile::CreateHumanProfile
CreateHumanProfile(const core::PersonSimulator::Remote &r, const core::PersonSimulator::Properties &p)
Definition:
CreateHumanProfile.cpp:51
constants.h
VisionX::person_simulator::skills
Definition:
constants.h:28
VisionX::person_simulator::skills::skill_ids::CreateHumanProfile
const armarx::skills::SkillID CreateHumanProfile
Definition:
skill_ids.h:32
VisionX::person_simulator::skills::constants::CreateHumanProfile
const std::string CreateHumanProfile
Definition:
constants.h:31
VisionX::person_simulator::core::PersonSimulator::Properties
Fixed properties of this skill implementation.
Definition:
PersonSimulator.h:56
skill_ids.h
CreateHumanProfile.h
VisionX::person_simulator::core::PersonSimulator::Remote
Remote parameters of this skill implementation.
Definition:
PersonSimulator.h:47
VisionX::person_simulator::core::PersonSimulator
The core library for interaction with the person memory. Provides functions for creation and updating...
Definition:
PersonSimulator.h:43
armarx::skills::SimpleSpecializedSkill< ::VisionX::person_simulator::skills::arondto::CreateHumanProfileParams >
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition:
Skill.h:39
armarx::skills::SimpleSpecializedSkill< ::VisionX::person_simulator::skills::arondto::CreateHumanProfileParams >::main
Skill::MainResult main() final
Definition:
SimpleSpecializedSkill.h:71
VisionX::person_simulator::skills::CreateHumanProfile::GetSkillDescription
::armarx::skills::SkillDescription GetSkillDescription()
Definition:
CreateHumanProfile.cpp:33
armarx::skills::SkillID
Definition:
SkillID.h:14
armarx::core::time::Duration::MilliSeconds
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition:
Duration.cpp:48
VisionX
libraries
person_simulator
skills
CreateHumanProfile.cpp
Generated on Sat Apr 5 2025 09:13:35 for armarx_documentation by
1.8.17