Skip to content

Commit

Permalink
Add documentation about Instruction Executor
Browse files Browse the repository at this point in the history
  • Loading branch information
urfeex committed Jan 10, 2025
1 parent 659ddeb commit af71e80
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ well as a couple of standalone modules to directly use subsets of the library's
architecture/script_sender
architecture/trajectory_point_interface
architecture/ur_driver
architecture/instruction_executor


Dataflow overview with UrDriver
Expand Down
23 changes: 23 additions & 0 deletions doc/architecture/instruction_executor.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Instruction Executor
====================

The Instruction Executor is a convenience wrapper to make common robot instructions such as point
to point motions easily accessible. Currently, it supports the following instructions:

* Excecute MoveJ point to point motions
* Execute MoveL point to point motions
* Execute sequences consisting of MoveJ and MoveL instructions

The Instruction Executor uses the :ref:`trajectory_point_interface` and the
:ref:`reverse_interface`
for sending motion instructions to the robot. Hence, it requires a :ref:`ur_driver` object.

As a minimal working example, please see ``examples/instruction_executor.cpp`` example:

.. literalinclude:: ../../examples/instruction_executor.cpp
:language: c++
:caption: examples/instruction_executor.cpp
:linenos:
:lineno-match:
:start-at: g_my_driver.reset
:end-at: g_my_driver->stopControl();
4 changes: 2 additions & 2 deletions examples/instruction_executor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ int main(int argc, char* argv[])
std::make_shared<urcl::control::MoveLPrimitive>(urcl::Pose{ -0.203, 0.463, 0.559, 0.68, -1.083, -2.076 }, 0.1,
std::chrono::seconds(2)),
};
instruction_executor->executeMotion(motion_sequence); // That could also receive velocity parametrization
instruction_executor->executeMotion(motion_sequence);

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

g_my_driver->stopControl();
return 0;
}
}

0 comments on commit af71e80

Please sign in to comment.