Skip to content

Commit af71e80

Browse files
committed
Add documentation about Instruction Executor
1 parent 659ddeb commit af71e80

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

doc/architecture.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ well as a couple of standalone modules to directly use subsets of the library's
1414
architecture/script_sender
1515
architecture/trajectory_point_interface
1616
architecture/ur_driver
17+
architecture/instruction_executor
1718

1819

1920
Dataflow overview with UrDriver
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Instruction Executor
2+
====================
3+
4+
The Instruction Executor is a convenience wrapper to make common robot instructions such as point
5+
to point motions easily accessible. Currently, it supports the following instructions:
6+
7+
* Excecute MoveJ point to point motions
8+
* Execute MoveL point to point motions
9+
* Execute sequences consisting of MoveJ and MoveL instructions
10+
11+
The Instruction Executor uses the :ref:`trajectory_point_interface` and the
12+
:ref:`reverse_interface`
13+
for sending motion instructions to the robot. Hence, it requires a :ref:`ur_driver` object.
14+
15+
As a minimal working example, please see ``examples/instruction_executor.cpp`` example:
16+
17+
.. literalinclude:: ../../examples/instruction_executor.cpp
18+
:language: c++
19+
:caption: examples/instruction_executor.cpp
20+
:linenos:
21+
:lineno-match:
22+
:start-at: g_my_driver.reset
23+
:end-at: g_my_driver->stopControl();

examples/instruction_executor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ int main(int argc, char* argv[])
123123
std::make_shared<urcl::control::MoveLPrimitive>(urcl::Pose{ -0.203, 0.463, 0.559, 0.68, -1.083, -2.076 }, 0.1,
124124
std::chrono::seconds(2)),
125125
};
126-
instruction_executor->executeMotion(motion_sequence); // That could also receive velocity parametrization
126+
instruction_executor->executeMotion(motion_sequence);
127127

128128
instruction_executor->moveJ({ -1.57, -1.57, 0, 0, 0, 0 });
129129
instruction_executor->moveJ({ -1.57, -1.6, 1.6, -0.7, 0.7, 0.2 });
@@ -132,4 +132,4 @@ int main(int argc, char* argv[])
132132

133133
g_my_driver->stopControl();
134134
return 0;
135-
}
135+
}

0 commit comments

Comments
 (0)