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 positional or velocity control, which incorporate a feedback loop. Please visit our API documentation site for further details.
Types
There are five types of joint supported.
Prismatic (Slider)
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)
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 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
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)
Constrains the rigid body such that it is only permitted to rotate about a specified point relative to the base.
Fixed (Locked)
Constrains the rigid body such that it is 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 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 floor/world and 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 left empty. 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 of the second joint to the entity moved by the first joint.
World -> X-Axis Link -> Y-Axis Link
The first prismatic joint would be added to the X-Axis Link, with its base property left empty. This allows the x-axis link to move along the world x-axis.
The second prismatic joint would be added to the Y-Axis Link, with its base property set to the x-Axis Link entity. This allows 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 first revolute joint is added to Link 1, with its base property left empty.
- The second revolute joint is added to Link 2, with its base property set to Link 1.
- The thrid revolute joint is added to Link 3 with its base property set to Link 2.
- …
- The sixth 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/link of the robot. This isn’t necessary since the base part doesn’t move and so Link 1 can be 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:
- All four links are movable
- 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 first revolute joint is added to Link 2, with its base property set to Link 1.
- The second revolute joint is added to Link 3, with its base property set to Link 2.
- The third 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 do this by jointing Link 4 to Link 1. There are two possible ways to do this:
- Add the fourth revolute joint to Link 1, with its base property set to Link 4.
- Add the fourth 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 details 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 first revolute joint is added to Link 2, with its base property left empty.
- The second revolute joint is added to Link 3, with its base property set to Link 2.
- The third revolute joint is added to Link 4, with its base property set to Link 3.
- The fourth revolute jount is also added to Link 4, with its base property left empty.
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.