We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 62fdb1a commit cf2a8f6Copy full SHA for cf2a8f6
doc/architecture/instruction_executor.rst
@@ -6,9 +6,11 @@ Instruction Executor
6
The Instruction Executor is a convenience wrapper to make common robot instructions such as point
7
to point motions easily accessible. Currently, it supports the following instructions:
8
9
-* Excecute MoveJ point to point motions
+* Execute MoveJ point to point motions
10
* Execute MoveL point to point motions
11
-* Execute sequences consisting of MoveJ and MoveL instructions
+* Execute MoveP point to point motions
12
+* Execute MoveC circular motions
13
+* Execute sequences consisting of the motion primitives above
14
15
The Instruction Executor uses the :ref:`trajectory_point_interface` and the
16
:ref:`reverse_interface`
doc/architecture/trajectory_point_interface.rst
@@ -39,13 +39,32 @@ representations in 21 datafields. The data fields have the following meaning:
39
===== =====
40
index meaning
41
42
- 0-5 trajectory point positions (floating point)
43
- 6-11 trajectory point velocities (floating point)
44
- 12-17 trajectory point accelerations (floating point)
45
- 18 trajectory point type (0: MOVEJ, 1: MOVEL, 51: SPLINE)
46
- 19 trajectory point time (in seconds, floating point)
+ 0-5 trajectory point positions (Multiplied by ``MULT_JOINTSTATE``)
+ 6-11 trajectory point velocities (Multiplied by ``MULT_JOINTSTATE``). For MOVEC, this contains the "via pose".
+ 12-17 trajectory point accelerations (Multiplied by ``MULT_JOINTSTATE``).
+
+ For MOVEC:
47
48
+ - 12: velocity (Multiplied by ``MULT_JOINTSTATE``)
49
+ - 13: acceleration (Multiplied by ``MULT_JOINTSTATE``)
50
+ - 14: mode
51
52
+ 18 trajectory point type
53
54
+ - 0: MOVEJ
55
+ - 1: MOVEL
56
+ - 2: MOVEP
57
+ - 3: MOVEC
58
+ - 51: SPLINE)
59
60
+ 19 trajectory point time (in seconds, multiplied by ``MULT_TIME``)
61
20 depending on trajectory point type
62
- - MOVEJ, MOVEL: point blend radius (in meters, floating point)
63
+ - MOVEJ, MOVEL: point blend radius (in meters, multiplied by ``MULT_TIME``)
64
- SPLINE: spline type (1: CUBIC, 2: QUINTIC)
65
66
67
+where
68
69
+- ``MULT_JOINTSTATE``: 1000000
70
+- ``MULT_TIME``: 1000
doc/examples/instruction_executor.rst
@@ -44,10 +44,12 @@ To run a sequence of motions, create an
:end-at: instruction_executor->executeMotion(motion_sequence);
Each element in the motion sequence can be a different motion type. In the example, there are two
-``MoveJ`` motions and two ``MoveL`` motion. The primitives' parameters are directly forwarded to
+``MoveJ`` motions, a ``MoveL`` motion and a ``MoveP`` motion. The primitives' parameters are directly forwarded to
the underlying script functions, so the parameter descriptions for them apply, as well.
Particularly, you may want to choose between either a time-based execution speed or an acceleration
-/ velocity parametrization. The latter will be ignored if a time > 0 is given.
+/ velocity parametrization for some move functions. The latter will be ignored if a time > 0 is given.
+Please refer to the script manual for details.
Execute a single motion
-----------------------
examples/instruction_executor.cpp
@@ -89,8 +89,8 @@ int main(int argc, char* argv[])
89
90
std::make_shared<urcl::control::MoveLPrimitive>(urcl::Pose(-0.203, 0.263, 0.559, 0.68, -1.083, -2.076), 0.1,
91
std::chrono::seconds(2)),
92
- std::make_shared<urcl::control::MoveLPrimitive>(urcl::Pose{ -0.203, 0.463, 0.559, 0.68, -1.083, -2.076 }, 0.1,
93
- std::chrono::seconds(2)),
+ std::make_shared<urcl::control::MovePPrimitive>(urcl::Pose{ -0.203, 0.463, 0.559, 0.68, -1.083, -2.076 }, 0.1, 0.4,
+ 0.4),
94
};
95
instruction_executor->executeMotion(motion_sequence);
96
@@ -105,6 +105,8 @@ int main(int argc, char* argv[])
105
// goal time parametrization -- acceleration and velocity will be ignored
106
instruction_executor->moveL({ -0.203, 0.463, 0.559, 0.68, -1.083, -2.076 }, 0.1, 0.1, goal_time_sec);
107
108
+ instruction_executor->moveP({ -0.203, 0.263, 0.559, 0.68, -1.083, -2.076 }, 1.5, 1.5);
109
110
g_my_robot->ur_driver_->stopControl();
111
return 0;
112
}
include/ur_client_library/ur/instruction_executor.h
@@ -108,11 +108,27 @@ class InstructionExecutor
* \param acceleration Tool acceleration [m/s^2]
* \param velocity Tool speed [m/s]
* \param blend_radius The blend radius to use for the motion.
+ *
* \return True if the robot has reached the target, false otherwise.
113
*/
114
bool moveP(const urcl::Pose& target, const double acceleration = 1.4, const double velocity = 1.04,
115
const double blend_radius = 0.0);
116
117
+ /**
118
+ * \brief Move the robot to a pose target using movec
119
120
+ * This function will move the robot to the given pose target in a circular motion going through via. The robot will
121
+ * move with the given acceleration and velocity. The function will return once the robot has reached the target.
122
123
+ * \param via The circle will be defined by the current pose (the end pose of the previous motion), the target and the
124
+ * via point.
125
+ * \param target The pose target to move to.
126
+ * \param acceleration Tool acceleration [m/s^2]
127
+ * \param velocity Tool speed [m/s]
128
+ * \param blend_radius The blend radius to use for the motion.
129
130
+ * \return True if the robot has reached the target, false otherwise.
131
+ */
132
bool moveC(const urcl::Pose& via, const urcl::Pose& target, const double acceleration = 1.4,
133
const double velocity = 1.04, const double blend_radius = 0.0, const int32_t mode = 0);
134
0 commit comments