RetrieveHand.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
* @package control::ArmarXObjects::retrieve_hand
17
* @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
18
* @date 2023
19
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20
* GNU General Public License
21
*/
22
23
#pragma once
24
25
#include <
RobotAPI/libraries/armem_objects/client/attachment/Reader.h
>
26
#include <
RobotAPI/libraries/armem_objects/client/attachment/Writer.h
>
27
#include <
RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotReader.h
>
28
#include <
RobotAPI/libraries/robot_name_service/core/Robot.h
>
29
30
31
namespace
armarx::control::retrieve_hand::core
32
{
33
/**
34
* @defgroup Library-retrieve_hand retrieve_hand
35
* @ingroup control
36
* A description of the library retrieve_hand.
37
*
38
* @class retrieve_hand
39
* @ingroup Library-retrieve_hand
40
* @brief Brief description of class retrieve_hand.
41
*
42
* Detailed description of class retrieve_hand.
43
*/
44
class
RetrieveHand
45
{
46
public
:
47
48
struct
Remote
49
{
50
// armarx::viz::Client arviz;
51
armarx::armem::client::MemoryNameSystem
memoryNameSystem
;
52
53
armarx::RobotUnitInterfacePrx
robotUnit
;
54
};
55
56
struct
Properties
57
{
58
std::string
robotName
;
59
std::string
robotNodeSet
;
60
double
timeDurationInSec
;
61
// Eigen::Matrix4f targetPoseInRoot;
62
armarx::FramedPose
targetPose
;
63
float
kpLinear
= 10.0f;
64
float
kpAngular
= 10.0f;
65
float
kdLinear
= 1.0f;
66
float
kdAngular
= 1.0f;
67
68
std::vector<std::string>
fileNames
;
69
};
70
71
struct
Subskills
72
{
73
std::function<bool(
const
Eigen::Vector3f&)>
lookAt
;
74
std::function<bool()>
openHand
;
75
std::function<bool()>
closeHand
;
76
};
77
78
RetrieveHand
(
const
Remote
&,
const
Properties
&);
79
virtual
~RetrieveHand
() =
default
;
80
81
void
82
stop
()
83
{
84
running.store(
false
);
85
_deleteTSVMPController();
86
}
87
88
bool
execute
()
89
{
90
std::scoped_lock l(executionMutex);
91
running.store(
true
);
92
return
_runTSVMPController();
93
}
94
95
protected
:
96
Remote
remote
;
97
Properties
properties
;
98
99
private
:
100
bool
_runTSVMPController();
101
void
_deleteTSVMPController();
102
mutable
std::mutex executionMutex;
103
std::atomic_bool running =
false
;
104
};
105
106
}
armarx::control::retrieve_hand::core::RetrieveHand::Remote::robotUnit
armarx::RobotUnitInterfacePrx robotUnit
Definition:
RetrieveHand.h:53
armarx::control::retrieve_hand::core
Definition:
RetrieveHand.cpp:31
armarx::control::retrieve_hand::core::RetrieveHand::Properties::timeDurationInSec
double timeDurationInSec
Definition:
RetrieveHand.h:60
armarx::FramedPose
The FramedPose class.
Definition:
FramedPose.h:258
armarx::control::retrieve_hand::core::RetrieveHand::Properties::kpAngular
float kpAngular
Definition:
RetrieveHand.h:64
armarx::control::retrieve_hand::core::RetrieveHand::stop
void stop()
Definition:
RetrieveHand.h:82
armarx::control::retrieve_hand::core::RetrieveHand::Remote
Definition:
RetrieveHand.h:48
armarx::control::retrieve_hand::core::RetrieveHand::Properties::robotNodeSet
std::string robotNodeSet
Definition:
RetrieveHand.h:59
armarx::control::retrieve_hand::core::RetrieveHand::Subskills::openHand
std::function< bool()> openHand
Definition:
RetrieveHand.h:74
armarx::control::retrieve_hand::core::RetrieveHand::Properties::fileNames
std::vector< std::string > fileNames
Definition:
RetrieveHand.h:68
armarx::control::retrieve_hand::core::RetrieveHand::Properties::kpLinear
float kpLinear
Definition:
RetrieveHand.h:63
armarx::control::retrieve_hand::core::RetrieveHand::Subskills::lookAt
std::function< bool(const Eigen::Vector3f &)> lookAt
Definition:
RetrieveHand.h:73
armarx::control::retrieve_hand::core::RetrieveHand::execute
bool execute()
Definition:
RetrieveHand.h:88
armarx::control::retrieve_hand::core::RetrieveHand::properties
Properties properties
Definition:
RetrieveHand.h:97
armarx::control::retrieve_hand::core::RetrieveHand::Remote::memoryNameSystem
armarx::armem::client::MemoryNameSystem memoryNameSystem
Definition:
RetrieveHand.h:51
VirtualRobotReader.h
armarx::control::retrieve_hand::core::RetrieveHand::Properties
Definition:
RetrieveHand.h:56
armarx::control::retrieve_hand::core::RetrieveHand::Properties::kdLinear
float kdLinear
Definition:
RetrieveHand.h:65
armarx::control::retrieve_hand::core::RetrieveHand::remote
Remote remote
Definition:
RetrieveHand.h:96
armarx::control::retrieve_hand::core::RetrieveHand::RetrieveHand
RetrieveHand(const Remote &, const Properties &)
Definition:
RetrieveHand.cpp:35
Robot.h
Reader.h
armarx::control::retrieve_hand::core::RetrieveHand::Subskills
Definition:
RetrieveHand.h:71
IceInternal::ProxyHandle<::IceProxy::armarx::RobotUnitInterface >
armarx::control::retrieve_hand::core::RetrieveHand::Properties::robotName
std::string robotName
Definition:
RetrieveHand.h:58
armarx::armem::client::MemoryNameSystem
The memory name system (MNS) client.
Definition:
MemoryNameSystem.h:69
armarx::control::retrieve_hand::core::RetrieveHand::Properties::targetPose
armarx::FramedPose targetPose
Definition:
RetrieveHand.h:62
armarx::control::retrieve_hand::core::RetrieveHand
Definition:
RetrieveHand.h:44
armarx::control::retrieve_hand::core::RetrieveHand::Subskills::closeHand
std::function< bool()> closeHand
Definition:
RetrieveHand.h:75
armarx::control::retrieve_hand::core::RetrieveHand::Properties::kdAngular
float kdAngular
Definition:
RetrieveHand.h:66
Writer.h
armarx::control::retrieve_hand::core::RetrieveHand::~RetrieveHand
virtual ~RetrieveHand()=default
armarx
control
retrieve_hand
core
RetrieveHand.h
Generated on Sat Oct 12 2024 09:14:15 for armarx_documentation by
1.8.17