Skip to content

Commit a5a3ae7

Browse files
committed
Added more debugging
1 parent 350ab8b commit a5a3ae7

File tree

2 files changed

+232
-49
lines changed

2 files changed

+232
-49
lines changed

.github/workflows/build.yml

Lines changed: 177 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -236,40 +236,208 @@ 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
339+
# Windows GPU/Rendering configuration for headless mode
340+
$env:OMNI_KIT_RENDERER = "rtx"
341+
$env:OMNI_KIT_ALLOW_ROOT = "1"
342+
249343
# Additional Windows-specific environment variables for headless Isaac Sim
250-
$env:CARB_APP_PATH = ""
251-
$env:OMNI_KIT_FORCE_HEADLESS = "1"
344+
# These help with DLL loading and GPU access on Windows
345+
$env:OMNI_KIT_DISABLE_WATCHDOG = "1"
346+
$env:OMNI_KIT_TELEMETRY = "0"
347+
$env:OMNI_KIT_NO_WINDOW = "1"
348+
$env:CARB_LOGGING_SEVERITY = "error"
349+
350+
# Windows-specific: Ensure the kit/plugins directory is in PATH for DLL discovery
351+
$kitPluginsPath = Join-Path $env:CARB_APP_PATH "plugins"
352+
if (Test-Path $kitPluginsPath) {
353+
$env:PATH = "$kitPluginsPath;$env:PATH"
354+
Write-Host "Added kit plugins to PATH: $kitPluginsPath"
355+
}
356+
357+
# Add Isaac Sim bin directories to PATH for DLL discovery
358+
$isaacBinPath = Join-Path $env:ISAAC_PATH "bin"
359+
if (Test-Path $isaacBinPath) {
360+
$env:PATH = "$isaacBinPath;$env:PATH"
361+
Write-Host "Added Isaac Sim bin to PATH: $isaacBinPath"
362+
}
363+
364+
Write-Host "=== Checking GPU Availability ==="
365+
# Check if NVIDIA GPU is available
366+
$gpuCheck = nvidia-smi 2>&1
367+
if ($LASTEXITCODE -eq 0) {
368+
Write-Host "NVIDIA GPU detected:"
369+
Write-Host $gpuCheck
370+
} else {
371+
Write-Host "WARNING: No NVIDIA GPU detected or nvidia-smi not available"
372+
Write-Host "Isaac Sim may fail to initialize without GPU"
373+
}
252374
253375
Write-Host "=== Isaac Sim Installation Info ==="
254376
python -m pip show isaacsim
255377
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
378+
Write-Host "`n=== Verifying Environment Configuration ==="
379+
380+
Write-Host "Environment variables:"
381+
Write-Host " ISAAC_PATH: $env:ISAAC_PATH"
382+
Write-Host " CARB_APP_PATH: $env:CARB_APP_PATH"
383+
Write-Host " EXP_PATH: $env:EXP_PATH"
384+
Write-Host " HEADLESS: $env:HEADLESS"
385+
386+
# Verify critical paths exist
387+
Write-Host "`nPath verification:"
388+
$pathsToCheck = @{
389+
"ISAAC_PATH" = $env:ISAAC_PATH
390+
"CARB_APP_PATH" = $env:CARB_APP_PATH
391+
"EXP_PATH" = $env:EXP_PATH
392+
}
393+
394+
foreach ($pathName in $pathsToCheck.Keys) {
395+
$pathValue = $pathsToCheck[$pathName]
396+
$exists = Test-Path $pathValue
397+
Write-Host " $pathName exists: $exists"
398+
if (-not $exists) {
399+
Write-Host " ERROR: $pathValue not found!"
400+
}
401+
}
259402
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."
403+
# Verify EXP_PATH exists and contains app files
404+
if (Test-Path $env:EXP_PATH) {
405+
Write-Host "`nContents of EXP_PATH ($env:EXP_PATH):"
406+
$appFiles = Get-ChildItem $env:EXP_PATH -ErrorAction SilentlyContinue
407+
if ($appFiles) {
408+
$appFiles | ForEach-Object { Write-Host " - $($_.Name)" }
409+
} else {
410+
Write-Host " WARNING: EXP_PATH directory is empty!"
411+
}
412+
} else {
413+
Write-Host "ERROR: EXP_PATH does not exist: $env:EXP_PATH"
263414
}
264415
416+
# Check for required .kit files
417+
Write-Host "`nSearching for .kit files in EXP_PATH:"
418+
$kitFiles = Get-ChildItem -Path $env:EXP_PATH -Filter "*.kit" -Recurse -ErrorAction SilentlyContinue | Select-Object -First 5
419+
if ($kitFiles) {
420+
$kitFiles | ForEach-Object { Write-Host " Found: $($_.FullName)" }
421+
} else {
422+
Write-Host " WARNING: No .kit files found! Isaac Sim may not initialize properly."
423+
}
424+
425+
Write-Host "`n=== Environment configuration complete ==="
426+
Write-Host "All environment variables:"
427+
Get-ChildItem Env: | Where-Object { $_.Name -match "ISAAC|OMNI|CARB|HEADLESS|EXP_PATH" } | Format-Table -AutoSize
428+
265429
# Set environment variables for test filtering
266430
$env:TEST_RESULT_FILE = "general-tests-windows-report.xml"
267431
$env:TEST_EXCLUDE_PATTERN = "isaaclab_tasks"
268432
269433
Write-Host "`n=== Starting Test Execution ==="
434+
Write-Host "Running pytest with conftest.py custom test runner..."
435+
270436
# Run tests using conftest.py which handles Windows-specific execution
271437
& python -m pytest tools `
272-
-v
438+
-v `
439+
--tb=long `
440+
-s
273441
274442
$testExitCode = $LASTEXITCODE
275443
Write-Host "Tests completed with exit code: $testExitCode"

0 commit comments

Comments
 (0)