Design-time considerations
Note
Try to make your robot assembly mostly based on sub pre-assembled components (avoid to have a lot of constraints that are not relevant for the export). In this main assembly, do not use features such as sub-assemblies network.
Specifying degrees of freedom
Degree of freedoms should be slider, cylindrical or revolute mate connectors named
dof_something, wheresomethingwill be used to name the joint in the final documentIf the mate connector is cylindrical or revolute, a
revolutejoint will be issued by defaultTo make a
continuousjoint, addcontinuousorwheelin the name of the joint. For instance, a revolute mate nameddof_front_left_wheelwill result in acontinuousjoint namedfront_left_wheelin the resulting URDF.
If the mate connector is a slider, a
prismaticjoint will be issuedIf the mate connector is fastened, a
fixedjoint will be issued
When doing this connection, click the children joint first. This will be used to find the trunk of the robot (part with children but no parent)
Inverting axis orientation
It is possible to invert the axis for convenience by adding _inv at the end of the name. For instance
dof_head_pitch_inv will result in a joint named head_pitch having the axis inverted with the one
from the OnShape assembly.
Naming links
If you create a mate connector and name it link_something, the link corresponding to the part
on which it is attached will be named something in the resulting URDF.
Adding custom frames in your model
If you want to track some frames on your robot, you can do the following:
Connect any part to your robot using mate relations in OnShape
Name one of these relations
frame_something, whensomethingwill be the name of the frame (a link) in the resultingsdforurdf
Here is a link of a document that can be used as a frame (note: the center cube is 5mm side, so you might need 2.5mm offset to center it).
Joint frames
Joint frames are the ones you see in OnShape when you click on the joint in the tree on the left.
Thus, they are always revolving around the z axis, or translating along the z axis, even if the
_inv suffix is added.