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