Shutter Servo Package

Shutter Servo is Shutter’s interface to the MoveIt Servo package. MoveIt Servo (previously named JogArm) enables soft realtime control of a robot. Unlike the primary interfaces to MoveIt used by Shutter, such as MoveItCpp or the Move Group Python interface, MoveIt Servo does not provide actual motion planning or trajectory generation capabilities. Instead, MoveIt Servo streams joint commands to the controller after checking for collisions and joint singularities.

The previous name of “Tarzan Servo” was a bit misleading - Shutter Servo is the up-to-date library, that is now separate from the MoveIt interface implemented in the shutter-tarzan repository. Some outdated documentation may still refer to “Tarzan Servo”, but the terms should be considered to be roughly equivalent.

Shutter Servo Pipeline

  1. The desired joint position goals are generated by some external process (e.g., the shutter_opt_control package).

  2. Shutter Servo computes the joint displacement by comparing the position goals to the robot’s current joint position values.

  3. The joint displacement is converted into a command using MoveIt’s servo calculation library. The command is checked to make sure the robot isn’t moving into collision with an obstacle or itself, and isn’t entering a kinematic singularity.

  4. Finally, the new joint commands are published for the controller to execute. This step requires a Joint Group Position controller to pass the commands to the shutter_hardware_interface package.

Configuration

There is one configuration file required by Shutter Servo:

  • shutter_servo/config/shutter_servo_config.yaml specifies the parameters for the topics, publishing rates, and planning frames required by MoveIt Servo.

There are three important parameters that might need to be changed in order to interface with other code components:

  1. joint_command_in_topic: the topic for incoming joint angle commands. This parameter defaults to servo/delta_joint_cmds, and the namespace is relative to the main shutter_servo node. Shutter Servo automatically converts incoming joint position goals to joint angle commands, but monitoring this topic is helpful for debugging.

  2. enable_ik_plugin: set to True to use a separate inverse kinematics solver, such as TRAC-IK. The default (setting this parameter to False) is the pseudo-inverse Jacobian method.

  3. goal_positions_topic: the topic for incoming joint position goals. Note that this parameter is NOT specified in the configuration file, but should be specified in the launchfile. The parameter defaults to servo/joint_command, and the namespace is relative to the main shutter_servo node.

A feature that could be useful in the future to investigate is drift dimensions. Shutter is underactuated relative to the 6-DOF arms that MoveIt Servo was originally developed for. Hence, disabling some dimensions (in the camera_link frame, Y translation and X rotation) could improve servoing. Drift dimensions are enabled with a ROS service.

Unity Integration

In principle, Shutter Servo also works with a Unity simulation of Shutter, provided that:

  1. Unity exposes a topic corresponding to /joint_group_controller/command that passes an array of joint positions (messages of type Float64MultiArray) to the robot model.

  2. The simulated robot joints respond to commands equivalently to the real robot.

The first provision can be satisfied by remapping, for example in a launch file:

<remap from="/joint_group_controller/command" to="/unity_joint_group_controller/command"/>
<include file="$(find shutter_servo)/launch/shutter_servo.launch">
  <arg name="simulation" value="$(arg simulation)"/>
</include>

The second provision is more complicated, in that Unity’s physics solver tries to consider characteristics like inertia and spring dynamics that are not explicitly specified in the current Shutter URDF. The available Unity simulation is acceptable for basic servoing, but is not rigorously tested to achieve realistic behavior for more sophisticated simulations.

Extending the Use Cases of Shutter Servo

Although Shutter Servo was developed for Shutter’s face tracking motion, it could be reused for different applications. For example, the joint commands could be generated to track an object instead of a person, i.e. substituting a different set of joint positions at step 1 of the servoing pipeline. Alternatively, the joint displacements could be specified directly, instead of being computed by comparing current and target poses. This use case might look like a joystick publishing commands directly at step 2 of the servoing pipeline. The shutter_teleop package interfaces with MoveIt Servo via a pose tracking API, and is closely related to the Shutter Servo library.