Robot Model Creating and Importing
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 file and descriptions of FANUC M-900iB/400L.
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. |
Write the (robot)_algo.json File
(robot)_algo.json Template File
The template file of (robot)_algo.json is stored in `C:/Users/Administrator/AppData/Roaming/Mmind/robot/profile_example.json in the installation directory of Mech-Viz. 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]_profile.json File. |
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.
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.
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]_profile.json Parameter File
[robot]_profile.json template file is stored in resource/robot/profile_example.json
in the installation directory of Mech-Viz. You can create a new _profile.json file based on the template.
|
Use Solidworks to Construct a STL Model of the Entire Robot
Import the CAD Model in SolidWorks
Open the CAD model of the robot in SolidWorks, as shown below.
In the above figure, the CAD robot model is on the left and an assembly reference diagram is on the right.
|
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.
Export STL Models of Robot Joints
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.
The entire robot model of FANUC M-900iB/400L in STL format is shown below.
Now you have completed creating a robot model.
Use the Created Robot Model
The robot library of Mech-Viz is stored in resource/robot
in the installation directory. Robot models of the same brand are stored in the same folder which is named after the brand name, and all the files of the robot model are stored in the folder which is named after the model name.
As for FANUC M900iB/400L, the model files are stored in resource/robot/fanuc_m900ib_400l
. The descriptions of each file are as follows.
-
STL: the robot model file
-
fanuc_m900ib_400l_algo.json: robot kinematic parameter file
-
fanuc_m900ib_400l_preview.png: image of the robot
-
fanuc_m900ib_400l_profile.json: parameter description file of the robot
|
Copy and paste all files into the corresponding directory and the robot model will be imported successfully.
Then you can select the newly imported robot from the Robot Model Library in Mech-Viz.