Interaction Control Tutorial

Revision as of 21:31, 28 November 2017 by Imcmahon (talk | contribs) (Impedance/Force Control Examples)
Jump to: navigation , search

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 tutorial demonstrates using example scripts to create different interaction control behaviors.


Start a default interaction control behavior while moving to a desired configuration

The default interaction control mode is to perform impedance control at the endpoint with maximum stiffness in all 6 directions. The following command uses go_to_joint_angles_in_contact.py script to move the arm from the current configuration to a specified configuration with the default interaction control behavior. Note that without any extra arguments nullspace stiffness values will also be set to the default values.

$ rosrun intera_examples go_to_joint_angles_in_contact.py -q 0 -0.8 0 1.6 0 0.8 0

-q 0 -0.8 0 1.6 0 0.8 0 specifies the target arm configuration. More arguments can be used to set other options (speed, interaction parameters, and etc.), which can be found by using -h argument for the script.


Have more compliance along z-axis of TCP frame

In impedance control, a desired stiffness value can be specified for each of 6 directions. The following command demonstrates having a low stiffness (i.e., more compliance) only along z-axis of TCP frame.

$ rosrun intera_examples set_interaction_options.py -m 1 1 0 1 1 1 -k 1300 1300 500 30 30 30 -ef -kn 0 0 0 0 0 0 0

-m 1 1 0 1 1 1 and -k 1300 1300 500 30 30 30 set the direction along z-axis to have a specified stiffness of 500 while maximum stiffness values will be computed for the rest of directions. -ef sets TCP frame to be the reference frame for impedance control. -kn 0 0 0 0 0 0 0 sets the nullspace stiffness to zero.


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

Force control is usually performed only along a specific direction. The following command demonstrates how to apply force only along z-axis of TCP frame using set_interaction_options.py script. The endpoint remains in impedance control mode with maximum stiffness for the rest of directions. The nullspace stiffness is set to zero in this example.

$ rosrun intera_examples set_interaction_options.py -md 1 1 2 1 1 1 -ef -f 0 0 30 0 0 0 -kn 0 0 0 0 0 0 0

-md 1 1 2 1 1 1 and -ef set the translational direction of z-axis of TCP frame to force control mode. -f 0 0 30 0 0 0 sets the force command along z-axis to be 30N. -kn 0 0 0 0 0 0 0 sets the nullspace stiffness to zero.


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

As a hybrid mode between impedance and force mode, maximum force limit can be set for impedance control, which is called impedance with force limit mode. The following command demonstrates setting a force limit along z-axis of TCP frame during impedance control using this mode.

$ rosrun intera_examples set_interaction_options.py -md 1 1 3 1 1 1 -ef -f 0 0 30 0 0 0 -kn 0 0 0 0 0 0 0

-md 1 1 3 1 1 1 and -ef set the translational direction along z-axis of TCP frame to be in impedance with force limit mode. -f 0 0 30 0 0 0 sets the force limit along z-axis to be 30N. -kn 0 0 0 0 0 0 0 sets the nullspace stiffness to zero.

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. Note that the script sets the nullspace stiffness values to default values for maintaining the elbow position, by default.



constrained zero-G in position

The following command sets the endpoint to move freely only in the translational directions. In the rest of the directions (i.e., rotational directions), the endpoint remains in impedance control with maximum stiffness.

$ rosrun intera_examples constrained_zeroG.py -p

-p sets the stiffness gains for all three translational directions to 0.


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

The following command sets the endpoint to move freely only along z-axis of base frame. In the rest of the directions, the endpoint remains in impedance control with maximum stiffness.

$ rosrun intera_examples constrained_zeroG.py -pz

-pz sets the stiffness gain for the translational direction along z-axis to 0.


constrained zero-G in orientation

The following command sets the endpoint to move freely only about the rotational directions. In the rest of the directions (i.e., translational directions), the endpoint remains in impedance control with maximum stiffness.

$ rosrun intera_examples constrained_zeroG.py -o

-o sets the stiffness gains for all three rotational directions to 0.


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

The following command sets the endpoint to move freely only about x-axis of base frame. In the rest of the directions, the endpoint remains in impedance control with maximum stiffness.

$ rosrun intera_examples constrained_zeroG.py -ox

-ox sets the stiffness gain for the rotational direction about x-axis of base frame to 0.


constrained zero-G in horizontal plane (XY)

The following command sets the endpoint to move freely only on XY plane of base frame (i.e., along both x and y axes). In the rest of the directions, the endpoint remains in impedance control with maximum stiffness.

$ rosrun intera_examples constrained_zeroG.py -ph

-ph sets the stiffness gain for the horizontal directions (x and y axes) to be 0. Alternatively, -x -y can be used.


constrained zero-G in the nullspace

The following command sets the arm to move freely only in the nullspace while the endpoint remains in impedance control with maximum stiffness.

$ rosrun intera_examples constrained_zeroG.py -ns

-ns sets all of the nullspace stiffness gains to 0.