Skip to content

[BUG] multiple cloth grids in scene #557

@etaoxing

Description

@etaoxing

Bug Description

I'm upgrading Rewarped from warp-lang==1.3.3 to the nightly build warp-lang>1.6. Seems like I'm no longer able to spawn multiple cloth grids in the same scene without the simulation blowing up.

def create_cloth(self, builder):
      builder.add_cloth_grid(
          pos=wp.vec3(0.0, 0.0, 0.0),
          vel=wp.vec3(0.1, 0.1, 0.0),
          rot=wp.quat_from_axis_angle(wp.vec3(1.0, 0.0, 0.0), -math.pi * 0.25),
          dim_x=dim_x,
          dim_y=dim_y,
          cell_x=1.0 / dim_x,
          cell_y=1.0 / dim_y,
          mass=1.0,
          tri_ke=10000.0,
          tri_ka=10000.0,
          tri_kd=100.0,
          tri_lift=10.0,
          tri_drag=5.0,
      )

  def create_builder(self):
      builder = self.create_modelbuilder()
      env_builder = self.create_modelbuilder()
      self.create_cloth(env_builder)
      self.env_offsets = compute_env_offsets(self.num_envs, self.env_offset, self.env_offset_correction, self.up_axis)
      for i in range(self.num_envs):
          xform = wp.transform(self.env_offsets[i], wp.quat_identity())
          builder.add_builder(
              env_builder,
              xform,
              update_num_env_count=True,
              separate_collision_group=self.separate_collision_group_per_env,
          )
      return builder

Based on warp.examples.optim.cloth_throw_example.

Multiple instances of warp.examples.optim.walker still works with builder.add_soft_mesh(..)

System Information

on warp commit 92fabfd

Python 3.10, Ubuntu 22.04, cuda 12.5

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions