@@ -236,40 +236,219 @@ jobs:
236236 # Create reports directory
237237 New-Item -ItemType Directory -Force -Path "reports" | Out-Null
238238
239+ # Get Isaac Sim installation path from pip (without importing isaacsim which would bootstrap Kit)
240+ Write-Host "=== Detecting Isaac Sim Installation Path ==="
241+
242+ # Get the isaacsim-kernel package location which contains the actual Isaac Sim files
243+ $pipShowOutput = python -m pip show isaacsim-kernel 2>&1 | Out-String
244+ Write-Host "pip show isaacsim-kernel output:"
245+ Write-Host $pipShowOutput
246+
247+ $locationLine = $pipShowOutput -split "`n" | Where-Object { $_ -match "^Location:" }
248+
249+ if (-not $locationLine) {
250+ Write-Host "ERROR: Failed to detect Isaac Sim installation path from pip"
251+ Write-Host "Trying alternate method..."
252+
253+ # Try getting it from isaacsim package
254+ $pipShowOutput = python -m pip show isaacsim 2>&1 | Out-String
255+ Write-Host "pip show isaacsim output:"
256+ Write-Host $pipShowOutput
257+ $locationLine = $pipShowOutput -split "`n" | Where-Object { $_ -match "^Location:" }
258+ }
259+
260+ if (-not $locationLine) {
261+ Write-Host "ERROR: Could not find Isaac Sim installation"
262+ exit 1
263+ }
264+
265+ # Extract the location path (format: "Location: C:\path\to\site-packages")
266+ $sitePackagesPath = ($locationLine -split "Location: ", 2)[1].Trim()
267+ Write-Host "Site-packages path: $sitePackagesPath"
268+
269+ # Look for Isaac Sim directory structure
270+ # When installed via pip, Isaac Sim might be in site-packages/isaacsim-* or directly in a isaacsim folder
271+ $possiblePaths = @(
272+ (Get-ChildItem -Path $sitePackagesPath -Directory -Filter "isaacsim-*" -ErrorAction SilentlyContinue | Select-Object -First 1),
273+ (Join-Path $sitePackagesPath "isaacsim"),
274+ (Join-Path $sitePackagesPath "isaacsim_kernel")
275+ )
276+
277+ $isaacsimPath = $null
278+ foreach ($path in $possiblePaths) {
279+ if ($path -and (Test-Path $path)) {
280+ Write-Host "Checking path: $path"
281+ # Check if this looks like the Isaac Sim root (has kit or apps directory)
282+ if ((Test-Path (Join-Path $path "kit")) -or (Test-Path (Join-Path $path "apps"))) {
283+ $isaacsimPath = if ($path -is [System.IO.FileSystemInfo]) { $path.FullName } else { $path }
284+ Write-Host "Found Isaac Sim root at: $isaacsimPath"
285+ break
286+ }
287+ }
288+ }
289+
290+ if (-not $isaacsimPath) {
291+ Write-Host "ERROR: Could not find Isaac Sim installation with kit/apps directories"
292+ Write-Host "Searched locations:"
293+ foreach ($path in $possiblePaths) {
294+ if ($path) {
295+ $pathStr = if ($path -is [System.IO.FileSystemInfo]) { $path.FullName } else { $path }
296+ Write-Host " - $pathStr (exists: $(Test-Path $pathStr))"
297+ }
298+ }
299+ Write-Host "`nDirectory contents of site-packages:"
300+ Get-ChildItem $sitePackagesPath -Directory | ForEach-Object { Write-Host " - $($_.Name)" }
301+ exit 1
302+ }
303+
304+ Write-Host "Isaac Sim installation at: $isaacsimPath"
305+
306+ # Verify critical directories exist
307+ $expPath = Join-Path $isaacsimPath "apps"
308+ $carbPath = Join-Path $isaacsimPath "kit"
309+
310+ if (-not (Test-Path $expPath)) {
311+ Write-Host "WARNING: EXP_PATH directory not found: $expPath"
312+ }
313+ if (-not (Test-Path $carbPath)) {
314+ Write-Host "WARNING: CARB_APP_PATH directory not found: $carbPath"
315+ }
316+
317+ # Set required Isaac Sim environment variables (same as isaaclab.bat does)
318+ $env:ISAAC_PATH = $isaacsimPath
319+ $env:CARB_APP_PATH = $carbPath
320+ $env:RESOURCE_NAME = "IsaacSim"
321+
322+ # IMPORTANT: EXP_PATH should point to IsaacLab's apps directory, not Isaac Sim's
323+ # IsaacLab has its own .kit files in the workspace apps/ directory
324+ $workspaceAppsPath = Join-Path $PWD "apps"
325+ if (Test-Path $workspaceAppsPath) {
326+ $env:EXP_PATH = $workspaceAppsPath
327+ Write-Host "Using IsaacLab apps directory: $env:EXP_PATH"
328+ } else {
329+ # Fallback to Isaac Sim apps if IsaacLab apps not found
330+ $env:EXP_PATH = $expPath
331+ Write-Host "WARNING: IsaacLab apps directory not found, using Isaac Sim apps: $env:EXP_PATH"
332+ }
333+
334+ Write-Host "Environment variables set:"
335+ Write-Host " ISAAC_PATH=$env:ISAAC_PATH"
336+ Write-Host " CARB_APP_PATH=$env:CARB_APP_PATH"
337+ Write-Host " EXP_PATH=$env:EXP_PATH"
338+
239339 # Set environment variables for headless mode
240340 $env:OMNI_KIT_ACCEPT_EULA = "yes"
241341 $env:ACCEPT_EULA = "Y"
242342 $env:ISAACSIM_ACCEPT_EULA = "YES"
343+ $env:HEADLESS = "1"
243344 $env:ISAAC_SIM_HEADLESS = "1"
244345 $env:ISAAC_SIM_LOW_MEMORY = "1"
245346 $env:PYTHONUNBUFFERED = "1"
246347 $env:PYTHONIOENCODING = "utf-8"
247348 $env:WINDOWS_PLATFORM = "true"
248349
350+ # Windows GPU/Rendering configuration for headless mode
351+ $env:OMNI_KIT_RENDERER = "rtx"
352+ $env:OMNI_KIT_ALLOW_ROOT = "1"
353+
249354 # Additional Windows-specific environment variables for headless Isaac Sim
250- $env:CARB_APP_PATH = ""
251- $env:OMNI_KIT_FORCE_HEADLESS = "1"
355+ # These help with DLL loading and GPU access on Windows
356+ $env:OMNI_KIT_DISABLE_WATCHDOG = "1"
357+ $env:OMNI_KIT_TELEMETRY = "0"
358+ $env:OMNI_KIT_NO_WINDOW = "1"
359+ $env:CARB_LOGGING_SEVERITY = "error"
360+
361+ # Windows-specific: Ensure the kit/plugins directory is in PATH for DLL discovery
362+ $kitPluginsPath = Join-Path $env:CARB_APP_PATH "plugins"
363+ if (Test-Path $kitPluginsPath) {
364+ $env:PATH = "$kitPluginsPath;$env:PATH"
365+ Write-Host "Added kit plugins to PATH: $kitPluginsPath"
366+ }
367+
368+ # Add Isaac Sim bin directories to PATH for DLL discovery
369+ $isaacBinPath = Join-Path $env:ISAAC_PATH "bin"
370+ if (Test-Path $isaacBinPath) {
371+ $env:PATH = "$isaacBinPath;$env:PATH"
372+ Write-Host "Added Isaac Sim bin to PATH: $isaacBinPath"
373+ }
374+
375+ Write-Host "=== Checking GPU Availability ==="
376+ # Check if NVIDIA GPU is available
377+ $gpuCheck = nvidia-smi 2>&1
378+ if ($LASTEXITCODE -eq 0) {
379+ Write-Host "NVIDIA GPU detected:"
380+ Write-Host $gpuCheck
381+ } else {
382+ Write-Host "WARNING: No NVIDIA GPU detected or nvidia-smi not available"
383+ Write-Host "Isaac Sim may fail to initialize without GPU"
384+ }
252385
253386 Write-Host "=== Isaac Sim Installation Info ==="
254387 python -m pip show isaacsim
255388
256- Write-Host "`n=== Testing Isaac Sim Import ==="
257- $importTest = python -c "import sys; print('Python version:', sys.version); print('Python path:', sys.executable); import isaacsim; print('Isaac Sim imported successfully')" 2>&1
258- Write-Host $importTest
389+ Write-Host "`n=== Verifying Environment Configuration ==="
259390
260- if ($LASTEXITCODE -ne 0) {
261- Write-Host "ERROR: Isaac Sim import failed with exit code: $LASTEXITCODE"
262- Write-Host "This indicates Isaac Sim is not properly installed or configured."
391+ Write-Host "Environment variables:"
392+ Write-Host " ISAAC_PATH: $env:ISAAC_PATH"
393+ Write-Host " CARB_APP_PATH: $env:CARB_APP_PATH"
394+ Write-Host " EXP_PATH: $env:EXP_PATH"
395+ Write-Host " HEADLESS: $env:HEADLESS"
396+
397+ # Verify critical paths exist
398+ Write-Host "`nPath verification:"
399+ $pathsToCheck = @{
400+ "ISAAC_PATH" = $env:ISAAC_PATH
401+ "CARB_APP_PATH" = $env:CARB_APP_PATH
402+ "EXP_PATH" = $env:EXP_PATH
263403 }
264404
405+ foreach ($pathName in $pathsToCheck.Keys) {
406+ $pathValue = $pathsToCheck[$pathName]
407+ $exists = Test-Path $pathValue
408+ Write-Host " $pathName exists: $exists"
409+ if (-not $exists) {
410+ Write-Host " ERROR: $pathValue not found!"
411+ }
412+ }
413+
414+ # Verify EXP_PATH exists and contains app files
415+ if (Test-Path $env:EXP_PATH) {
416+ Write-Host "`nContents of EXP_PATH ($env:EXP_PATH):"
417+ $appFiles = Get-ChildItem $env:EXP_PATH -ErrorAction SilentlyContinue
418+ if ($appFiles) {
419+ $appFiles | ForEach-Object { Write-Host " - $($_.Name)" }
420+ } else {
421+ Write-Host " WARNING: EXP_PATH directory is empty!"
422+ }
423+ } else {
424+ Write-Host "ERROR: EXP_PATH does not exist: $env:EXP_PATH"
425+ }
426+
427+ # Check for required .kit files
428+ Write-Host "`nSearching for .kit files in EXP_PATH:"
429+ $kitFiles = Get-ChildItem -Path $env:EXP_PATH -Filter "*.kit" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 5
430+ if ($kitFiles) {
431+ $kitFiles | ForEach-Object { Write-Host " Found: $($_.FullName)" }
432+ } else {
433+ Write-Host " WARNING: No .kit files found! Isaac Sim may not initialize properly."
434+ }
435+
436+ Write-Host "`n=== Environment configuration complete ==="
437+ Write-Host "All environment variables:"
438+ Get-ChildItem Env: | Where-Object { $_.Name -match "ISAAC|OMNI|CARB|HEADLESS|EXP_PATH" } | Format-Table -AutoSize
439+
265440 # Set environment variables for test filtering
266441 $env:TEST_RESULT_FILE = "general-tests-windows-report.xml"
267442 $env:TEST_EXCLUDE_PATTERN = "isaaclab_tasks"
268443
269444 Write-Host "`n=== Starting Test Execution ==="
445+ Write-Host "Running pytest with conftest.py custom test runner..."
446+
270447 # Run tests using conftest.py which handles Windows-specific execution
271448 & python -m pytest tools `
272- -v
449+ -v `
450+ --tb=long `
451+ -s
273452
274453 $testExitCode = $LASTEXITCODE
275454 Write-Host "Tests completed with exit code: $testExitCode"
0 commit comments