Replies: 3 comments 1 reply
-
|
Hi @ZisongXu, This is expected behavior based on your scene hierarchy setup. Let me explain what's happening. Understanding the Difference
In your code, the robots are located at:
The parent of each robot is the corresponding environment prim ( Why They're IdenticalIf your environment prims ( This happens because the parent's transform is the identity transform, so converting from world space to parent space doesn't change the values. How to VerifyAdd this diagnostic code to check your parent transforms: from pxr import UsdGeom, Usd
from isaacsim.core.utils.stage import get_current_stage
stage = get_current_stage()
for i in range(self._num_envs):
parent_prim = stage.GetPrimAtPath(f"/World/envs/env_{i}")
xform = UsdGeom.Xformable(parent_prim)
transform = xform.ComputeLocalToWorldTransform(Usd.TimeCode.Default())
print(f"env_{i} transform:\n{transform}")If all transforms are identity matrices (essentially all zeros except 1's on the diagonal), that confirms why local and world poses are the same. |
Beta Was this translation helpful? Give feedback.
-
|
Exactly! You've got it. 👍 To clarify one small detail: each In a typical Isaac Sim multi-environment setup, you'd use Example with GridClonerfrom isaacsim.core.utils.cloner import GridCloner
from pxr import UsdGeom
# Create grid cloner with 2-meter spacing
cloner = GridCloner(spacing=2.0)
cloner.define_base_env("/World/envs")
UsdGeom.Xform.Define(stage, "/World/envs/env_0")
# Add your Franka robot to env_0
add_reference_to_stage(
usd_path=assets_root_path + "/Isaac/Robots/FrankaRobotics/FrankaPanda/franka.usd",
prim_path="/World/envs/env_0/franka"
)
# Clone to create multiple environments
num_envs = 4
prim_paths = cloner.generate_paths("/World/envs/env", num_envs)
env_positions = cloner.clone(
source_prim_path="/World/envs/env_0",
prim_paths=prim_paths
)
# This will position environments at [0,0,0], [2,0,0], [4,0,0], [6,0,0]Result After Using GridClonerWith a robot at local position
Now you'd see the difference clearly! Your Current SetupIn your current setup without environment transforms:
This confirms everything is working as designed - you just need to add the spatial layout for your environments! |
Beta Was this translation helpful? Give feedback.
-
|
Hello! As there haven’t been any recent responses, we’re closing this issue or discussion to help keep our forum organized. If you’re still encountering this issue or have further questions, please feel free to open a new issue or discussion with updated details. When doing so, referencing or linking to this original discussion would be helpful for context. Thank you for contributing to the NVIDIA Isaac Sim community! Best regards, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Codes Below
I found that the results of robot_world_pos and robot_local_pos are the same. I don't know what happened here. Are there any bugs in the code? Please help me. Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions