-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Describe the bug
When using body_state_w from an Articulation asset to retrieve the world-space position and orientation of a gripper body (e.g., left_outer_finger) in both training and play modes, the returned pose is incorrect — it consistently corresponds to the UR10’s wrist link (ee_link) rather than the actual gripper finger. This affects downstream tasks such as visualization, control, or reward computation that rely on accurate end-effector state.
Despite correct assembly and proper USD stage setup, the robot_asset.data.body_state_w tensor does not reflect the true simulated positions of gripper links post-assembly.
Steps to reproduce
-
Create a new Isaac Lab environment using:
./isaaclab.sh --new
Select:Workflow: Manager-based | single-agent
RL Library: skrl
Algorithm: PPO -
Install the pip package:
python -m pip install -e ~/repo/gripperPos0130/source/gripperPos0130 -
Assemble the robot arm with the gripper in Isaac Sim:
Launch simulator.
Load into an empty stage:
https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.1/Isaac/Robots/UniversalRobots/ur10/ur10.usdand
https://omniverse-content-production.s3-us-west-2.amazonaws.com/Assets/Isaac/5.1/Isaac/Robots/Robotiq/2F-140/Robotiq_2F_140_physics_edit.usd
Position UR10 at (0, 0, 0) via Translate. -
Use Tools > Robotics > Asset Editors > Robot Assembler with settings:
Base Robot: /World/ur10
Attach Point: ee_link
Attach Robot: /World/Robotiq_2F_140_physics_edit
Attach Point: robotiq_base_link
Namespace: Gripper
Rotate: Click "Z-90", then "Y-90" to orient gripper horizontally.
Click Assemble and Simulate, then End Simulation And Finish. -
Save the assembled scene to the project:
gripperPos0130/source/gripperPos0130/assets/UR102F140.usd -
Update configuration file
gripperpos0130_env_cfg.py:
Define the robot as an ArticulationCfg loading the saved USD.
Ensure proper assignment in scene, actions, events, rewards, terminations. -
Train the agent:
python ~/repo/gripperPos0130/scripts/skrl/train.py --task Template-Gripperpos0130-v0 -
Modify play.py to visualize gripper position: Add before
main():
from isaacsim.util.debug_draw import _debug_draw
from pxr import Gf
drawer = _debug_draw.acquire_debug_draw_interface()
Inside the simulation loop (after stepping):
drawer.clear_points()
sim_env = env.unwrapped
robot_asset = sim_env.scene["robot"]
left_finger_asset_id = robot_asset.find_bodies("left_outer_finger")[0]
left_finger_pos = robot_asset.data.body_state_w[0:1, left_finger_asset_id, :3].squeeze().cpu().tolist()
left_finger_pos_draw = [Gf.Vec3f(*left_finger_pos)]
drawer.draw_points(left_finger_pos_draw, [(1.0, 0.0, 0.0, 1)], [15.0])
Entire project:
gripperProject.zip
- Run play script:
python ~/repo/gripperPos0130/scripts/skrl/play.py --task Template-Gripperpos0130-v0
Expected Behavior: The red debug point should appear near the tip of the left finger of the Robotiq 2F-140 gripper.
Actual Behavior: The point remains fixed at the UR10 wrist location, indicating incorrect body state retrieval.
System Info
Describe the characteristic of your environment:
- Commit: N/A
- Isaac Sim Version: 5.1
- OS: Ubuntu 24.04
- GPU: RTX 5080
- CUDA: 13.0
- GPU Driver: 580.95.05
Additional context
Project and screenshots are uploaded to the attachements.
- The robot assembly appears visually correct in the stage.
- The find_bodies("left_outer_finger") call returns a valid index (non-zero), suggesting body parsing works.
Checklist
- [*] I have checked that there is no similar issue in the repo (required)
- [*] I have checked that the issue is not in running Isaac Sim itself and is related to the repo
Acceptance Criteria
Add the criteria for which this task is considered done. If not known at issue creation time, you can add this once the issue is assigned.
- Correct world-space position of left_outer_finger (and other gripper bodies) is retrievable via body_state_w.
- Debug drawing shows the point moving with the actual gripper fingertip during motion.