FTSensorTrigger.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 2022
18
* @copyright http://www.gnu.org/licenses/gpl-2.0.txt
19
* GNU General Public License
20
*/
21
22
#pragma once
23
24
#include <RobotAPI/interface/units/ForceTorqueUnit.h>
25
#include <
RobotAPI/libraries/armem_robot_state/client/common/RobotReader.h
>
26
27
namespace
armarx::control::common::ft
28
{
29
30
31
struct
FTSensorTriggerParams
32
{
33
float
forceThreshold
= 20.F;
34
35
int
windowSizeMs
= 200;
36
int
cycleTimeMs
= 10;
37
38
Eigen::Vector3f
forceDetectionMask
= Eigen::Vector3f::Ones();
39
};
40
41
class
FTSensorTrigger
42
{
43
public
:
44
using
Params
=
FTSensorTriggerParams
;
45
46
FTSensorTrigger
(
armarx::armem::robot_state::RobotReader
& robotReader,
47
const
std::string& robotName,
48
const
armem::robot_state::RobotReader::Hand
& hand,
49
const
Params
& params =
Params
());
50
51
FTSensorTrigger
(
FTSensorTrigger
&) =
delete
;
52
53
enum class
Edge
54
{
55
RISING
,
56
FALLING
57
};
58
59
void
waitForForceSpike
(
Edge
edge)
const
;
60
void
waitForForceThreshold
(
float
threshold)
const
;
61
62
private
:
63
armarx::armem::robot_state::RobotReader
& robotReader;
64
const
std::string robotName;
65
66
const
armem::robot_state::RobotReader::Hand
hand
;
67
const
Params
params;
68
};
69
70
71
}
// namespace armarx::control::common::ft
armarx::control::common::ft::FTSensorTrigger::Edge::FALLING
@ FALLING
armarx::armem::robot_state::RobotReader::Hand
Hand
Definition:
RobotReader.h:91
armarx::control::common::ft
This file is part of ArmarX.
Definition:
aron_conversions.cpp:29
armarx::control::common::ft::FTSensorTrigger::waitForForceThreshold
void waitForForceThreshold(float threshold) const
Definition:
FTSensorTrigger.cpp:181
armarx::control::common::ft::FTSensorTrigger::waitForForceSpike
void waitForForceSpike(Edge edge) const
Definition:
FTSensorTrigger.cpp:44
armarx::control::common::ft::FTSensorTrigger::FTSensorTrigger
FTSensorTrigger(armarx::armem::robot_state::RobotReader &robotReader, const std::string &robotName, const armem::robot_state::RobotReader::Hand &hand, const Params ¶ms=Params())
Definition:
FTSensorTrigger.cpp:34
armarx::control::common::ft::FTSensorTriggerParams::forceThreshold
float forceThreshold
Definition:
FTSensorTrigger.h:33
armarx::control::common::ft::FTSensorTrigger::Edge
Edge
Definition:
FTSensorTrigger.h:53
armarx::control::common::ft::FTSensorTriggerParams
Definition:
FTSensorTrigger.h:31
armarx::control::common::ft::FTSensorTrigger::Params
FTSensorTriggerParams Params
Definition:
FTSensorTrigger.h:44
RobotReader.h
armarx::armem::robot_state::RobotReader
The RobotReader class.
Definition:
RobotReader.h:43
armarx::control::common::MPType::hand
@ hand
armarx::control::common::ft::FTSensorTrigger
Definition:
FTSensorTrigger.h:41
armarx::control::common::ft::FTSensorTriggerParams::forceDetectionMask
Eigen::Vector3f forceDetectionMask
Definition:
FTSensorTrigger.h:38
armarx::control::common::ft::FTSensorTriggerParams::cycleTimeMs
int cycleTimeMs
Definition:
FTSensorTrigger.h:36
armarx::control::common::ft::FTSensorTriggerParams::windowSizeMs
int windowSizeMs
Definition:
FTSensorTrigger.h:35
armarx::control::common::ft::FTSensorTrigger::Edge::RISING
@ RISING
armarx
control
common
ft
FTSensorTrigger.h
Generated on Sat Oct 12 2024 09:14:14 for armarx_documentation by
1.8.17