I have just upgraded to Isaac 2023.1.1 from the 2023.1.0-bugfix version-
What I am seeing is a probable issue with ArticulationView, and I didn’t see anything in the release notes associated to this, so I assume this is not an expected behavior.
The following is a simple example script I have put up to reproduce the issue. The script works flawlessly in Isaac2023.1.0-bugfix, while it throws the error
2023-12-26 17:13:51 [16,525ms] [Error] [omni.physx.tensors.plugin] Pattern '/World/envs/env_*/panda' did not match any articulations
when running on Isaac2023.1.1 .
# Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
#
from omni.isaac.kit import SimulationApp
simulation_app = SimulationApp({"headless": False})
import numpy as np
from omni.isaac.core import World
from omni.isaac.core.articulations import ArticulationView
from omni.importer.urdf import _urdf
# urdf import config
import_config = _urdf.ImportConfig()
import_config.merge_fixed_joints = True
import_config.import_inertia_tensor = True
import_config.fix_base = True
import_config.self_collision = False
my_world = World(stage_units_in_meters=1.0)
my_world.scene.add_default_ground_plane()
# create initial robot
import omni.isaac.core.utils.prims as prim_utils
# create GridCloner instance
env_ns = "/World/envs"
template_env_ns = env_ns + "/env" # a single env. may contain multiple robots
base_env = template_env_ns + "_0"
base_robot_path = base_env + "/panda"
# get path to resource
from omni.isaac.core.utils.extensions import get_extension_path_from_name
extension_path = get_extension_path_from_name("omni.importer.urdf")
# import URDF at default prim path
import omni.kit
success, robot_prim_path_default = omni.kit.commands.execute(
"URDFParseAndImportFile",
urdf_path=extension_path + "/data/urdf/robots/franka_description/robots/panda_arm.urdf",
import_config=import_config,
)
# moving default prim to base prim path (for potential cloning)
from omni.isaac.core.utils.prims import move_prim
prim_utils.define_prim(base_env)
move_prim(robot_prim_path_default, # from
base_robot_path) # to
# cloning
from omni.isaac.cloner import GridCloner
cloner = GridCloner(spacing=2)
num_envs = 4
target_paths = cloner.generate_paths(template_env_ns, num_envs)
position_offsets = np.array([[0, 0, 1]] * num_envs)
cloner.clone(
source_prim_path=base_env,
prim_paths=target_paths,
position_offsets=position_offsets,
replicate_physics=True,
base_env_path=env_ns,
)
# Prim paths structure:
# World/envs/env_0/panda/panda_link0/...
# this works in both
# art_view = ArticulationView(name = "Panda" + "ArtView",
# prim_paths_expr = env_ns + "/env_.*"+ "/panda/panda_link0",
# reset_xform_properties=False # required as per doc. when cloning
# )
# this only in 2023.1.0
art_view = ArticulationView(name = "Panda" + "ArtView",
prim_paths_expr = env_ns + "/env_.*"+ "/panda",
reset_xform_properties=False # required as per doc. when cloning
)
# moreover, robots are not cloned at different locations
my_world.scene.add(art_view)
print("Extension path: " + str(extension_path))
print("Prim paths: " + str(art_view.prim_paths))
my_world.reset()
for i in range(0, 100000):
print(art_view.get_world_poses())
my_world.step()
simulation_app.close()
Here I am simply importing a Panda robot from urdf, moving it to a base prim path and then cloning it with the GridCloner. After that, I create a view of the Panda robot across all environments.
What happens is that, when the world.reset() is called, all the articulation views in the scene are initialized, and this steps fails for some reason.
I am able to run if, instead of providing the env_ns + “/env_."+ “/panda” path to the ArticulationView, I give it the first link of the arm, i.e. env_ns + "/env_.”+ “/panda/panda_link0”.
Something is probably wrong or, at least, an undocumented change happened there.
Also, another thing that I noticed is that the grid cloner is spawning all the robots at the same location in Isaac2023.1.1, while in 2023.1.0-bugfix the spacing works.
Can someone reproduce the issue with my script? Any fixes/explanation for this behavior?