AuboStudio SDK 0.6.3

payload.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_PAYLOAD_H
2 #define AUBO_SCOPE_PAYLOAD_H
3
4 #include <vector>
5 #include <aubo_caps/class_forward.h>
6
7 namespace arcs {
8 namespace aubo_scope {
9 ARCS_CLASS_FORWARD(Payload);
10
11 /**
12 * @defgroup Payload Payload (负载参数)
13 * \~chinese 获取负载参数API接口
14 * \~english API interface for payload parameters
15 */
16 class ARCS_ABI_EXPORT Payload
17 {
18 public:
19 Payload(Payload &f);
20 Payload(Payload &&f);
21 ~Payload();
22
23 /**
24 * <p>
25 * This enum represents the different types of warnings that the parameters
26 * of a payload can have.
27 * </p>
28 *
29 * A payload can be usable, but may have a value for a payload parameter or
30 * may have a combination of (some of the) payload parameters, that could
31 * affect performance of the robot, if the payload is used (i.e., if the
32 * parameters are applied).
33 */
34 enum ParametersWarning
35 {
36
37 /**
38 * None of the parameters of the payload or the combination of payload
39 * parameters has any warnings.
40 */
41 NO_WARNING,
42
43 /**
44 * The payload has a mass of 0 kg which is most likely not
45 * intended/valid. Note that the value for the payload mass should be
46 * the total mass of the payload attached to the tool output flange of
47 * the robot.
48 */
49 MASS_0KG,
50
51 /**
52 * The mass of the payload exceeds the rated maximum supported payload
53 * mass of the robot. Using the payload could affect performance of the
54 * robot.
55 */
56 RATED_MASS_EXCEEDED,
57
58 /**
59 * The combination of the mass and the center of gravity of could affect
60 * the performance of the robot, if the payload is used.
61 */
62 MASS_AND_CENTER_OF_GRAVITY_EXCEEDED,
63 };
64
65 /**
66 * @ingroup Payload
67 * @return The total mass of the payload (attached to the tool output flange
68 * of the robot)
69 */
70 double getMass() const;
71
72 /**
73 * Gets the payload's center of gravity (CoG), also referred to as center of
74 * mass. It is defined as the offset between the center of the tool output
75 * flange and the center of gravity of the attached payload.
76 *
77 * @return The center of gravity (CoG) of the payload relative to the center
78 * of the tool output flange
79 */
80 std::vector<double> getCenterOfGravity() const;
81
82 /**
83 * @ingroup Payload
84 * <p>
85 * Gets the inertia matrix of the payload. The inertia matrix is defined in
86 * a coordinate system with center at the payload's center of gravity (CoG)
87 * and the axes aligned with the tool output flange coordinate system
88 * (axes).
89 * </p>
90 *
91 * <b>Note:</b> The inertia matrix specified by the end user can be invalid.
92 * The {@link #isUsable} method can be used determine, if the payload can be
93 * used (i.e., has a valid inertia matrix).
94 *
95 * @return The inertia matrix of the payload
96 */
97 std::vector<double> getInertiaMatrix() const;
98
99 /**
100 * @ingroup Payload
101 * <p>
102 * Gets the name of the payload displayed in the AuboScope UI.
103 * </p>
104 *
105 * <b>Note:</b> The payload can change name at any time, and thus the name
106 * must not be used to uniquely identify a specific payload. The payload
107 * name can change in the following situations: <ul> <li> The payload is
108 * renamed by the end user </li> <li> The name gets translated (depending on
109 * the selected language in AuboScope) </li> <li> The name is changed
110 * between versions of the AuboCap that added the payload</li>
111 * </ul>
112 *
113 * @return The name of the payload displayed in AuboScope
114 */
115 std::string getDisplayName() const;
116
117 /**
118 * @ingroup Payload
119 * <p>
120 * A payload cannot be guaranteed to be present in AuboScope. This method
121 * can be used to determine, if the payload is present.
122 * </p>
123 *
124 * <p>
125 * The payload will not be present, if the end user loads a different
126 * installation which does not contain the payload, or if the payload is
127 * removed by the end user or the AuboCap that added the payload.
128 * </p>
129 *
130 * <b>Note:</b> Storing an undefined payload in a program node
131 * contribution's (a {@link ProgramNodeContribution} instance) data model
132 * ({@link DataModel} interface) will automatically make the program node
133 * (and the program) undefined.
134 *
135 * @return <code>true</code> if this payload is present in AuboScope,
136 * otherwise <code>false</code>.
137 */
138 bool isResolvable();
139
140 /**
141 * @ingroup Payload
142 * <p>
143 * Use this method to determine if the payload can be used. An unresolvable
144 * payload (see the {@link #isResolvable} method) will always be unusable.
145 * </p>
146 *
147 * <p>
148 * A payload can have an invalid inertia matrix, where all the individual
149 * values of the matrix are within the valid range, but the combination of
150 * values is invalid.
151 * </p>
152 *
153 * <b>Note:</b> Storing an unusable payload in a program node contribution's
154 * (a {@link ProgramNodeContribution} instance) data model ({@link
155 * DataModel} interface) will automatically make the program node (and the
156 * program) undefined.
157 *
158 * @return <code>true</code>, if the payload is usable, otherwise
159 * <code>false</code>. <code>false</code> will always be returned when the
160 * payload is unresolvable (see the {@link #isResolvable} method).
161 */
162 bool isUsable();
163
164 /**
165 * @ingroup Payload
166 * <p>
167 * Use this method to check if the parameters of this payload have any
168 * warnings.
169 * </p>
170 *
171 * <p>
172 * A payload can be usable, but may have a value for a payload parameter or
173 * may have a combination of (some of the) payload parameters, that could
174 * affect performance of the robot, if the payload is used (i.e., if the
175 * parameters are applied).
176 * </p>
177 *
178 * An unresolvable payload (see {@link #isResolvable()}) will have no
179 * warning for its parameters (i.e.
180 * {@link ParametersWarning#NO_WARNING} is returned).
181 *
182 * @return The warning (if any) for the parameters of this payload.
183 */
184 ParametersWarning getParametersWarning();
185
186 size_t hashCode();
187
188 private:
189 friend class DataSwitch;
190 Payload();
191 void *d_{ nullptr };
192 };
193 } // namespace aubo_scope
194 } // namespace arcs
195
196 #endif // AUBO_SCOPE_PAYLOAD_H
class_forward.h
ARCS_ABI_EXPORT
#define ARCS_ABI_EXPORT
Definition: class_forward.h:16
arcs::aubo_scope::Payload
Definition: payload.h:17
arcs::aubo_scope::Payload::~Payload
~Payload()
arcs::aubo_scope::Payload::ParametersWarning
ParametersWarning
Definition: payload.h:35
arcs::aubo_scope::Payload::RATED_MASS_EXCEEDED
@ RATED_MASS_EXCEEDED
The mass of the payload exceeds the rated maximum supported payload mass of the robot.
Definition: payload.h:56
arcs::aubo_scope::Payload::MASS_0KG
@ MASS_0KG
The payload has a mass of 0 kg which is most likely not intended/valid.
Definition: payload.h:49
arcs::aubo_scope::Payload::MASS_AND_CENTER_OF_GRAVITY_EXCEEDED
@ MASS_AND_CENTER_OF_GRAVITY_EXCEEDED
The combination of the mass and the center of gravity of could affect the performance of the robot,...
Definition: payload.h:62
arcs::aubo_scope::Payload::NO_WARNING
@ NO_WARNING
None of the parameters of the payload or the combination of payload parameters has any warnings.
Definition: payload.h:41
arcs::aubo_scope::Payload::getCenterOfGravity
std::vector< double > getCenterOfGravity() const
Gets the payload's center of gravity (CoG), also referred to as center of mass.
arcs::aubo_scope::Payload::Payload
Payload()
arcs::aubo_scope::Payload::Payload
Payload(Payload &f)
arcs::aubo_scope::Payload::Payload
Payload(Payload &&f)
arcs::aubo_scope::Payload::hashCode
size_t hashCode()
arcs::aubo_scope::Payload::isUsable
bool isUsable()
arcs::aubo_scope::Payload::getDisplayName
std::string getDisplayName() const
arcs::aubo_scope::Payload::getInertiaMatrix
std::vector< double > getInertiaMatrix() const
arcs::aubo_scope::Payload::getParametersWarning
ParametersWarning getParametersWarning()
arcs::aubo_scope::Payload::getMass
double getMass() const
arcs::aubo_scope::Payload::isResolvable
bool isResolvable()
arcs::aubo_scope::ARCS_CLASS_FORWARD
ARCS_CLASS_FORWARD(GripForceCapability)
arcs
Definition: contribution_provider.h:7