Skip to content

Remove duplicate vr_monitor.py and fix imports#4

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/remove-duplicate-vr-monitor-file
Draft

Remove duplicate vr_monitor.py and fix imports#4
Copilot wants to merge 2 commits into
mainfrom
copilot/remove-duplicate-vr-monitor-file

Conversation

Copy link
Copy Markdown

Copilot AI commented Oct 8, 2025

Problem

The repository contained two nearly identical copies of vr_monitor.py:

  • XLeVR/vr_monitor.py (canonical version with English comments)
  • simulation/Maniskill/examples/vr_monitor.py (duplicate with Chinese comments)

This duplication created maintenance overhead and confusion about which file to use or modify. Additionally, the import paths in various scripts used hardcoded absolute paths that were system-specific (e.g., /home/vec/lerobot/mani_skill/examples), making the code non-portable.

Solution

This PR removes the duplicate file and updates all imports to use repository-relative paths:

  1. Removed duplicate: Deleted simulation/Maniskill/examples/vr_monitor.py (387 lines)

  2. Fixed imports: Updated demo_ctrl_action_ee_VR.py and 8_xlerobot_teleop_vr.py to use relative paths:

    repo_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))
    sys.path.insert(0, os.path.join(repo_root, "XLeVR"))
    from vr_monitor import VRMonitor
  3. Updated documentation: Fixed both English and Chinese documentation to reflect the correct import pattern

Benefits

  • ✅ Single source of truth for VR monitor code in XLeVR/vr_monitor.py
  • ✅ Portable imports that work across different installations
  • ✅ No more hardcoded system-specific paths
  • ✅ Easier maintenance with no code duplication

All imports have been tested and verified to work correctly from both software/examples/ and simulation/Maniskill/examples/ directories.

Original prompt

This section details on the original issue you should resolve

<issue_title>Duplicate vr_monitor.py</issue_title>
<issue_description></issue_description>

Comments on the Issue (you are @copilot in this section)

Fixes #3

💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Co-authored-by: tc-huang <137322177+tc-huang@users.noreply.github.com>
Copilot AI changed the title [WIP] Remove duplicate vr_monitor.py file from repository Remove duplicate vr_monitor.py and fix imports Oct 8, 2025
Copilot AI requested a review from tc-huang October 8, 2025 04:28
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.

Duplicate vr_monitor.py

2 participants