# Chapter 1: Getting Started with UR Robot Control ## About This Chapter This chapter explains the fundamentals required to control Universal Robots (UR) from Python. It is intended for: - People using a UR robot for the first time - People who want to control a UR robot from Python - People using `ur_ctrl.py` described in this documentation By the end of this chapter, readers should understand: - UR communication interfaces - The meaning of Remote Control - Python libraries - How to verify an initial connection --- # 1.1 What Is Universal Robots? Universal Robots (UR) is a major manufacturer of collaborative robots. Representative models include: | Model | Payload | |---|---:| | UR3 / UR3e | 3 kg | | UR5 / UR5e | 5 kg | | UR10 / UR10e | 10 kg | | UR16e | 16 kg | | UR20 | 20 kg | | UR30 | 30 kg | This documentation primarily addresses the UR3 / UR3e, but many of the Python APIs introduced here are common to other models. --- # 1.2 CB Series and e-Series UR robots have two major generations. ## CB Series - UR3 - UR5 - UR10 These models use an older controller running PolyScope 3.x. --- ## e-Series - UR3e - UR5e - UR10e - UR16e These models use PolyScope 5.x. Many capabilities were added, including an integrated force sensor. --- # 1.3 Ways to Control a UR Robot from Python In Universal Robots systems, **URControl** in the Control Box is the core of robot control. **PolyScope** on the teach pendant (TP) provides the operating, teaching, and programming environment. Robot programs created in PolyScope execute on URControl as **URScript**. URScript can also be sent directly from an external PC. Several official interfaces are available for communication with an external PC. | Interface | Primary role | |---|---| | RTDE | Bidirectional exchange of controller state, I/O, general-purpose registers, and other data | | Primary / Secondary Interface | Retrieval of controller information, transmission of URScript, etc. | | Dashboard Server | Operational management, including power, Brake Release, and program execution | | ROS / ROS2 Driver | Integration with ROS / ROS2 | In addition to these official interfaces, the implementation described here uses **SDU Robotics' `ur_rtde`**. --- # 1.4 What Is the Official RTDE Interface? RTDE stands for **Real-Time Data Exchange**. It is an official bidirectional data interface provided by Universal Robots for communication between external applications and the UR controller. RTDE can read joint and TCP states, robot mode, safety information, I/O, general-purpose registers, and other data. It can also write to exposed I/O, the speed slider, general-purpose input registers, and other writable fields. However, the official RTDE protocol does not itself define URScript motion commands such as `movej` or `movel`. The official RTDE protocol must be distinguished from SDU Robotics' `ur_rtde`, described in the next section. --- # 1.5 SDU Robotics' `ur_rtde` The library used in this documentation, ```text ur_rtde ``` is **a third-party open-source library developed by SDU Robotics**, not an official Universal Robots SDK. `ur_rtde` uses the official Universal Robots RTDE interface and primarily provides: - `RTDEControlInterface` - `RTDEReceiveInterface` - `RTDEIOInterface` Among these, `RTDEControlInterface` combines the official RTDE interface with a dedicated control URScript running on the robot to provide PC-side motion APIs such as `moveJ`, `moveL`, and `servoJ`. Example installation: ```bash pip install ur_rtde ``` Details are covered in subsequent chapters. --- # 1.6 Difference from Dashboard Server Dashboard Server is an official Universal Robots management interface and is separate from SDU Robotics' `ur_rtde`. It handles robot operation management, including loading, playing, and stopping programs; power management; Brake Release; and recovery from Protective Stop. This implementation uses SDU Robotics' `ur_rtde` for motion control, state acquisition, and I/O, together with Dashboard Server when operational management is required. --- # 1.7 Architecture Used in This Documentation ```text Python │ │ ur_ctrl.py │ ├──────── RTDEControl ├──────── RTDEReceive ├──────── RTDEIO └──────── Dashboard │ Ethernet │ UR Robot ``` Users generally only need to interact with `ur_ctrl.py`. `ur_ctrl.py` manages the low-level APIs internally. --- # Next Chapter The next chapter covers: - PC configuration - IP addresses - Remote Control - Communication verification