Setting Joints

This article explains the supported types of joints and the differences between them.

Joint Types

Currently, there are 7 supported joint types for exporting a robot in .SDF. Their properties (number of axis, type of motion, etc.) are summarized in the table below.

Note: Because of known problems with gearbox and screw joints in Gazebo, it is recommended to avoid using them currently. If needed gearbox joints can often be mimicked by applying a motor to both joints with the same port. This will apply a force to both joints and should make them move together.

Joint Types

Set Joint Type

Set Joint Type

Use the drop down to set what kind of joint to use.

Set Joint Axes, Limits, and Points

Set Joint Axes, Limits, and Points

Depending on the type of joint, at least one point, axis, or plane may be necessary to define the range/limit of movement for each joint. To do so, click the "Select Joint Pose" button, which will bring you to a panel in the Solidworks window where you can use the selection boxes to click on an vertex, edge, or plane of the model, as necessary. For axes, use the toggle direction button to flip the direction of movement.

Note that these objects must be selected from the visual configuration model (not the collision models).

Click the green checkmark to return to the "Manage Robot" window.

Set Joint Pose (Optional)

Set Joint Pose (Optional)

In addition, you may specify the position and frame of reference of the joint by checking the Joint Pose checkbox and selecting a point and 2 axes. Note that if you select a plane for the x-axis or y-axis, the axis will be in the direction of the normal vector of that plane.

This step is optional and should only be completed by advanced users. If no joint pose is specified, it will be automatically calculated and set.

Set Joint Limits

Set Joint Limits

The limits of a joint can be set graphically by un-checking "Select Manual Limits" and pressing the "Select Limits" or "Select Joint Pose" buttons. To define the limits a motion limit and an edge must be defined in each direction. The edge defined as the point on the link itself that will move to the limit. The motion limit is a point not on the link that the edge will move to at its furthest extent. Through this method, the limit values are calculated automatically for you.

The green preview arrow represents positive movement of the joint, and the red arrow represents negative movement.

If the link will only move in one direction, only the limits in that direction need to be selected.

For rotational limits:

On rotational joint the limits will define the angular movement of the link. Because of this, the selection will define itself on to one of the 2 sides of the axis of revolution. The direction can be seen with the pink and purple lines that are projected on to the model. If the limit is on the wrong side of the axis, simply click on flip selections button next to the corresponding selection box to flip the limit to the other side of the axis.

Set Joint Limit Values

Set Joint Limit Values

The motion limit values (in meters and radians, respectively) may be set directly by checking "Select Manual Limits" and inputting their value in the text boxes. Note that the lower motion limit must be a negative value and the upper motion limit must be a positive value.

Furthermore, for rotational joints, if a joint axis has no motion limits and rotates infinitely, check the "Is Continuous" checkbox. Note that Universal joints are defined as having infinite rotation around both axes, so you do not need to set limits for this joint; similarly, Revolute2 joints are defined as having infinite rotation around at least one axis (Axis 2), and Ball and socket joints have infinite rotation in any direction around a point.

Set Joint properties

In addition to the motion limits, damping (in Newton-seconds/meter), static friction value (in Newtons), and effort limit values should be specified for each axis of each joint. The effort limit is the maximum force or torque (in Newtons or Newton-meters) that can be applied to a linear or rotational joint, respectively.

Due to a bug in gazebo, high damping values on lightweight models can sometimes cause the model to break. If the model apears to jump to the origin of the world and be imobile immediately on being placed in the world, lower the damping values to see if this corrects the problems.

Certain joints, including screw joints and gearbox joints, may have additional properties. See the table above. Note that in Gazebo, thread pitch is defined as the amount of thread revolutions (in radians) divided by the length of the screw (in meters).

Set Joint properties

Gearbox joints

Gearbox joints

Gearbox joints are unique because they can be used to mimic other rotational joints. You can only mimic a joint that is connected either as a parent or a child to the parent of the gearbox joint.

Note: Unless you are an experienced Gazebo user, it is highly recommended that you just make two rotational joints with the same property values instead of mimicking a joint with a gearbox joint. These two joints can then be linked by putting an actuator on both joints and putting them both on to the same port.

Mimicking a joint with a gearbox joint

Mimicking a joint with a gearbox joint

To use a gearbox joint, first check that the axis of the joint that you want to mimic has been defined. Then, define the axis on the gearbox joint, which should be parallel to the axis of the mimicked joint, and select the joint from the dropdown box. This will tell the gearbox joint to link to the mimicked joint. Finally, set the gearbox ratio in the textbox. A positive gear ratio will make the two joints rotate in opposite direction, like a gear, while a negative ratio will make the joints rotate in the same direction, like a sprocket and chain.  

0 Report Errors

Use this form to report any errors with the documentation. For help with WPILib, please use the FIRST Forums at http://forums.usfirst.org For reporting WPILib bugs, please submit an issue on GitHub at https://github.com/wpilibsuite/allwpilib/issues/new

Ignore