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
29
31{
32 /**
33 * @defgroup Library-retrieve_hand retrieve_hand
34 * @ingroup control
35 * A description of the library retrieve_hand.
36 *
37 * @class retrieve_hand
38 * @ingroup Library-retrieve_hand
39 * @brief Brief description of class retrieve_hand.
40 *
41 * Detailed description of class retrieve_hand.
42 */
44 {
45 public:
53
55 {
56 std::string robotName;
57 std::string robotNodeSet;
59 // Eigen::Matrix4f targetPoseInRoot;
61 float kpLinear = 10.0f;
62 float kpAngular = 10.0f;
63 float kdLinear = 1.0f;
64 float kdAngular = 1.0f;
65
66 std::vector<std::string> fileNames;
67 };
68
69 struct Subskills
70 {
71 std::function<bool(const Eigen::Vector3f&)> lookAt;
72 std::function<bool()> openHand;
73 std::function<bool()> closeHand;
74 };
75
76 RetrieveHand(const Remote&, const Properties&);
77 virtual ~RetrieveHand() = default;
78
79 void
81 {
82 running.store(false);
83 _deleteTSVMPController();
84 }
85
86 bool
88 {
89 std::scoped_lock l(executionMutex);
90 running.store(true);
91 return _runTSVMPController();
92 }
93
94 protected:
97
98 private:
99 bool _runTSVMPController();
100 void _deleteTSVMPController();
101 mutable std::mutex executionMutex;
102 std::atomic_bool running = false;
103 };
104
105} // namespace armarx::control::retrieve_hand::core
The FramedPose class.
Definition FramedPose.h:281
The memory name system (MNS) client.
RetrieveHand(const Remote &, const Properties &)
::IceInternal::ProxyHandle<::IceProxy::armarx::RobotUnitInterface > RobotUnitInterfacePrx
armarx::armem::client::MemoryNameSystem & memoryNameSystem
std::function< bool(const Eigen::Vector3f &)> lookAt