Skip to content

Electrical Plug Mating Plugin

Mabel Zhang edited this page Jul 30, 2021 · 21 revisions

Overview

Connecting underwater electrical flying leads is a common task that is performed by UUVs in the real world. A video of this task being performed can be found here:

Video demonstration

This plugin provides the latching/unlatching (mating/unmating) functionality to the simulation.

You will need a joystick to perform the actual mission.

Motivation and possibilities

Users can program an autonomous mission where the UUV is tasked with grabbing the electrical plug and connecting it to the socket. The mating and demating are dependent on the forces between the plug and the socket and their relative alignments to each other.

Getting Started

The uuv_mating_plugin plugin can be found in the uuv_mating package. To get started please run the following command in the terminal

roslaunch uuv_dave uuv_dave_electrical_mate.launch

After running this command, Gazebo will be launched showing a world with a plug on a platform. There is also a socket on a panel, the plug can be connected to this socket. The UUV's manipulator arm can be used to manipulate the plug into the socket. The following is a picture of what shows up:

electrical_mating_launch

The two pictures below show the plug and the socket.

Video Showing functionality

A video that demonstrates the functionality of this plugin can be found here.

Details on the operation:

For the plug to mate with the socket, it has to be inserted with a correct alignment and with sufficient force. Similarly, for it to be removed, it has to be pulled with sufficient force. All these parameters are exposed through the SDF parameters as follows.

    <plugin name="uuv_mating_plugin" filename="libuuv_mating_plugin.so">
      <rollAlignmentTolerence>0.3</rollAlignmentTolerence>
      <pitchAlignmentTolerence>0.3</pitchAlignmentTolerence>
      <yawAlignmentTolerence>0.3</yawAlignmentTolerence>
      <zAlignmentTolerence>0.5</zAlignmentTolerence>
      <matingForce>60</matingForce>
      <unmatingForce>200</unmatingForce>
    </plugin>

If any of these parameters are not provided, the plugin assigns default values. Picture describing the Z diff, roll diff, pitch diff, the yaw. Picture explaining the mating and unmating forces. A state machine was used to abstract the functionality of the plug.

The State machine

There are three states for the plug as represented by the following diagram.

plug_mating_state_machine

Free state

The state at which the plug can move freely in the world. In this state, the plug is not physically bound to the socket. The plug transitions out of this state to the joined state when the plug is aligned with the socket and when the plug is within close proximity to the socket.

Joined state

When the plug is in this state, it is bound to the socket with a prismatic joint. The plug can be pushed towards the the socket when it is in this state. The point of this state is to remove all the degrees of freedom except for one to ease the insertion of the plug. Just like how a key hole of a door lock provides a rail to guide the key into the lock, this state provides a "programatic rail". This is more robust way than relying on the physical geometry of the socket. Once enough force is applied to the socket from the plug, the plug goes into the the fixed state.

Fixed state

When the plug is in this state, it is fixed to the socket and all of it's degrees of freedoms are locket. To release the plug from the socket, a pulling force on the plug must be applied using the UUV's manipulator arm's fingers. Once enough force is applied, the plug goes into the free state. The moment the plug goes into the fixed state, it would still be correctly aligned and within close proximity to the socket. To stop the plug from going directly into the joined state right away, a buffer period has to pass before the plug is able to go into the joined state once again.

Limitations

  1. The current plugin is not designed to support multiple plugs and sockets. Only one plug and socket may be present in the world simultaneously.
  2. To go from the Fixed to Free state, the force applied to the plug needs to come from a link that contains the name finger_tips. This is to make sure that if the manipulator arm is pushing the plug into the socket, and the socket is applying an equal an opposite force, that force does not accidentally unlatch the plug.

Future Improvements

  1. Allow for more than one plug/socket, to be functional in this world.

Relevant links

Associated Pull Request can be found here. Associated GitHub Issue can be found here.

Clone this wiki locally