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