Using Doosan's Force Control

Before you start

Safety Precautions :warning:

The code example in this guide includes joint and Cartesian coordinates, which, based on your robot’s placement and surroundings, could cause damage or harm. When running these examples, or any new movement in general, set the speed (v) to a low value and be ready to use the emergency stop if needed. The code example below assumes the robot is in its home position before executing the code.

Prerequisites :information_source:

This guide assumes you are already familiar with joint (posj) and Cartesian coordinates (posx). If you have never heard of these, make sure to first check this article. Additionally, a basic understanding of Python is needed.

Running the examples :computer:

The code example below is intended to be run through DRL Studio with an actual Doosan robot

Robot limits :robot:

Cobots have inherent limitations, and in many cases, they may attempt to reach a target pose even if they cannot do so smoothly. Joint movements are generally reliable and function as expected. However, other types of movements carry the risk of encountering singularities, which can result in unexpected behaviour and movement patterns.

Force Control

Doosan’s Force Control system is designed to allow precisely measuring and adjusting the amount of force applied along specific axes. This means you can program the robot to respond when it detects a certain level of force. For example, you could program it to lower its arm until a certain threshold of resistance is reached, close the gripper and pick up an object. This is particularly useful in tasks where gentle handling or precise force application is critical.

Example

# function to stop the movement using force control
def wait_force_feedback():
    ff = True
    while ff:
        # wait for force condition on Z-axis to be met
        ff = check_force_condition(axis=DR_AXIS_Z, max=25, ref=DR_BASE)
    if not ff:
        tp_log("Stopped due to Force Control feedback")
        
        # stop the movement
        stop(DR_QSTOP)


# get the current pose in cartesian coordinates
current_posx, _ = get_current_posx()

# transform the current pose by decreasing its Z value by 500mm
target_posx = trans(current_posx, posx(0, 0, -500, 0, 0, 0))

# move linearly to the target pose (async)
amovel(target_posx, v=20, a=100)

# wait for the force control feedback and stop the movement
wait_force_feedback()

How-to by @dimitar.prisadnikov