Add signature to mjSpec and mjModel and use it to perform safe bind to mjModel and mjData.

PiperOrigin-RevId: 740378879
Change-Id: If14b326942529494f172e7aedcae30195798b458
This commit is contained in:
Alessio Quaglino
2025-03-25 09:35:44 -07:00
committed by Copybara-Service
parent c931565fdc
commit 157b074116
15 changed files with 165 additions and 2 deletions
+15
View File
@@ -4454,6 +4454,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
doc='paths to assets, 0-terminated',
array_extent=('npaths',),
),
StructFieldDecl(
name='signature',
type=ValueType(name='uint64_t'),
doc='also held by the mjSpec that compiled this model',
),
),
)),
('mjThreadPool',
@@ -6037,6 +6042,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='uintptr_t'),
doc='thread pool pointer',
),
StructFieldDecl(
name='signature',
type=ValueType(name='uint64_t'),
doc='also held by the mjSpec that compiled the model',
),
),
)),
('mjvPerturb',
@@ -9044,6 +9054,11 @@ STRUCTS: Mapping[str, StructDecl] = dict([
type=ValueType(name='mjtObj'),
doc='element type',
),
StructFieldDecl(
name='signature',
type=ValueType(name='uint64_t'),
doc='compilation signature',
),
),
)),
('mjsCompiler',