ScheiklP / sofa_env

Reinforcement learning environments for robot-assisted laparoscopic surgery
MIT License
47 stars 14 forks source link

Texture for deformable objects #26

Closed saketh2002 closed 4 months ago

saketh2002 commented 4 months ago

Just wanted to know if the png files of wood in the pick and place task could be used for deformable objects. I have tried using it for rigid objects and it worked, but faced issues with deformable objects.

ScheiklP commented 4 months ago

Hi @saketh2002 , yes, deformable objects and textures work. As an example, see the tissue retraction scene, with texture objects set to True. https://github.com/ScheiklP/sofa_env/blob/main/sofa_env/scenes/tissue_retraction/tissue_retraction_env.py#L689

However, you probably have to do some uv unwrapping for your surface mesh. https://en.wikipedia.org/wiki/UV_mapping#:~:text=map%20with%20coordinates-,UV%20unwrapping,-%5Bedit%5D

For example with blender. https://docs.blender.org/manual/en/2.79/editors/uv_image/uv/editing/unwrapping/mapping_types.html#unwrap

Cheers, Paul