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
29
31{
32
33 ::armarx::skills::SkillDescription
35 {
36 ParamType defaultParams;
37 armarx::human::arondto::PersonID id = armarx::human::arondto::PersonID();
38 id.firstName = "John";
39 id.lastName = "Handover";
40 defaultParams.profileID = id;
41
42 const std::string skillName =
44 const armarx::skills::SkillID skillId =
46
47 return ::armarx::skills::SkillDescription{
48 .skillId = skillId,
49 .description = "Creates and commits an empty profile with the defined name.",
50 .rootProfileDefaults = defaultParams.toAron(),
51 .timeout = ::armarx::Duration::MilliSeconds(1000),
52 .parametersType = ParamType::ToAronType()};
53 }
54
60
62 CreateHumanProfile::main(const SpecializedMainInput& in)
63 {
64 core::PersonSimulator simulator(remote, properties);
66 fromAron(in.parameters.profileID, id);
67 simulator.createHumanProfile(id);
68 return Skill::MakeSucceededResult();
69 }
70
71} // namespace VisionX::person_simulator::skills
The core library for interaction with the person memory.
CreateHumanProfile(const core::PersonSimulator::Remote &r, const core::PersonSimulator::Properties &p)
::armarx::skills::SkillDescription GetSkillDescription()
::armarx::skills::SimpleSpecializedSkill< ::VisionX::person_simulator::skills::arondto::CreateHumanProfileParams > Base
static Duration MilliSeconds(std::int64_t milliSeconds)
Constructs a duration in milliseconds.
Definition Duration.cpp:48
virtual MainResult main()
Override this method with the actual implementation.
Definition Skill.cpp:542
const armarx::skills::SkillID CreateHumanProfile
Definition skill_ids.h:32
Fixed properties of this skill implementation.
Remote parameters of this skill implementation.
A result struct for th main method of a skill.
Definition Skill.h:62