Physics Joints

Dynamic joints can be used to simulate complex mechanisms and linkages. Joints specify how two rigid bodies can move relative to each other. Some joints can also be driven by motors using position or velocity control, which incorporate a feedback loop. Please see the API documentation for more details.

Types

ProtoTwin supports 5 types of joints.

Prismatic (Slider) Joint

Constrains the rigid body such that it is only permitted to slide along a single axis relative to the base. The joint’s position can be driven by a motor.

Revolute (Hinge) Joint

Constrains the rigid body such that it is only permitted to rotate in a plane about a point relative to the base. The axis specifies the normal vector for the plane. The anchor specifies the point about which the body is permitted to rotate. The joint’s angle can be driven by a motor.

Path Joint

Constrains the rigid body such that it is only permitted to move along a path relative to the base. The anchor specifies the point which is projected onto the path and moves along the curve. The joint’s position can be driven by a motor. The path component page contains further details for configuring a dynamic path joint.

Spherical (Ball & Socket) Joint

Constrains the rigid body such that it is only permitted to rotate about a specified point relative to the base.

Fixed (Locked) Joint

Constrains the rigid body such that it is locked (fixed) relative to the base. The rotation and translation are locked (fixed) relative to the base.

Connecting Joints

Joints can be connected together to form chains or complex linkages, including closed-loop mechanisms. This is achieved by using the base property of the joints. The base property specifies the body/link to which the other end of the joint is attached. If the base property is left empty (set to null), the other end of the joint is attached to the world. Most robots are fixed to the floor/world, so it is typical that the first joint has its base property left empty.

Examples

Single Linear Axis

A single linear axis, such as a pusher, would usually be modeled using a single prismatic joint, with its base property set to null. This allows the carriage/pusher to move along a fixed direction.

2-Axis Gantry

A two-axis gantry (cartesian robot) would usually be modeled using two prismatic joints. The second axis (y-axis) would be connected to the first axis (x-axis) by setting the base property of the second joint to the entity moved by the first joint.

World -> X-Axis Link -> Y-Axis Link

The first prismatic joint should be added to the X-Axis Link, with its base property set to null. This allows the X-Axis link to move along the x-axis of the world. The second prismatic joint should be added to the Y-Axis Link, with its base property set to the X-Axis Link entity. This allows for the Y-Axis Link to move up and down relative to the X-Axis Link. When the X-Axis Link moves along the world x-axis, the Y-Axis Link will also move along the world x-axis.

6-Axis Robot

A 6-axis articulated robot would be modeled using six revolute joints. Each movable link is connected to the previous link using a revolute joint, forming a chain of joints.

World -> Link 1 -> Link 2 -> Link 3 -> Link 4 -> Link 5 -> Link 6

The joints are configured as follows:

  • The 1st revolute joint is added to Link 1, with its base property left empty.
  • The 2nd revolute joint is added to Link 2, with its base property set to Link 1.
  • The 3rd revolute joint is added to Link 3 with its base property set to Link 2.
  • The 4th revolute joint is added to Link 4 with its base property set to Link 3.
  • The 5th revolute joint is added to Link 5 with its base property se to Link 4.
  • The 6th revolute joint is added to Link 6 with its base property set to Link 5.

Note that a joint isn’t added to the base part (or link) of the robot. This isn’t necessary since the base part doesn’t move, so Link 1 can be attached (jointed) to the world.

Four Bar Linkage

A four bar linkage is modeled using four revolute joints in a closed-loop configuration. We will consider two cases:

  1. All four links are movable
  2. One link is fixed relative to the world

Case 1: All Links Movable

We will consider the case when the entire four bar linkage mechanism should be movable (i.e. no link is fixed).

Link 1 -> Link 2 -> Link 3 -> Link 4

We first chain all the joints together:

  • The 1st revolute joint is added to Link 2, with its base property set to Link 1.
  • The 2nd revolute joint is added to Link 3, with its base property set to Link 2.
  • The 3rd revolute joint is added to Link 4, with its base property set to Link 3.

Now all that remains is to close the loop. We can do this by jointing Link 4 to Link 1. There are two possible ways to do this:

  1. Add the 4th revolute joint to Link 1, with its base property set to Link 4.
  2. Add the 4th revolute joint to Link 4, with its base property set to Link 1.

Each of the above options are equally valid.

Case 2: One Link Fixed

In this second case, we will assume that the first link is fixed relative to the world. One way to achieve this is to just use the approach detailed in CASE 1, but set the body type of Link 1 to Kinematic. However, a slightly more efficient approach is to avoid creating a body for Link 1 and instead joint both Link 2 and Link 4 to the world:

  • The 1st revolute joint is added to Link 2, with its base property left empty (set to null).
  • The 2nd revolute joint is added to Link 3, with its base property set to Link 2.
  • The 3rd revolute joint is added to Link 4, with its base property set to Link 3.
  • The 4th revolute jount is also added to Link 4, with its base property left empty (set to null).

Self-Collisions

When two bodies are directly connected / jointed together with a joint, the two bodies will not collider with each other. In many cases, this avoids the need to use physics layers in order to exclude the bodies from colliding with each other. However, in cases where you have a chain of joints involving 3 bodies/links, any links that are not directly connected by a joint may collide with each other. If you want to prevent an entire mechanism (such as a 6-axis robot) from colliding with itself, you should use physics layers.