Simmechanics - Dynamixel model

The used software tools: Solidworks 24.2, Matlab13A, Simscape Multibody (install, enable in Solidworks)

I have modified the Bushing and Washer found here, because my mounting screws are shorter than expected. My models (stl and sldp) can be found at the bottom of the page. In this tutorial I'm going to explain how to import a robotic system into Matlab with two Dynamixel AX12 motors and standard brackets.

Solidworks steps:

1: build your own parts or download the 3D models of the motors and the connecting elements: AX12 and some brackets. It is important to set the correct mass of each object in Tools > Mass Properties. If *.stl files are going to be used as parts, while you select to open as a part, in the options select Solid body.

2: assemble your own robot arm in Solidworks. In case of a rotational joint (like between motor wheel and a bracket), use concentric mate. In other cases, where the connection is fix between two parts, use coincident mate on multiple surfaces (min 3 surfaces) such that we completely constrain the part.

3: export the assembled robot arm with Tools > SimMechanichs link > export > SimMecahnics First Generation. Complex assemblies might take longer to export but at the end there should an *.xml and some geometry files *.stl.

Matlab steps:

1: import the xml with smimport('file_anme.xml') command and save the created simulink model:

2: setup the revolute joint parameters

  • Internal Mechanics > Damping coefficient

  • Actuation > Mode > Torque

  • Sensing > all if needed (velocity is required in the next step)

3: limit the input torque and the joint rotational angle if needed (in our case the second joint) with a hard stop as shown below

The system should look like this: