facebookresearch / tacto

Simulator of vision-based tactile sensors.
MIT License
333 stars 75 forks source link

Trying to collect data contac tdata with my own CAD files #30

Open robertokcanale opened 2 years ago

robertokcanale commented 2 years ago

Hello, I am trying to collect tactile data and images during grasping from the YCB dataset. However, I am trying to simulate the contact but this does not happen, as it is possible to see from the screenshot: test_pybullet

My steps are the following: -Add the folder with .stl, .obj, .mtl to the /object folder -create a .urdf very similar to the ones already provided (see attachment) -edit the .yaml parameters for importing the correct urdf, the scale, and the position filestruct The URDF is the following: urdf

The grasp.yaml is the following: `hydra: run: dir: ./

object: urdf_path: "objects/tomato_soup_can.urdf" base_position: [0.50, 0, 0.0] global_scaling: 1

tacto: width: 120 height: 160 visualize_gui: True

sawyer_gripper: robot_params: urdf_path: "robots/sawyer_wsg50.urdf" use_fixed_base: True init_state: end_effector: position: [0.50, 0, 0.215]

p.getQuaternionFromEuler([0, np.pi, 0])

  orientation: [0.0, 1.0, 0.0, 0.0]
gripper_width: 0.11

pybullet_camera: cameraDistance: 0.6 cameraYaw: 15. cameraPitch: -20. cameraTargetPosition: [0.5, 0, 0.08] `

robertokcanale commented 2 years ago

Just an example of a bad grasp. Here I include an STL file as the URDF visual and collision Geometry, but i get nothing from it

grasp bad

wx405557858 commented 2 years ago

Would you give it a try in https://github.com/facebookresearch/tacto/blob/main/examples/demo_pybullet_digit.py It might be easier for debugging by dragging the object around.

It might be caused by the collision detection in PyBullet has some small difference with the one in PyRender. For debugging purposes:

robertokcanale commented 2 years ago

Thank you for your reply. I am trying to work with pybullet as suggested.

I am beginning to wonder if my issue is the .obj and .mtl files that I am using. Do you have any other valid examples of files that I could use? Or anything else in mind? As I tried to follow closely the provided examples, it just seems not to work