Skip to content

Update policy inference script for VR-recorded datasets - #3

Draft
Ac31415 with Copilot wants to merge 1 commit into
copilot/integrate-vr-controls-lerobot-againfrom
copilot/update-policy-script-vr-controls
Draft

Ac31415 with Copilot wants to merge 1 commit into
copilot/integrate-vr-controls-lerobot-againfrom
copilot/update-policy-script-vr-controls

Conversation

Copilot AI commented Apr 14, 2026

Copy link
Copy Markdown

The existing policy script was built for velocity-based (keyboard/spacemouse) datasets. VR teleoperation records a fundamentally different action space — absolute Cartesian pose + gripper — requiring corresponding changes to inference-time action construction and robot commanding.

Action space changes

Old (velocity) New (VR/position)
Dims 6 (linear + angular twist) 8 (pos xyz + quat xyzw + gripper)
Control mode MODE_VELOCITY MODE_POSITION
Stiffness / Damping 100 / 40 60 / 50 (matches VR teleop)
Gripper /gripper_commands (hande_left_finger_joint)

Changes

  • Imports: replaced Twist with Pose; added Wrench (was missing) and JointState
  • __init__: creates self.gripper_pub on /gripper_commands
  • New method set_vr_cartesian_pose_target: replaces set_cartesian_twist_target; sends an absolute pose via MODE_POSITION with VR-matching impedance params and co-publishes the gripper JointState
  • insert_cable: slices the 8-dim unnormalized action — [0:3] position, [3:7] quaternion, [7] gripper — and dispatches via the new method
# Before — velocity twist, 6D
twist = Twist(linear=Vector3(x=action[0], ...), angular=Vector3(x=action[3], ...))
motion_update = self.set_cartesian_twist_target(twist)  # MODE_VELOCITY

# After — absolute pose, 8D
pose.position.{x,y,z}    = action[0:3]
pose.orientation.{x,y,z,w} = action[3:7]
gripper_pos               = action[7]
motion_update = self.set_vr_cartesian_pose_target(pose, gripper_pos)  # MODE_POSITION

…pper actions)

Agent-Logs-Url: https://github.com/Ac31415/aic/sessions/5fa4e163-4922-4c4f-bdda-a2a2eb989567

Co-authored-by: Ac31415 <21079375+Ac31415@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants