|
| 1 | +.. _ur_driver: |
| 2 | + |
| 3 | +UrDriver |
| 4 | +======== |
| 5 | + |
| 6 | +The ``UrDriver`` class is the core of this library. It creates an interface to the robot containing |
| 7 | +all components from this library. |
| 8 | + |
| 9 | +When creating an instance of the ``UrDriver`` class, the created object will contain |
| 10 | + |
| 11 | +- a :ref:`DashboardClient <dashboard_client>` |
| 12 | +- a :ref:`ReverseInterface <reverse_interface>` |
| 13 | +- an :ref:`RTDEClient <rtde_client>` |
| 14 | +- a :ref:`ScriptCommandInterface <script_command_interface>` |
| 15 | +- a :ref:`ScriptSender <script_sender>` |
| 16 | +- a :ref:`TrajectoryPointInterface <trajectory_point_interface>`. |
| 17 | +- a rudimentary client to the robot's secondary interface |
| 18 | +- a couple of helper functions |
| 19 | + |
| 20 | +As this page is not meant to be a full-blown API documentation, not every public method will be |
| 21 | +explained here. For a full list of public methods, please inspect class definition in the |
| 22 | +`ur_client_library/ur/ur_driver.h |
| 23 | +<https://github.com/UniversalRobots/Universal_Robots_Client_Library/blob/master/include/ur_client_library/ur/ur_driver.h>`_ |
| 24 | +header file. |
| 25 | + |
| 26 | +Many functions from the individual components are directly wrapped in the ``UrDriver`` class, for |
| 27 | +example there is ``UrDriver::startForceMode(...)`` which is a wrapper around the |
| 28 | +``ScriptCommandInterface::startForceMode(...)`` function. |
| 29 | + |
| 30 | +As an example on how to use this class, please see the `full_driver.cpp <https://github.com/UniversalRobots/Universal_Robots_Client_Library/blob/master/examples/full_driver.cpp>`_ example. |
| 31 | + |
| 32 | +Public helper functions |
| 33 | +----------------------- |
| 34 | + |
| 35 | +``checkCalibration(const std::string checksum)`` |
| 36 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 37 | + |
| 38 | +This function opens a connection to the primary interface where it will receive a calibration |
| 39 | +information as the first message. The checksum from this calibration info is compared to the one |
| 40 | +given to this function. Connection to the primary interface is dropped afterwards. |
| 41 | + |
| 42 | +``sendScript(const std::string& program)`` |
| 43 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + |
| 45 | +This function sends given URScript code directly to the secondary interface. The |
| 46 | +``sendRobotProgram()`` function is a special case that will send the script code given in the |
| 47 | +``RTDEClient`` constructor. |
| 48 | + |
| 49 | + |
| 50 | + |
0 commit comments