Skip to content

Commit 85befb6

Browse files
ayoub-belarbipreist-nvidia
authored andcommitted
PhysX SDK 5.3.1 (e9cf8e18b)
1 parent b7182d5 commit 85befb6

File tree

97 files changed

+2109
-924
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

97 files changed

+2109
-924
lines changed

physx/CHANGELOG.md

+84-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,87 @@
1-
# v5.3.0
1+
# v5.3.1-105.1
2+
3+
## General
4+
5+
### Changed
6+
7+
* PxgDynamicsMemoryConfig::tempBufferCapacity will now be interpreted as a user-provided initial size, and will resize automatically if more memory is needed.
8+
9+
### Fixed
10+
11+
* A bug that led to phantom collisions for convex-heightfield interactions on GPU has been fixed.
12+
* A bug that caused velocity and impulse updates of the GPU articulation solver (PGS and TGS) not to be propagated to subsequent iterations, causing slower convergence and potentially unstable collision responses between rigids and articulations.
13+
* Fixed binary serialization for GPU enabled triangle meshes and meshes with SDF support.
14+
* Several bugs with GPU aggregates have been fixed that could have led to missed and phantom collisions. The issues were mostly related to additions/removals of aggregate contents.
15+
* Gpu accelerated SDF cooking is now deterministic.
16+
* SDF snippet shows how to optionally store cooked data into files.
17+
* Small improvements to SDF collisions, especially when objects with wildly different size collide.
18+
* Creating objects from a PxInputData containing invalid data could lead to a confusing (and incorrect) error message about a "double deletion". This has been fixed.
19+
* Bugs in island management related to actors other than rigid bodies.
20+
* A bug that could lead to a crash when calling the PxTetMaker::validateTriangleMesh function with a mesh referencing more vertices than passed into the function. That defect is now reported as eTRIANGLE_INDEX_OUT_OF_RANGE.
21+
* A crash bug that appeared when releasing actors with externally-provided forces and torques has been fixed. [Issue #211](https://github.com/NVIDIA-Omniverse/PhysX/issues/211)
22+
* A bug that caused a memory corruption in the GPU solver when using D6 joints with rigid bodies and articulations has been fixed.
23+
24+
## Rigid Body
25+
26+
### Added
27+
28+
* The extraction of an isosurface from a SDF can now use multiple CPU cores.
29+
30+
### Fixed
31+
32+
* A crash happening when using contact report thresholds with point-friction (PxFrictionType::eONE_DIRECTIONAL / PxFrictionType::eTWO_DIRECTIONAL) has been fixed.
33+
* A "fear of the wireframe" issue in Sphere vs TriangleMesh collision when simulating on GPU is fixed.
34+
35+
## Articulations
36+
37+
### Fixed
38+
39+
* Articulation joint velocity limits are respected when articulation joint drives are configured to push past the limit.
40+
* Spherical articulation joints could sometimes flip their position by 2 pi causing problems with joint limits. This has been fixed.
41+
42+
## Joints
43+
44+
### Fixed
45+
46+
* The PxConstraintFlag::eENABLE_EXTENDED_LIMITS flag now works properly for D6 based revolute joints when the GPU pipeline with the TGS solver is active.
47+
48+
## Character controller
49+
50+
### Fixed
51+
52+
* You can now only create one PxCreateControllerManager per PxScene. This avoids filtering-related issues when multiple controller managers are created for the same PxScene.
53+
54+
## Particles
55+
56+
### Added
57+
58+
* PxParticleSystem::getParticleMaterials() to query materials that have been registered with phases.
59+
60+
### Fixed
61+
62+
* PxParticleSystem::getNbParticleMaterials() always returned 1, instead of the materials referenced by phases.
63+
* Particle - Convex Shape collisions failing with spread out particles.
64+
* Particle phase references to PxPBDMaterial were broken when releasing (an unreferenced) PxPBDMaterial.
65+
66+
## Pvd
67+
68+
### Added
69+
70+
* A way to get a thread safe OmniPvd writer from the PxOmniPvd interface through using acquireExclusiveWriterAccess() and releaseExclusiveWriterAccess().
71+
72+
### Fixed
73+
74+
* OmniPVD no longer breaks when running and recording multiple scenes in parallel.
75+
* Corrected mirroring of the inbountJoinDOF attribute of PxArticulationLink
76+
77+
## Extensions
78+
79+
### Fixed
80+
81+
* A bug in custom cone/cylinder collision with triangle meshes. There was a gap between a cone/cylinder and a mesh, noticeable for centimeter-scale shapes. Note that the last position argument of e.g.: PxCustomGeometryExt::CylinderCallbacks::useSubstituteGeometry was removed from the API.
82+
83+
84+
# v5.3.0-105.1
285

386
## Supported Platforms
487

physx/buildtools/packman/bootstrap/configure.bat

+18-23
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:: Copyright 2019 NVIDIA CORPORATION
1+
:: Copyright 2019-2023 NVIDIA CORPORATION
22
::
33
:: Licensed under the Apache License, Version 2.0 (the "License");
44
:: you may not use this file except in compliance with the License.
@@ -12,7 +12,7 @@
1212
:: See the License for the specific language governing permissions and
1313
:: limitations under the License.
1414

15-
set PM_PACKMAN_VERSION=6.33.2
15+
set PM_PACKMAN_VERSION=7.15.1
1616

1717
:: Specify where packman command is rooted
1818
set PM_INSTALL_PATH=%~dp0..
@@ -48,7 +48,7 @@ echo.
4848
:: that may be needed in the path
4949
:ENSURE_DIR
5050
if not exist "%PM_PACKAGES_ROOT%" (
51-
echo Creating directory %PM_PACKAGES_ROOT%
51+
echo Creating packman packages cache at %PM_PACKAGES_ROOT%
5252
mkdir "%PM_PACKAGES_ROOT%"
5353
)
5454
if %errorlevel% neq 0 ( goto ERROR_MKDIR_PACKAGES_ROOT )
@@ -59,7 +59,7 @@ if defined PM_PYTHON_EXT (
5959
goto PACKMAN
6060
)
6161

62-
set PM_PYTHON_VERSION=3.7.9-windows-x86_64
62+
set PM_PYTHON_VERSION=3.10.5-1-windows-x86_64
6363
set PM_PYTHON_BASE_DIR=%PM_PACKAGES_ROOT%\python
6464
set PM_PYTHON_DIR=%PM_PYTHON_BASE_DIR%\%PM_PYTHON_VERSION%
6565
set PM_PYTHON=%PM_PYTHON_DIR%\python.exe
@@ -95,11 +95,16 @@ if exist "%PM_PYTHON%" (
9595
if exist "%PM_PYTHON_DIR%" ( rd /s /q "%PM_PYTHON_DIR%" > nul )
9696
)
9797

98-
:: Perform atomic rename
99-
rename "%TEMP_FOLDER_NAME%" "%PM_PYTHON_VERSION%" 1> nul
100-
:: Failure during move, need to clean up and abort
98+
:: Perform atomic move (allowing overwrite, /y)
99+
move /y "%TEMP_FOLDER_NAME%" "%PM_PYTHON_DIR%" 1> nul
100+
:: Verify that python.exe is now where we expect
101+
if exist "%PM_PYTHON%" goto PACKMAN
102+
103+
:: Wait a second and try again (can help with access denied weirdness)
104+
timeout /t 1 /nobreak 1> nul
105+
move /y "%TEMP_FOLDER_NAME%" "%PM_PYTHON_DIR%" 1> nul
101106
if %errorlevel% neq 0 (
102-
echo !!! Error renaming python !!!
107+
echo !!! Error moving python %TEMP_FOLDER_NAME% -> %PM_PYTHON_DIR% !!!
103108
call :CLEAN_UP_TEMP_FOLDER
104109
goto ERROR
105110
)
@@ -112,9 +117,12 @@ if defined PM_MODULE_DIR_EXT (
112117
set PM_MODULE_DIR=%PM_PACKAGES_ROOT%\packman-common\%PM_PACKMAN_VERSION%
113118
)
114119

115-
set PM_MODULE=%PM_MODULE_DIR%\packman.py
120+
set PM_MODULE=%PM_MODULE_DIR%\run.py
116121

117-
if exist "%PM_MODULE%" goto ENSURE_7ZA
122+
if exist "%PM_MODULE%" goto END
123+
124+
:: Clean out broken PM_MODULE_DIR if it exists
125+
if exist "%PM_MODULE_DIR%" ( rd /s /q "%PM_MODULE_DIR%" > nul )
118126

119127
set PM_MODULE_PACKAGE=packman-common@%PM_PACKMAN_VERSION%.zip
120128
for /f "delims=" %%a in ('powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0\generate_temp_file_name.ps1"') do set TEMP_FILE_NAME=%%a
@@ -134,19 +142,6 @@ if %errorlevel% neq 0 (
134142

135143
del "%TARGET%"
136144

137-
:ENSURE_7ZA
138-
set PM_7Za_VERSION=16.02.4
139-
set PM_7Za_PATH=%PM_PACKAGES_ROOT%\7za\%PM_7ZA_VERSION%
140-
if exist "%PM_7Za_PATH%" goto END
141-
set PM_7Za_PATH=%PM_PACKAGES_ROOT%\chk\7za\%PM_7ZA_VERSION%
142-
if exist "%PM_7Za_PATH%" goto END
143-
144-
"%PM_PYTHON%" -S -s -u -E "%PM_MODULE%" pull "%PM_MODULE_DIR%\deps.packman.xml"
145-
if %errorlevel% neq 0 (
146-
echo !!! Error fetching packman dependencies !!!
147-
goto ERROR
148-
)
149-
150145
goto END
151146

152147
:ERROR_MKDIR_PACKAGES_ROOT

physx/buildtools/packman/bootstrap/download_file_from_url.ps1

+15-4
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ param(
2020
)
2121
$filename = $output
2222

23-
$triesLeft = 3
24-
23+
$triesLeft = 4
24+
$delay = 2
2525
do
2626
{
2727
$triesLeft -= 1
@@ -31,12 +31,23 @@ do
3131
Write-Host "Downloading from bootstrap.packman.nvidia.com ..."
3232
$wc = New-Object net.webclient
3333
$wc.Downloadfile($source, $fileName)
34-
$triesLeft = 0
34+
exit 0
3535
}
3636
catch
3737
{
3838
Write-Host "Error downloading $source!"
3939
Write-Host $_.Exception|format-list -force
40+
if ($triesLeft)
41+
{
42+
Write-Host "Retrying in $delay seconds ..."
43+
Start-Sleep -seconds $delay
44+
}
45+
$delay = $delay * $delay
4046
}
4147
} while ($triesLeft -gt 0)
42-
48+
# We only get here if the retries have been exhausted, remove any left-overs:
49+
if (Test-Path $fileName)
50+
{
51+
Remove-Item $fileName
52+
}
53+
exit 1

physx/buildtools/packman/bootstrap/fetch_file_from_packman_bootstrap.cmd

+1-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@
2222
@powershell -ExecutionPolicy ByPass -NoLogo -NoProfile -File "%~dp0download_file_from_url.ps1" ^
2323
-source "http://bootstrap.packman.nvidia.com/%PACKAGE_NAME%" -output %TARGET_PATH%
2424
:: A bug in powershell prevents the errorlevel code from being set when using the -File execution option
25-
:: We must therefore do our own failure analysis, basically make sure the file exists and is larger than 0 bytes:
25+
:: We must therefore do our own failure analysis, basically make sure the file exists:
2626
@if not exist %TARGET_PATH% goto ERROR_DOWNLOAD_FAILED
27-
@if %~z2==0 goto ERROR_DOWNLOAD_FAILED
2827

2928
@endlocal
3029
@exit /b 0

physx/buildtools/packman/bootstrap/install_package.py

+120-23
Original file line numberDiff line numberDiff line change
@@ -16,42 +16,139 @@
1616
import zipfile
1717
import tempfile
1818
import sys
19-
import shutil
19+
import os
20+
import stat
21+
import time
22+
from typing import Any, Callable
23+
24+
25+
RENAME_RETRY_COUNT = 100
26+
RENAME_RETRY_DELAY = 0.1
2027

21-
__author__ = "hfannar"
2228
logging.basicConfig(level=logging.WARNING, format="%(message)s")
2329
logger = logging.getLogger("install_package")
2430

2531

26-
class TemporaryDirectory:
27-
def __init__(self):
28-
self.path = None
32+
def remove_directory_item(path):
33+
if os.path.islink(path) or os.path.isfile(path):
34+
try:
35+
os.remove(path)
36+
except PermissionError:
37+
# make sure we have access and try again:
38+
os.chmod(path, stat.S_IRWXU)
39+
os.remove(path)
40+
else:
41+
# try first to delete the dir because this will work for folder junctions, otherwise we would follow the junctions and cause destruction!
42+
clean_out_folder = False
43+
try:
44+
# make sure we have access preemptively - this is necessary because recursing into a directory without permissions
45+
# will only lead to heart ache
46+
os.chmod(path, stat.S_IRWXU)
47+
os.rmdir(path)
48+
except OSError:
49+
clean_out_folder = True
50+
51+
if clean_out_folder:
52+
# we should make sure the directory is empty
53+
names = os.listdir(path)
54+
for name in names:
55+
fullname = os.path.join(path, name)
56+
remove_directory_item(fullname)
57+
# now try to again get rid of the folder - and not catch if it raises:
58+
os.rmdir(path)
59+
60+
61+
class StagingDirectory:
62+
def __init__(self, staging_path):
63+
self.staging_path = staging_path
64+
self.temp_folder_path = None
65+
os.makedirs(staging_path, exist_ok=True)
2966

3067
def __enter__(self):
31-
self.path = tempfile.mkdtemp()
32-
return self.path
68+
self.temp_folder_path = tempfile.mkdtemp(prefix="ver-", dir=self.staging_path)
69+
return self
70+
71+
def get_temp_folder_path(self):
72+
return self.temp_folder_path
73+
74+
# this function renames the temp staging folder to folder_name, it is required that the parent path exists!
75+
def promote_and_rename(self, folder_name):
76+
abs_dst_folder_name = os.path.join(self.staging_path, folder_name)
77+
os.rename(self.temp_folder_path, abs_dst_folder_name)
3378

3479
def __exit__(self, type, value, traceback):
35-
# Remove temporary data created
36-
shutil.rmtree(self.path)
80+
# Remove temp staging folder if it's still there (something went wrong):
81+
path = self.temp_folder_path
82+
if os.path.isdir(path):
83+
remove_directory_item(path)
3784

3885

39-
def install_package(package_src_path, package_dst_path):
40-
with zipfile.ZipFile(
41-
package_src_path, allowZip64=True
42-
) as zip_file, TemporaryDirectory() as temp_dir:
43-
zip_file.extractall(temp_dir)
44-
# Recursively copy (temp_dir will be automatically cleaned up on exit)
45-
try:
46-
# Recursive copy is needed because both package name and version folder could be missing in
47-
# target directory:
48-
shutil.copytree(temp_dir, package_dst_path)
49-
except OSError as exc:
86+
def rename_folder(staging_dir: StagingDirectory, folder_name: str):
87+
try:
88+
staging_dir.promote_and_rename(folder_name)
89+
except OSError as exc:
90+
# if we failed to rename because the folder now exists we can assume that another packman process
91+
# has managed to update the package before us - in all other cases we re-raise the exception
92+
abs_dst_folder_name = os.path.join(staging_dir.staging_path, folder_name)
93+
if os.path.exists(abs_dst_folder_name):
5094
logger.warning(
51-
"Directory %s already present, packaged installation aborted" % package_dst_path
95+
f"Directory {abs_dst_folder_name} already present, package installation already completed"
5296
)
5397
else:
54-
logger.info("Package successfully installed to %s" % package_dst_path)
98+
raise
99+
100+
101+
def call_with_retry(
102+
op_name: str, func: Callable, retry_count: int = 3, retry_delay: float = 20
103+
) -> Any:
104+
retries_left = retry_count
105+
while True:
106+
try:
107+
return func()
108+
except (OSError, IOError) as exc:
109+
logger.warning(f"Failure while executing {op_name} [{str(exc)}]")
110+
if retries_left:
111+
retry_str = "retry" if retries_left == 1 else "retries"
112+
logger.warning(
113+
f"Retrying after {retry_delay} seconds"
114+
f" ({retries_left} {retry_str} left) ..."
115+
)
116+
time.sleep(retry_delay)
117+
else:
118+
logger.error("Maximum retries exceeded, giving up")
119+
raise
120+
retries_left -= 1
121+
122+
123+
def rename_folder_with_retry(staging_dir: StagingDirectory, folder_name):
124+
dst_path = os.path.join(staging_dir.staging_path, folder_name)
125+
call_with_retry(
126+
f"rename {staging_dir.get_temp_folder_path()} -> {dst_path}",
127+
lambda: rename_folder(staging_dir, folder_name),
128+
RENAME_RETRY_COUNT,
129+
RENAME_RETRY_DELAY,
130+
)
131+
132+
133+
def install_package(package_path, install_path):
134+
staging_path, version = os.path.split(install_path)
135+
with StagingDirectory(staging_path) as staging_dir:
136+
output_folder = staging_dir.get_temp_folder_path()
137+
with zipfile.ZipFile(package_path, allowZip64=True) as zip_file:
138+
zip_file.extractall(output_folder)
139+
140+
# attempt the rename operation
141+
rename_folder_with_retry(staging_dir, version)
142+
143+
print(f"Package successfully installed to {install_path}")
55144

56145

57-
install_package(sys.argv[1], sys.argv[2])
146+
if __name__ == "__main__":
147+
executable_paths = os.getenv("PATH")
148+
paths_list = executable_paths.split(os.path.pathsep) if executable_paths else []
149+
target_path_np = os.path.normpath(sys.argv[2])
150+
target_path_np_nc = os.path.normcase(target_path_np)
151+
for exec_path in paths_list:
152+
if os.path.normcase(os.path.normpath(exec_path)) == target_path_np_nc:
153+
raise RuntimeError(f"packman will not install to executable path '{exec_path}'")
154+
install_package(sys.argv[1], target_path_np)

0 commit comments

Comments
 (0)