Create and Import Robot Model

You are currently viewing the documentation for the latest version (2.1.1). To access a different version, click the "Switch version" button located in the upper-right corner of the page.

■ If you are not sure which version of the product you are currently using, please feel free to contact Mech-Mind Technical Support.

When the robot model library does not include the robot you need, the basic procedures for creating and importing a robot model are shown below.

A FANUC M-900iB/400L robot will be used as an example.

Obtain the CAD File and Specifications of the Robot

Before creating the robot model, please obtain the CAD file and the datasheet which contains DH parameters and motion ranges of each joint of the robot.

You can download the relevant documentation on the official website of the robot.

The figure below shows the CAD model and descriptions of FANUC M-900iB/400L.

robot model1
Some robot websites will provide models in X_T format. Comparing to STEP files, X_T files perform better and takes less time in reconstruction. Therefore, it is recommended to use models in X_T format.

Determine the Robot Configurations and Write the Parameter Files

After confirming the robot’s configuration by referring to its CAD model and manual, create the corresponding parameter file.

Video: Confirm the Robot Configurations and Create the Parameter Files

Obtain the Configuration of the Robot (algo_type)

Different robots have different configurations which are described by different frames of reference and DH parameters.

Please refer to Robot Configurations for examples of different robot configurations.

FANUC M-900iB/400L is a common 6-axis split-ball type wrist industrial robot, which belongs to the SphericalWrist_SixAxis configuration.

Obtain the DH Parameters (dh, dhPassive)

Please refer to Robot Configurations and find the corresponding configuration file of the robot. Then you can confirm the DH parameter value in [robot]_algo.json according to the DH parameters in the specifications of the robot.

The DH parameters of FANUC M-900iB/400L are a=0.940, b=0.410, c=1.120, d=0.250, e=2.180, f=0.300.

robot model2

In the above figure, the configuration diagram of SphericalWrist_SixAxis robot is on the left, and the specifications of FANUC M-900iB/400L is on the right.

Obtain the Motion Ranges of Each Joint (minlimits, maxlimits)

Usually, the motion ranges of joints are specified in the documentation of the robot. However, you need to open the robot simulation software RoboGuide of FANUC robots and then search for the motion ranges in this case.

robot model3

Obtain Other Parameters

For common robot brands, you can refer to the parameters of other created robot models. If there are not available parameters to reference, please contact the site engineers for other parameters, i.e., mastering_joints, axis_flip, base_z_offset, axis_flip, and mastering_joints.

  • Please use English punctuation marks in the JSON parameter file.

  • The mastering_joints, axis_flip, base_z_offset attributes should correspond to those specified in the robot simulation software after creating a robot.

  • The axis_flip attribute is coupled with minlimits and maxlimits. Sometimes it is necessary to switch the value of the upper and lower limits and reverse the positive and negative signs of the values at the same time.

  • J6 in the mastering_joints attribute can be neglected easily. This attribute affects Euler angles and need to be checked and saved carefully.

Write the [robot]_algo.json File

The template file algo_example.json is stored in C:/Users/Administrator/AppData/Roaming/Mmind/Robot Library 2.0. You can create a new [robot]_algo.json file based on the template.

For the definition of the parameters in the [robot]_algo.json file, please refer to Description of [robot]_algo.json File.

Write the [robot]_profile.json Parameter File

The template file profile_example.json is stored in C:/Users/Administrator/AppData/Roaming/Mmind/Robot Library 2.0. You can create a [robot]_profile.json file based on the template.

For the definition of the parameters in the [robot]_profile.json file, please refer to Description of [robot]_profile.json File.

Use Solidworks to Construct a STL Model of the Entire Robot

Import the CAD Model in SolidWorks

Video: Import the Model and Create Reference Frames for Each Axis

Open the CAD model of the robot in SolidWorks, as shown below.

robot model4

In the above figure, the CAD robot model is on the left and an assembly reference diagram is on the right.

  • It is recommended to download an entire robot model that has been assembled completely.

  • If you can download only the parts, you will need to assemble them yourself and check each joint according to the DH parameters.

  • You may remove the details of the model and keep only the structure that may affect collision detection to reduce the time to import the model.

Create Reference Frames

Please refer to Robot Configurations to create the reference frame of each axis.

As for FANUC M-900iB/400L, the configuration is SphericalWrist_SixAxis, and the robot pose should be like the figure below: J1 axis is aligned with the base, J2 axis stays vertically upward, J3 axis and J4 axis stays horizontally forward, and J5 axis stays forward rather than downward. Once the pose is determined, all parts should be fixed.

robot model5

Export STL Models of Robot Joints

Video: Export STL Models of Each Joint

It is recommended to hide other parts on the assembly when exporting the joint model in turn.

Save the exported file in STL format, set the output to binary and the unit to meter. Please refer to Robot Configurations for detailed information. Other settings are shown below.

robot model8

The entire robot model of FANUC M-900iB/400L in STL format is shown below.

robot model9

Now you have completed creating a robot model.

Import the Robot Model to Mech-Viz

After creating the robot model, please import the robot model to the robot model library of Mech-Viz for further use.

Video: Import the Robot Model to Mech-Viz

Follow the steps below to import the robot model to Mech-Viz:

  1. You can open the folder containing the robot model using either of the following methods.

    • In the Robot Model Library, right-click any robot model card, and then select “Open robot model folder” in the context menu.

    • In the project resource tree, right-click the robot name, and then select “Open Robot File Directory” in the context menu.

  2. Navigate to the robot brand folder within the robot model file directory.

    All robot models in the Mech-Viz robot model library are stored in C:\Users\Username\Roaming\Mmind\Robot Library 2.0. Robot models of the same brand are stored in folders named after the brand. Each model has its own subfolder, named accordingly, which contains all related files.

  3. In the robot brand folder, create a new folder for the specific robot model—for example, fanuc_m900ib_400l.

    Use lower case letters to name the folders.

  4. Store all model and parameter files in the designated path to import the robot model to Mech-Viz.

    • The supported robot model formats include STL, DAE, and OBJ, and files of each format should be stored in their respective folders.

    • STL model can be used for both visualization and collision detection.

    • DAE model can only be used for visualization.

    • OBJ model can only be used for collision detection.

    • A complete robot model should include at least one visualization model and one collision model.

    As for FANUC M900iB/400L, the model files are stored in fanuc/fanuc_m900ib_400l. The descriptions of each file are as follows.

    robot model10

    STL

    Model file

    fanuc_m900ib_400l_algo.json

    Robot kinematics parameter file

    fanuc_m900ib_400l_preview.png

    Robot picture

    fanuc_m900ib_400l_profile.json

    Robot kinematics parameter description file

  5. Go back to the Robot model library, and you can find and select the imported robot model.

Verify Robot Model Parameters

Before the actual deployment of the project, you need to verify the robot model parameters. If a big difference between the simulated robot pose or tool pose in the software and the real robot pose is observed, for example, one to two meters, the robot model parameters may be inaccurate and need to be corrected.

For detailed instructions, see the Guide for Robot Model Parameter Verification.

Is this page helpful?

You can give a feedback in any of the following ways:

We Value Your Privacy

We use cookies to provide you with the best possible experience on our website. By continuing to use the site, you acknowledge that you agree to the use of cookies. If you decline, a single cookie will be used to ensure you're not tracked or remembered when you visit this website.