@@ -236,32 +236,174 @@ 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:EXP_PATH = $expPath
321+ $env:RESOURCE_NAME = "IsaacSim"
322+
323+ Write-Host "Environment variables set:"
324+ Write-Host " ISAAC_PATH=$env:ISAAC_PATH"
325+ Write-Host " CARB_APP_PATH=$env:CARB_APP_PATH"
326+ Write-Host " EXP_PATH=$env:EXP_PATH"
327+
239328 # Set environment variables for headless mode
240329 $env:OMNI_KIT_ACCEPT_EULA = "yes"
241330 $env:ACCEPT_EULA = "Y"
242331 $env:ISAACSIM_ACCEPT_EULA = "YES"
332+ $env:HEADLESS = "1"
243333 $env:ISAAC_SIM_HEADLESS = "1"
244334 $env:ISAAC_SIM_LOW_MEMORY = "1"
245335 $env:PYTHONUNBUFFERED = "1"
246336 $env:PYTHONIOENCODING = "utf-8"
247337 $env:WINDOWS_PLATFORM = "true"
248338
249- # Additional Windows-specific environment variables for headless Isaac Sim
250- $env:CARB_APP_PATH = ""
251- $env:OMNI_KIT_FORCE_HEADLESS = "1"
339+ # Windows GPU/Rendering configuration for headless mode
340+ $env:OMNI_KIT_RENDERER = "rtx"
341+ $env:OMNI_KIT_ALLOW_ROOT = "1"
342+
343+ Write-Host "=== Checking GPU Availability ==="
344+ # Check if NVIDIA GPU is available
345+ $gpuCheck = nvidia-smi 2>&1
346+ if ($LASTEXITCODE -eq 0) {
347+ Write-Host "NVIDIA GPU detected:"
348+ Write-Host $gpuCheck
349+ } else {
350+ Write-Host "WARNING: No NVIDIA GPU detected or nvidia-smi not available"
351+ Write-Host "Isaac Sim may fail to initialize without GPU"
352+ }
252353
253354 Write-Host "=== Isaac Sim Installation Info ==="
254355 python -m pip show isaacsim
255356
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
357+ Write-Host "`n=== Verifying Environment Configuration ==="
358+
359+ Write-Host "Environment variables:"
360+ Write-Host " ISAAC_PATH: $env:ISAAC_PATH"
361+ Write-Host " CARB_APP_PATH: $env:CARB_APP_PATH"
362+ Write-Host " EXP_PATH: $env:EXP_PATH"
363+ Write-Host " HEADLESS: $env:HEADLESS"
259364
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."
365+ # Verify critical paths exist
366+ Write-Host "`nPath verification:"
367+ $pathsToCheck = @{
368+ "ISAAC_PATH" = $env:ISAAC_PATH
369+ "CARB_APP_PATH" = $env:CARB_APP_PATH
370+ "EXP_PATH" = $env:EXP_PATH
371+ }
372+
373+ foreach ($pathName in $pathsToCheck.Keys) {
374+ $pathValue = $pathsToCheck[$pathName]
375+ $exists = Test-Path $pathValue
376+ Write-Host " $pathName exists: $exists"
377+ if (-not $exists) {
378+ Write-Host " ERROR: $pathValue not found!"
379+ }
263380 }
264381
382+ # Verify EXP_PATH exists and contains app files
383+ if (Test-Path $env:EXP_PATH) {
384+ Write-Host "`nContents of EXP_PATH ($env:EXP_PATH):"
385+ $appFiles = Get-ChildItem $env:EXP_PATH -ErrorAction SilentlyContinue
386+ if ($appFiles) {
387+ $appFiles | ForEach-Object { Write-Host " - $($_.Name)" }
388+ } else {
389+ Write-Host " WARNING: EXP_PATH directory is empty!"
390+ }
391+ } else {
392+ Write-Host "ERROR: EXP_PATH does not exist: $env:EXP_PATH"
393+ }
394+
395+ # Check for required .kit files
396+ Write-Host "`nSearching for .kit files in EXP_PATH:"
397+ $kitFiles = Get-ChildItem -Path $env:EXP_PATH -Filter "*.kit" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 5
398+ if ($kitFiles) {
399+ $kitFiles | ForEach-Object { Write-Host " Found: $($_.FullName)" }
400+ } else {
401+ Write-Host " WARNING: No .kit files found! Isaac Sim may not initialize properly."
402+ }
403+
404+ Write-Host "`n=== Environment configuration complete ==="
405+ Write-Host "Note: Tests will now run. Isaac Sim initialization will be tested with first test."
406+
265407 # Set environment variables for test filtering
266408 $env:TEST_RESULT_FILE = "general-tests-windows-report.xml"
267409 $env:TEST_EXCLUDE_PATTERN = "isaaclab_tasks"
0 commit comments