3D model for the gripper ( mesh file )

Add a 3D representation of your gripper in the collision model of the palletizer software

Context

This article is meant to replace the standard collision model of your gripper by the actual 3D model of your gripper.

 

Knowledge - ADDING A MESH FILE FOR THE GRIPPER - 

Get the mesh model of the gripper


If using PowerPick, see existing mesh models : PLY Models  

 

Using a 3D modeling software like Solidworks, open the gripper’s CAD assembly. 

 

Create a reference geometry of a coordinate system that corresponds to the robot's flange.

  • The X axis should be pointing toward where the box is picked 
  • The Z axis should be pointing away from the flange

 

Alternatively, if you want to use the same mesh for multiple gripper offsets, create a reference geometry of a coordinate system that corresponds to the TCP of the gripper (ex: the center of the box on the top face) 

 

 

 

When exporting your file

  1. use the .stl format 
  2. open the “Options” menu and select the proper parameters
  3. Unit: in meter 
  4. Resolution: coarse 
  5. Output coordinate system: flange of the robot (created by user)

 

If possible, aim for 1000 to 2000 triangles for your model. Otherwise, the application's cycle time might be affected. Using simple geometric forms to model the gripper is one way to reduce the number of triangles. 

 

 

Open your file in Meshlab (free to download), so you can export it in .ply format 

  • The collision model only accepts .ply files 

 

You can also reduce the details of your mesh in Meshlab

  • Filters -> Remeshing, Simplification, and Reconstruction -> Simplification:Quadric Edge Collapse Decimation

 

 

Add the mesh file to your robot 


Using a FTP software (ex: FileZilla), connect to the robot and transfer the .mesh file in the /programs folder.  

Load the mesh file in your program


>> Use Copilot V1.29.0 or higher 

 

In the Before Start, add the following script command and run the program once to apply the new gripper model : 

 

Declaration 

rq_set_gripper_collision_model(file_name, reference_frame, file_path)

Parameters 

 

Example 

rq_set_gripper_collision_model("FileName.ply", 0)
rq_set_gripper_collision_model("FileName.ply", 1, "/programs/meshes/")

Check if the model was properly loaded


 

This following command is useful to set up and debug. It needs to be removed from production because it can overload robot memory.

 

Using the following command :

node_rpc_server.savePalletizerSceneToPlyFile()

 

For example :

You will generate a file of the collision scene, that you can then view with Meshlab. 

Note : You need to run at least one trajectory for the model to update itself with the request. 

 

The file can be found here on the robot : 

/root/robotiq/logs/ucs/rq_xmlrpcserver/palletizer_collision_scene.ply 

 

Tables can't be imported directly. Please insert an image of your table which can be found here.

Before the update, the gripper is modeled with simple boxes

 

After the update, the mesh is used instead

 

 

Removing the mesh file from the collision model 


To revert to the original collision model that does not use the .mesh file : 

  1. remove the script line rq_set_gripper_collision_model()
  2. restart the robot