eanswer / TactileSimulation

[CoRL 2022] Efficient Tactile Simulation with Differentiability for Robotic Manipulation
https://people.csail.mit.edu/jiex/papers/TactileSim/index.html
63 stars 4 forks source link

Tactile sensing using OBJ model #3

Closed Rancho-zhao closed 10 months ago

Rancho-zhao commented 1 year ago

Hello, I have tested the primitive bodies like sphere, cuboid and cylinder using your method, which performs well. However, when I using my own OBJ models, I find the penetrotion issue occurs as the figure shows and there is no marker displacement. The following codes are some my changes in tactile_pad.xml. So, how can I do to tackle this issue?

    <robot>
        <link name="object">
            <joint name="object_joint" type="fixed" pos="0. 0. 0.02" quat="1 0 0 0"/>
            <body name="object" type="mesh" filename="sphere.obj" scale="0.003 0.003 0.003" pos="0 0 0" quat="1 0 0 0" rgba="0.7 0.7 0.7 1"/>
        </link>
    </robot>
    <contact>
        <ground_contact body="object" kn="5e3" kt="1" mu="0.8" damping="0.03"/>
        <general_primitive_contact general_body="object" primitive_body="pad_body"/>
    </contact>

image

eanswer commented 1 year ago

Hi, the current simulator only supports tactile computation against a primitive body since we require the object to have SDF query interface. In the script you provide, there are two issues: (1) penetration issue (2) no tactile reading.

For issue (1), this is because you switch the pad to the primitive body and the mesh to be the general body (this is great) but some contact parameters has to be changed accordingly due to the sensitiveness of penalty-based contact model. Please try to modify the kn value of the general_primitive_contact. In this line, you can try to increase kn from 5 to 500 and see whether the penetration is still there.

For issue (2), the current simulation does not support that. Someone else has implemented the SDF mesh body in an MR to DiffHand repo (https://github.com/eanswer/DiffHand/pull/4), you may refer to that implementation.