Thanks, @toni.sm !
I will change the USD files with your files.
However, I cannot apply gravity and cannot change dynamic primitive shapes to DynamicCylinder. The strange thing is that I can import DynamicCuboid. I just changed target in def get_target(self): in the environment file.
target = DynamicCylinder(
prim_path=self.default_zero_env_path + "/target",
name="target",
scale=np.array([0.03, 0.03, 0.03]),
color=torch.tensor([1, 0, 0]),
density=100,
# mass=0.1,
)
target = DynamicCuboid(
prim_path=self.default_zero_env_path + "/target",
name="target",
scale=np.array([0.03, 0.03, 0.03]),
color=torch.tensor([1, 0, 0]),
density=100,
# mass=0.1,
)
I also cannot apply gravity even if I add target.enable_rigid_body_physics() and set "fixed_base": False,.
Here is what I tried at def get_target(self):.
def get_target(self):
target = DynamicSphere(prim_path=self.default_zero_env_path + "/target",
name="target",
radius=0.025,
color=torch.tensor([1, 0, 0]),
)
target.set_density(0.5)
target.set_mass(0.1)
target.set_collision_enabled(True)
target.enable_rigid_body_physics()
self._sim_config.apply_articulation_settings("target", get_prim_at_path(target.prim_path), self._sim_config.parse_actor_config("target"))
At version 22.2.0, I can change shape and apply gravity with "fixed_base": False, from the config setup.