AuboStudio SDK  0.6.3
waypoint_model.h
浏览该文件的文档.
1#ifndef AUBO_SCOPE_WAYPOINT_MODEL_H
2#define AUBO_SCOPE_WAYPOINT_MODEL_H
3
4#include <vector>
6
7namespace arcs {
8namespace aubo_scope {
10
11/**
12 * @ingroup ProgramApi
13 * Provides methods that returns Waypoints from the current robot installation.
14 */
16{
17public:
21
22 /**
23 * @ingroup WaypointModel
24 * @return the geometric Waypoints of the current installation
25 */
26 /**
27 * @param clazz the sort of geometric Waypoint of interest, e.g.
28 * <code>WaypointPoint.class</code>,
29 * <code>WaypointLine.class</code>,
30 * <code>WaypointPlane.class</code>
31 * @param <T> The Waypoint type
32 * @return the collection of the corresponding Waypoints
33 */
34 std::vector<WaypointPtr> getWaypoints();
35
36 /**
37 * @ingroup WaypointModel
38 * @brief getByName
39 * @param name
40 * @return
41 */
42 WaypointPtr getByName(const std::string &name);
43
44 /**
45 * @ingroup WaypointModel
46 * Add a Waypoint to the current AuboScope installation. This makes it
47 * selectable by the end user. The Waypoint is not modifiable by the end
48 * user.
49 *
50 * @param idKey The key to identify this Waypoint by. The key is for this
51 * AuboCap only, i.e. it only has to be unique for this AuboCap and not
52 * "globally" for other aubo_studio plugins.
53 * @param suggestedName Suggested name for the Waypoint. Valid names must
54 * match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The
55 * final name can be retrieved from the returned Waypoint instance.
56 * @param pose The pose of the Waypoint with respect to the robot base
57 * @return The Waypoint created and registered in AuboScope.
58 * @throws WaypointAlreadyAddedException If a Waypoint has previously been
59 * added the same <code>idKey</code> identifier. Use {@link
60 * #getWaypoint(String)} to check if the Waypoint has already been added to
61 * the current installation. Use {@link #updateWaypoint(String, Pose)} to
62 * update the Waypoint.
63 * @throws IllegalWaypointNameException If the suggested name does not match
64 * required regex.
65 */
66 WaypointPtr addWaypoint(const std::string &suggestedName,
67 const std::vector<double> &pose);
68 /**
69 * @ingroup WaypointModel
70 * @brief addWaypoint
71 * @param suggestedName Suggested name for the Waypoint. Valid names must
72 * match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The
73 * final name can be retrieved from the returned Waypoint instance.
74 * @param pose The pose of the Waypoint with respect to the robot base
75 * @param joint The joint of the Waypoint with respect to the robot base
76 * @param offset The tcp of the Waypoint with respect to the robot base
77 * @return The Waypoint created and registered in AuboScope.
78 * @throws WaypointAlreadyAddedException If a Waypoint has previously been
79 * added the same <code>idKey</code> identifier. Use {@link
80 * #getWaypoint(String)} to check if the Waypoint has already been added to
81 * the current installation. Use {@link #updateWaypoint(String, Pose)} to
82 * update the Waypoint.
83 * @throws IllegalWaypointNameException If the suggested name does not match
84 * required regex.
85 */
86 WaypointPtr addWaypoint(const std::string &suggestedName,
87 const std::vector<double> &pose,
88 const std::vector<double> &joint,
89 const std::vector<double> &offset);
90 /**
91 * @ingroup WaypointModel
92 * Remove a Waypoint added by this AuboCap from AuboScope. Program nodes
93 * using the Waypoint will be become undefined because the Waypoint is no
94 * longer resolvable.
95 *
96 * @param idKey The key used to add the Waypoint with.
97 * @throws WaypointNotFoundException If no Waypoint exists with the provided
98 * <code>idKey</code>.
99 */
100 void removeWaypoint(const std::string &name);
101
102 /**
103 * @ingroup WaypointModel
104 * Rename the waypoint in the model by the name
105 * @param name
106 * @param newName
107 */
108 void renameWaypoint(const std::string &name, const std::string &newName);
109
110private:
111 friend class DataSwitch;
113 void *d_{ nullptr };
114};
115
116} // namespace aubo_scope
117} // namespace arcs
118
119#endif // AUBO_SCOPE_WAYPOINT_MODEL_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...
Provides methods that returns Waypoints from the current robot installation.
WaypointPtr addWaypoint(const std::string &suggestedName, const std::vector< double > &pose)
Add a Waypoint to the current AuboScope installation.
std::vector< WaypointPtr > getWaypoints()
WaypointPtr addWaypoint(const std::string &suggestedName, const std::vector< double > &pose, const std::vector< double > &joint, const std::vector< double > &offset)
addWaypoint
void renameWaypoint(const std::string &name, const std::string &newName)
Rename the waypoint in the model by the name
WaypointModel(WaypointModel &f)
WaypointModel(WaypointModel &&f)
void removeWaypoint(const std::string &name)
Remove a Waypoint added by this AuboCap from AuboScope.
WaypointPtr getByName(const std::string &name)
getByName