Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed Hollow Block Collides and Flies Away When Dropped #570

Open
Richal13Yu opened this issue Jan 14, 2025 · 4 comments
Open

Fixed Hollow Block Collides and Flies Away When Dropped #570

Richal13Yu opened this issue Jan 14, 2025 · 4 comments

Comments

@Richal13Yu
Copy link

I encountered an issue while using Genesis to simulate a fixed hollow block dropped onto a column. When I attach the hollow block to the column(fixed=True), everything works as expected. However, if I drop the hollow block from a higher position:

  • It collides with the column.
  • Instead of dropping to the bottom of the column as expected, it flies away unexpectedly.
@Richal13Yu
Copy link
Author

hi, I saw the issue==444, and tried it in my code, but it still fails to convert my nonconvex item.

webwxgetmsgimg
here is my code.

board_surface = gs.surfaces.Glass(color=(0.8, 1.0, 0.0),vis_mode='collision')
block_surface = gs.surfaces.Plastic(color=(1.0, 0.0,0.8),vis_mode='collision')

coacd_options=gs.options.CoacdOptions(threshold=0.1, preprocess_resolution=10)

pos_block=np.array([0.033, 0.05075, 0.08])
pos_block[0]-=0.077
pos_block[1]-=0.0515
block = scene.add_entity(

gs.morphs.Mesh(file='stl/block.stl',
               pos=pos_block,
               fixed = True,
               decompose_nonconvex = 1,
               coacd_options = coacd_options,
               ),
surface = block_surface

)
board = scene.add_entity(
gs.morphs.Mesh(file='stl/board.stl',
fixed = True,
pos=[0,0,0.02],
decompose_nonconvex=1,
coacd_options=coacd_options,
),
surface = board_surface
)

@zhouxian
Copy link
Collaborator

Do you have a video?

@Richal13Yu
Copy link
Author

Do you have a video?

Sure! The block shoud fall in the boards' collomn, but they maybe loaded wrong

nocoacd_options.webm
coacd_options.webm

@wangyian-me
Copy link
Collaborator

First of all, set preprocess_resolution=100 to better preserve the original geometry.
Secondly, the coacd is not guaranteed to fully preserve geometry even when preprocess_resolution=100, you might want to use the sdf based contact in this case. Adjusting the sdf resolution might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants