AuboStudio SDK  0.6.3
payload.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_PAYLOAD_H
2#define AUBO_SCOPE_PAYLOAD_H
3
4#include <vector>
6
7namespace arcs {
8namespace aubo_scope {
10
11/**
12 * @ingroup InstallationApi
13 * \~chinese 获取负载参数API接口
14 * \~english API interface for payload parameters
15 */
17{
18public:
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 */
35 {
36
37 /**
38 * None of the parameters of the payload or the combination of payload
39 * parameters has any warnings.
40 */
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 */
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 */
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 */
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 */
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 */
185
186 size_t hashCode();
187
188private:
189 friend class DataSwitch;
191 void *d_{ nullptr };
192};
193} // namespace aubo_scope
194} // namespace arcs
195
196#endif // AUBO_SCOPE_PAYLOAD_H
#define ARCS_ABI_EXPORT
#define ARCS_CLASS_FORWARD(C)
Macro that forward declares a class and defines the respective smartpointers through ARCS_DECLARE_PTR...
获取负载参数API接口
std::vector< double > getInertiaMatrix() const
@ RATED_MASS_EXCEEDED
The mass of the payload exceeds the rated maximum supported payload mass of the robot.
@ MASS_0KG
The payload has a mass of 0 kg which is most likely not intended/valid.
@ MASS_AND_CENTER_OF_GRAVITY_EXCEEDED
The combination of the mass and the center of gravity of could affect the performance of the robot,...
@ NO_WARNING
None of the parameters of the payload or the combination of payload parameters has any warnings.
std::string getDisplayName() const
ParametersWarning getParametersWarning()
std::vector< double > getCenterOfGravity() const
Gets the payload's center of gravity (CoG), also referred to as center of mass.