# Chapter 13: Freedrive Mode ## About This Chapter Freedrive Mode uses servo motor torque control to allow a person to move the robot arm directly by hand. It is one of the most frequently used functions in teaching operations, including: - Creating taught points - Position alignment - Trial operation - Maintenance This chapter explains: - How Freedrive works - Its relationship with the Teach Pendant - The Python API - Differences between the CB series and e-Series --- # 13.1 What Is Freedrive? Normally, a UR robot operates as follows: ``` Motor ↓ Position control ↓ Position holding ``` As a result, the robot hardly moves even when pushed by a person. In Freedrive, the control mode switches to: ``` Motor ↓ Gravity compensation ↓ Following external forces ``` This allows a person to move the robot with a small amount of force. --- # 13.2 Relationship to Teaching Freedrive is, in effect, teaching itself. A typical sequence is: ``` Start Freedrive ↓ Move the robot by hand ↓ Reach the desired position ↓ Read the current position ↓ Save the taught point ``` --- # 13.3 Freedrive on the Teach Pendant On the Teach Pendant, Freedrive can be started using the Freedrive button or the Freedrive function on the screen. Once started, the robot can be moved directly by hand. When Freedrive ends, the robot returns to normal control. --- # 13.4 Starting Freedrive from Python With `ur_rtde`, use: ```python rtde_c.teachMode() ``` Or, depending on the version: ```python rtde_c.freedriveMode() ``` Internally, this switches the controller to the Freedrive state. --- # 13.5 Ending Freedrive To end Freedrive, use: ```python rtde_c.endTeachMode() ``` Or: ```python rtde_c.endFreedriveMode() ``` Afterward, normal control using commands such as `moveJ` and `moveL` becomes available again. --- # 13.6 Reading the Current Position Even during Freedrive, the following methods can be used: ```python pose = rtde_r.getActualTCPPose() ``` ```python q = rtde_r.getActualQ() ``` This makes it possible to teach positions through the following sequence: ``` Move the robot by hand ↓ Read the current position ↓ Save it ``` --- # 13.7 Example Teaching Program ``` teachMode() ↓ User moves the robot by hand ↓ Enter key ↓ getActualTCPPose() ↓ Save to CSV ↓ endTeachMode() ``` A teaching application can be created with this very simple structure. --- # 13.8 Differences from COBOTTA With COBOTTA, the sequence is: ``` TakeArm ↓ Motor ON ↓ Free Mode ``` With UR, a similar operation can be performed simply by starting Teach Mode. The underlying concepts are very similar. --- # 13.9 Payload Configuration Payload configuration is important in Freedrive. If the configured weight is incorrect, the robot may: - Feel heavy to move - Move on its own - Be difficult to hold in position --- # 13.10 Safety Safety monitoring continues during Freedrive. A collision or excessive load can trigger a Protective Stop. --- # 13.11 Relationship to Remote Control Remote Control must also be enabled when starting Teach Mode from Python. Depending on the configuration, Teach Mode may not start unless Remote Mode is active. --- # 13.12 e-Series On the e-Series, integration with the force sensor provides a more natural feel during manual operation. The e-Series is easier to handle for teaching applications. --- # 13.13 CB Series Freedrive is also available on the CB series, but some available APIs and operating procedures differ from those on the e-Series. Check the generation of the controller being used. --- # 13.14 Typical Use Case ``` Start Teach Mode ↓ Move to P1 ↓ Save ↓ Move to P2 ↓ Save ↓ Move to P3 ↓ Save ↓ End Teach Mode ``` This sequence creates taught points. --- # 13.15 Python Example ```python rtde_c.teachMode() input("Move robot and press Enter") pose = rtde_r.getActualTCPPose() print(pose) rtde_c.endTeachMode() ``` This is a minimal teaching program. --- # 13.16 Implementation in ur_ctrl.py For ease of use, the high-level API could provide: ```python enter_freedrive() leave_freedrive() ``` Or: ```python teach_start() teach_stop() ``` Combined with: ```python get_current_pose() ``` these methods would allow a teaching tool to be built entirely in Python, without using the Teach Pendant. --- # Summary Freedrive Mode is a control mode that allows a person to move the robot directly by hand. It is one of the most important functions for teaching. By combining the following operations from Python: - Start Teach Mode - Read the current position - End Teach Mode it is straightforward to create custom teaching software. The next chapter explains coordinate systems such as TCP, Base, Tool, and Feature.