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 * \chinese
14 * 路点模型
15 * 提供从当前机器人获取路点的方法。
16 * \endchinese
17 * \english
18 * WaypointModel
19 * Provides methods that returns Waypoints from the current robot installation.
20 * \endenglish
21 */
23{
24public:
28
29 /**
30 * @ingroup WaypointModel
31 * \chinese
32 * 获取当前安装中的几何路点
33 * @return 当前安装中的几何路点集合。
34 * \endchinese
35 * \english
36 * Returns the geometric Waypoints of the current installation.
37 * @return the geometric Waypoints of the current installation.
38 * \endenglish
39 */
40 std::vector<WaypointPtr> getWaypoints();
41
42 /**
43 * @ingroup WaypointModel
44 * \chinese
45 * 根据名称获取路点
46 * @param name 路点名称。
47 * @return 对应名称的路点。
48 * \endchinese
49 * \english
50 * Returns the Waypoint by name.
51 * @param name the name of the Waypoint.
52 * @return the Waypoint with the given name.
53 * \endenglish
54 */
55 WaypointPtr getByName(const std::string &name);
56
57 /**
58 * @ingroup WaypointModel
59 * \chinese
60 * 向当前AuboScope安装中添加一个路点。添加后终端用户可选择该路点,但不可修改。
61 *
62 * @param suggestedName 建议的路点名称。有效名称必须匹配正则表达式
63 * [a-zA-Z][a-zA-Z0-9_]{0,14},总共15个字符。最终名称可从返回的Waypoint实例获取。
64 * @param pose 路点相对于机器人基座的位姿。
65 * @return 在AuboScope中创建并注册的路点。
66 * @throws WaypointAlreadyAddedException 如果之前已用相同的<code>idKey</code>标
67 * 识符添加过路点。使用{@link #getWaypoint(String)}检查路点是否已添加到当前安装中。
68 * 使用{@link #updateWaypoint(String, Pose)}来更新路点。
69 * @throws IllegalWaypointNameException 如果建议的名称不匹配所需的正则表达式。
70 * \endchinese
71 * \english
72 * Add a Waypoint to the current AuboScope installation. This makes it
73 * selectable by the end user. The Waypoint is not modifiable by the end
74 * user.
75 *
76 * @param suggestedName Suggested name for the Waypoint. Valid names must
77 * match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The
78 * final name can be retrieved from the returned Waypoint instance.
79 * @param pose The pose of the Waypoint with respect to the robot base.
80 * @return The Waypoint created and registered in AuboScope.
81 * @throws WaypointAlreadyAddedException If a Waypoint has previously been
82 * added the same <code>idKey</code> identifier. Use {@link
83 * #getWaypoint(String)} to check if the Waypoint has already been added to
84 * the current installation. Use {@link #updateWaypoint(String, Pose)} to
85 * update the Waypoint.
86 * @throws IllegalWaypointNameException If the suggested name does not match
87 * required regex.
88 * \endenglish
89 */
90 WaypointPtr addWaypoint(const std::string &suggestedName,
91 const std::vector<double> &pose);
92 /**
93 * @ingroup WaypointModel
94 * \chinese
95 * 向当前AuboScope安装中添加一个包含关节角度和偏移的路点。
96 *
97 * @param suggestedName 建议的路点名称。有效名称必须匹配正则表达式
98 * [a-zA-Z][a-zA-Z0-9_]{0,14},总共15个字符。最终名称可从返回的Waypoint实例获取。
99 * @param pose 路点相对于机器人基座的位姿。
100 * @param joint 路点相对于机器人基座的关节角度。
101 * @param offset 路点相对于机器人基座的TCP偏移。
102 * @return 在AuboScope中创建并注册的路点。
103 * @throws WaypointAlreadyAddedException 如果之前已用相同的<code>idKey</code>标
104 * 识符添加过路点。
105 * @throws IllegalWaypointNameException 如果建议的名称不匹配所需的正则表达式。
106 * \endchinese
107 * \english
108 * Add a Waypoint to the current AuboScope installation with joint angles
109 * and offset.
110 *
111 * @param suggestedName Suggested name for the Waypoint. Valid names must
112 * match regex [a-zA-Z][a-zA-Z0-9_]{0,14} for a total of 15 characters. The
113 * final name can be retrieved from the returned Waypoint instance.
114 * @param pose The pose of the Waypoint with respect to the robot base.
115 * @param joint The joint of the Waypoint with respect to the robot base.
116 * @param offset The tcp of the Waypoint with respect to the robot base.
117 * @return The Waypoint created and registered in AuboScope.
118 * @throws WaypointAlreadyAddedException If a Waypoint has previously been
119 * added the same <code>idKey</code> identifier. Use {@link
120 * #getWaypoint(String)} to check if the Waypoint has already been added to
121 * the current installation. Use {@link #updateWaypoint(String, Pose)} to
122 * update the Waypoint.
123 * @throws IllegalWaypointNameException If the suggested name does not match
124 * required regex.
125 * \endenglish
126 */
127 WaypointPtr addWaypoint(const std::string &suggestedName,
128 const std::vector<double> &pose,
129 const std::vector<double> &joint,
130 const std::vector<double> &offset);
131 /**
132 * @ingroup WaypointModel
133 * \chinese
134 * 从此AuboCap中移除已添加的路点。使用该路点的程序节点将变为未定义状态,因为路点
135 * 不再可解析。
136 *
137 * @param name 添加路点时使用的名称。
138 * @throws WaypointNotFoundException 如果没有与提供的<code>idKey</code>对应
139 * 的路点存在。
140 * \endchinese
141 * \english
142 * Remove a Waypoint added by this AuboCap from AuboScope. Program nodes
143 * using the Waypoint will be become undefined because the Waypoint is no
144 * longer resolvable.
145 *
146 * @param name The key used to add the Waypoint with.
147 * @throws WaypointNotFoundException If no Waypoint exists with the provided
148 * <code>idKey</code>.
149 * \endenglish
150 */
151 void removeWaypoint(const std::string &name);
152
153 /**
154 * @ingroup WaypointModel
155 * \chinese
156 * 根据名称重命名模型中的路点
157 * @param name 原始名称。
158 * @param newName 新名称。
159 * \endchinese
160 * \english
161 * Rename the waypoint in the model by the name.
162 * @param name the original name.
163 * @param newName the new name.
164 * \endenglish
165 */
166 void renameWaypoint(const std::string &name, const std::string &newName);
167
168private:
169 friend class DataSwitch;
171 void *d_{ nullptr };
172};
173
174} // namespace aubo_scope
175} // namespace arcs
176
177#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...
\chinese 路点模型 提供从当前机器人获取路点的方法。 \endchinese \english WaypointModel Provides methods that returns Waypo...
WaypointPtr addWaypoint(const std::string &suggestedName, const std::vector< double > &pose)
\chinese 向当前AuboScope安装中添加一个路点。添加后终端用户可选择该路点,但不可修改。
std::vector< WaypointPtr > getWaypoints()
\chinese 获取当前安装中的几何路点
WaypointPtr addWaypoint(const std::string &suggestedName, const std::vector< double > &pose, const std::vector< double > &joint, const std::vector< double > &offset)
\chinese 向当前AuboScope安装中添加一个包含关节角度和偏移的路点。
void renameWaypoint(const std::string &name, const std::string &newName)
\chinese 根据名称重命名模型中的路点
WaypointModel(WaypointModel &f)
WaypointModel(WaypointModel &&f)
void removeWaypoint(const std::string &name)
\chinese 从此AuboCap中移除已添加的路点。使用该路点的程序节点将变为未定义状态,因为路点 不再可解析。
WaypointPtr getByName(const std::string &name)
\chinese 根据名称获取路点