Difference between revisions of "Interaction Control Tutorial"

This tutorial describes how to create different interaction control behaviors using example scripts.

Impedance/Force Control Examples

Interaction controller in intera enables impedance or force control at the endpoint of the arm. The following examples demonstrate using example scripts to create different interaction control behaviors.

start a default interaction control behavior at the endpoint

```\$ rosrun intera_examples go_to_joint_angles_in_contact.py
```

apply force (30N) along z-axis of TCP frame

```\$ rosrun intera_examples set_interaction_options.py -md 1 1 2 1 1 1 -f 0.0 0.0 30.0 0.0 0.0 0.0 -ef -kn 0.0 0.0 0.0 0.0 0.0 0.0 0.0
```

having more compliance along z-axis of TCP frame

```\$ rosrun intera_examples set_interaction_options.py -m 1 1 0 1 1 1 -k 1300.0 1300.0 500.0 30.0 30.0 30.0 -ef -kn 0.0 0.0 0.0 0.0 0.0 0.0 0.0
```

impedance control with force limits (30N) along z-axis of TCP frame

```\$ rosrun intera_examples set_interaction_options.py -md 1 1 3 1 1 1 -f 0.0 0.0 30.0 0.0 0.0 0.0 -ef -kn 0.0 0.0 0.0 0.0 0.0 0.0 0.0
```

Constrained Zero-G Examples

The regular zero-G mode of Sawyer can be interpreted as having zero stiffnesses at the endpoint as well as nullspace, which means that the endpoint and nullspace are free to move in all directions. The constrained zero-G mode is defined by having only part of stiffness values set to zero. In this mode, the movement along/about the directions with non-zero stiffness values is constrained while the arm is free to move in the directions with zero stiffness. The following examples demonstrate how to use `constrained_zeroG.py` script to generate different constrained zero-G behaviors.

constrained zero-G in position

```\$ rosrun intera_examples constrained_zeroG.py -p
```

constrained zero-G in position along z-axis of base frame

```\$ rosrun intera_examples constrained_zeroG.py -pz
```

constrained zero-G in orientation

```\$ rosrun intera_examples constrained_zeroG.py -o
```

constrained zero-G in orientation about x-axis of base frame

```\$ rosrun intera_examples constrained_zeroG.py -ox
```

constrained zero-G in horizontal plane (XY)

```\$ rosrun intera_examples constrained_zeroG.py -ph
```

constrained zero-G in the nullspace

```\$ rosrun intera_examples constrained_zeroG.py -ns
```