NavigateTo.h
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
* @author Fabian Reister ( fabian dot reister at kit dot edu )
17
* @date 2023
18
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19
* GNU General Public License
20
*/
21
22
#pragma once
23
24
#include <
ArmarXCore/core/ManagedIceObject.h
>
25
#include <
ArmarXCore/core/time/Duration.h
>
26
27
#include <
RobotAPI/libraries/skills/provider/SimpleSkill.h
>
28
#include <
RobotAPI/libraries/skills/provider/SimpleSpecializedSkill.h
>
29
30
#include <
armarx/navigation/client.h
>
31
#include <
armarx/navigation/client/services/MemorySubscriber.h
>
32
#include <armarx/navigation/skills/aron/NavigateTo.aron.generated.h>
33
#include <
armarx/navigation/skills/constants.h
>
34
35
namespace
armarx::navigation::skills
36
{
37
class
NavigateTo
:
38
virtual
public
armarx::skills::SimpleSpecializedSkill
<arondto::NavigateToParams>
39
{
40
public
:
41
using
Params
= arondto::NavigateToParams;
42
using
Base
=
::armarx::skills::SimpleSpecializedSkill<Params>
;
43
44
struct
Services
45
{
46
client::IceNavigator
&
iceNavigator
;
47
armem::client::MemoryNameSystem
&
memoryNameSystem
;
48
};
49
50
NavigateTo
(
const
Services
& srv);
51
52
private
:
53
::armarx::skills::Skill::InitResult
init
(
const
Base::SpecializedInitInput
& in)
override
;
54
55
::armarx::skills::Skill::MainResult
main
(
const
Base::SpecializedMainInput
& in)
override
;
56
57
void
onStopRequested()
override
;
58
59
60
public
:
61
static
armarx::skills::SkillDescription
62
DefaultSkillDescription
()
63
{
64
return
armarx::skills::SkillDescription
{
65
.
skillId
= {.
skillName
=
constants::skill_names::NavigateTo
},
66
.description =
""
,
67
.timeout =
armarx::core::time::Duration::Seconds
(120),
68
.parametersType = Params::ToAronType()};
69
}
70
71
protected
:
72
private
:
73
std::optional<Services> srv_;
74
75
// will be initialized in "init()"
76
std::optional<client::MemorySubscriber> memorySubscriber;
77
std::optional<client::Navigator> navigator;
78
};
79
80
}
// namespace armarx::navigation::skills
constants.h
armarx::skills::SimpleSpecializedSkill< arondto::NavigateToParams >::init
Skill::InitResult init() final
Definition:
SimpleSpecializedSkill.h:62
armarx::navigation::skills::NavigateTo
Definition:
NavigateTo.h:37
armarx::skills::SkillID::skillName
std::string skillName
Definition:
SkillID.h:60
armarx::skills::SkillDescription
Definition:
SkillDescription.h:18
Duration.h
armarx::navigation::client::IceNavigator
Definition:
IceNavigator.h:17
armarx::navigation::skills::NavigateTo::NavigateTo
NavigateTo(const Services &srv)
Definition:
NavigateTo.cpp:49
SimpleSpecializedSkill.h
armarx::skills::SimpleSpecializedSkill::SpecializedMainInput
Definition:
SimpleSpecializedSkill.h:24
armarx::navigation::skills::NavigateTo::Services
Definition:
NavigateTo.h:44
MemorySubscriber.h
armarx::core::time::Duration::Seconds
static Duration Seconds(std::int64_t seconds)
Constructs a duration in seconds.
Definition:
Duration.cpp:83
ManagedIceObject.h
armarx::navigation::skills::constants::skill_names::NavigateTo
const std::string NavigateTo
Definition:
constants.h:38
armarx::navigation::skills::NavigateTo::Params
arondto::NavigateToParams Params
Definition:
NavigateTo.h:41
armarx::skills::SkillDescription::skillId
SkillID skillId
Definition:
SkillDescription.h:20
armarx::skills::SimpleSpecializedSkill
Definition:
SimpleSpecializedSkill.h:10
client.h
armarx::skills::Skill::MainResult
A result struct for th main method of a skill.
Definition:
Skill.h:48
SimpleSkill.h
armarx::skills::SimpleSpecializedSkill::SpecializedInitInput
Definition:
SimpleSpecializedSkill.h:18
armarx::skills::SimpleSpecializedSkill< arondto::NavigateToParams >::main
Skill::MainResult main() final
Definition:
SimpleSpecializedSkill.h:71
armarx::skills::Skill::InitResult
A result struct for skill initialization.
Definition:
Skill.h:36
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition:
MemoryNameSystem.h:69
armarx::navigation::skills::NavigateTo::DefaultSkillDescription
static armarx::skills::SkillDescription DefaultSkillDescription()
Definition:
NavigateTo.h:62
armarx::navigation::skills::NavigateTo::Services::iceNavigator
client::IceNavigator & iceNavigator
Definition:
NavigateTo.h:46
armarx::navigation::skills
Definition:
constants.cpp:25
armarx::navigation::skills::NavigateTo::Services::memoryNameSystem
armem::client::MemoryNameSystem & memoryNameSystem
Definition:
NavigateTo.h:47
armarx
navigation
skills
NavigateTo.h
Generated on Sat Oct 12 2024 09:14:15 for armarx_documentation by
1.8.17