type.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 Jianfeng Gao ( jianfeng dot gao 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 <SimoxUtility/meta/enum/EnumNames.hpp>
25 
27 {
28 
29  enum class ControllerType
30  {
31  // ----------- NjointControllers -----------
32  TSAdm, // TSAdmittance,
33  TSImp, // TSImpedance,
34  TSImpSafe, // TSSafetyImpedance,
35  TSImpCol, // TSCollisionAvoidanceImpedance,
36  TSAdmCol, // TSCollisionAvoidanceAdmittance,
37  TSMixImpVel, // TSMixedImpedanceVelocity,
38  TSVel,
39  TSMixImpVelCol, // TSCollisionAvoidanceMixedImpedanceVelocity,
40  // KptAdm, // KptAdmittance,
41  // KptImp, // KptImpedance,
42  // ----------- NJointMPControllers -----------
43  TSMPAdm, // TSAdmittanceMP,
44  TSMPImp, // TSImpedanceMP,
45  TSMPImpCol, // TSCollisionAvoidanceImpedanceMP,
46  TSMPImpSafe, // TSSafetyImpedanceMP,
47  TSMPMixImpVel, // TSMixedImpedanceVelocityMP,
48  TSMPVel,
49  TSMPMixImpVelCol, // TSCollisionAvoidanceMixedImpedanceVelocityMP,
50  // KptMPAdm, // KptAdmittanceMP,
51  // KptMPImp, // KptImpedanceMP,
52  // KVILMPImp, // KVILImpedanceMP,
53  // BiKAC,
57  };
58 
59  enum class MPType
60  {
61  taskspace,
62  nullsapce,
63  hand,
64  // The following will probably be supported in the future
65  // hand_ts,
66  // head,
67  // platform
68  };
69 
70 
71  enum class MPStatus
72  {
73  reset,
74  trained,
75  running,
76  paused,
77  finished
78  };
79 
80  inline const simox::meta::EnumNames<MPType> mpTypeToString = {{MPType::taskspace, "taskspace"},
81  {MPType::nullsapce, "nullspace"},
82  {MPType::hand, "hand"}};
83 
84  inline const simox::meta::EnumNames<ControllerType> ControllerTypeShort{
85  {ControllerType::TSAdm, "TSAdm"},
86  {ControllerType::TSImp, "TSImp"},
87  {ControllerType::TSImpSafe, "TSImpSafe"},
88  {ControllerType::TSImpCol, "TSImpCol"},
89  {ControllerType::TSMixImpVel, "TSMixImpVel"},
90  {ControllerType::TSVel, "TSVel"},
91  {ControllerType::TSMixImpVelCol, "TSMixImpVelCol"},
92  // {ControllerType::KptAdmittance, "KeypointAdmittance"},
93  // {ControllerType::KptImpedance, "KeypointImpedance"},
94  {ControllerType::TSMPAdm, "TSMPAdm"},
95  {ControllerType::TSMPImp, "TSMPImp"},
96  {ControllerType::TSMPImpCol, "TSMPImpCol"},
97  {ControllerType::TSMPImpSafe, "TSMPImpSafe"},
98  {ControllerType::TSMPMixImpVel, "TSMPMixImpVel"},
99  {ControllerType::TSMPVel, "TSMPVel"},
100  {ControllerType::TSMPMixImpVelCol, "TSMPMixImpVelCol"},
101  // {ControllerType::KptAdmittanceMP, "KeypointAdmittanceMP"},
102  // {ControllerType::KptImpedanceMP, "KeypointImpedanceMP"},
103  // {ControllerType::KVILImpedanceMP, "KVILImpedanceMP"},
104  // {ControllerType::BiKAC, "BiKAC"},
105  {ControllerType::QPWholeBodyImpedance, "QPWholeBodyImpedance"},
106  {ControllerType::QPWholeBodyVelocity, "QPWholeBodyVelocity"},
107  {ControllerType::WholeBodyTrajectoryController, "WholeBodyTrajectoryController"}};
108 
109 
110  inline const simox::meta::EnumNames<ControllerType> ControllerTypeNames{
111  {ControllerType::TSAdm, "NJointTaskspaceAdmittanceController"},
112  {ControllerType::TSImp, "NJointTaskspaceImpedanceController"},
113  {ControllerType::TSImpSafe, "NJointTaskspaceSafetyImpedanceController"},
114  {ControllerType::TSImpCol, "NJointTaskspaceCollisionAvoidanceImpedanceController"},
115  {ControllerType::TSMixImpVel, "NJointTaskspaceMixedImpedanceVelocityController"},
116  {ControllerType::TSVel, "NJointTaskspaceVelocityController"},
118  "NJointTaskspaceCollisionAvoidanceMixedImpedanceVelocityController"},
119  // {ControllerType::KptAdmittance, "NJointKeypointsAdmittanceController"},
120  // {ControllerType::KptImpedance, "KeypointImpedance"},
121  {ControllerType::TSMPAdm, "NJointTSAdmittanceMPController"},
122  {ControllerType::TSMPImp, "NJointTSImpedanceMPController"},
123  {ControllerType::TSMPImpCol, "NJointTSCollisionAvoidanceImpedanceMPController"},
124  {ControllerType::TSMPImpSafe, "NJointTSSafetyImpedanceMPController"},
125  {ControllerType::TSMPMixImpVel, "NJointTSMixedImpedanceVelocityMPController"},
126  {ControllerType::TSMPVel, "NJointTSVelocityMPController"},
127  {ControllerType::TSMPMixImpVelCol, "NJointTSCollisionAvoidanceMixedImpedanceVelocityMP"},
128  // {ControllerType::KptAdmittanceMP, "NJointKeypointsAdmittanceMPController"},
129  // {ControllerType::KptImpedanceMP, "NJointKeypointsImpedanceMPController"},
130  // {ControllerType::BiKAC, "NJointBiKAC"},
131  // {ControllerType::KVILImpedanceMP, "NJointKVILImpedanceMPController"},
132  {ControllerType::WholeBodyTrajectoryController, "NJointWholeBodyTrajectoryController"}};
133 
134 } // namespace armarx::control::common
armarx::control::common::ControllerType::TSImp
@ TSImp
armarx::control::common::MPStatus::paused
@ paused
armarx::control::common::ControllerType::TSMPImpSafe
@ TSMPImpSafe
armarx::control::common::ControllerType::QPWholeBodyImpedance
@ QPWholeBodyImpedance
armarx::control::common::MPStatus::finished
@ finished
armarx::control::common::ControllerType::TSMPMixImpVel
@ TSMPMixImpVel
armarx::control::common::ControllerType::TSAdm
@ TSAdm
armarx::control::common::ControllerType::WholeBodyTrajectoryController
@ WholeBodyTrajectoryController
armarx::control::common
This file is part of ArmarX.
Definition: aron_conversions.cpp:29
armarx::control::common::ControllerType::TSImpSafe
@ TSImpSafe
armarx::control::common::MPType::nullsapce
@ nullsapce
armarx::control::common::ControllerTypeNames
const simox::meta::EnumNames< ControllerType > ControllerTypeNames
Definition: type.h:110
armarx::control::common::ControllerType::QPWholeBodyVelocity
@ QPWholeBodyVelocity
armarx::control::common::ControllerType::TSMPMixImpVelCol
@ TSMPMixImpVelCol
armarx::control::common::ControllerType::TSMixImpVelCol
@ TSMixImpVelCol
armarx::control::common::ControllerType::TSMixImpVel
@ TSMixImpVel
armarx::control::common::mpTypeToString
const simox::meta::EnumNames< MPType > mpTypeToString
Definition: type.h:80
armarx::control::common::MPType
MPType
Definition: type.h:59
armarx::control::common::ControllerType::TSVel
@ TSVel
armarx::control::common::ControllerTypeShort
const simox::meta::EnumNames< ControllerType > ControllerTypeShort
Definition: type.h:84
armarx::control::common::ControllerType::TSMPImp
@ TSMPImp
armarx::control::common::MPType::hand
@ hand
armarx::control::common::ControllerType::TSMPAdm
@ TSMPAdm
armarx::control::common::ControllerType::TSMPVel
@ TSMPVel
armarx::control::common::MPStatus::trained
@ trained
armarx::control::common::ControllerType
ControllerType
Definition: type.h:29
armarx::control::common::MPStatus
MPStatus
Definition: type.h:71
armarx::control::common::ControllerType::TSAdmCol
@ TSAdmCol
armarx::control::common::ControllerType::TSImpCol
@ TSImpCol
armarx::control::common::ControllerType::TSMPImpCol
@ TSMPImpCol
armarx::control::common::MPType::taskspace
@ taskspace
armarx::control::common::MPStatus::reset
@ reset
armarx::control::common::MPStatus::running
@ running