Add mj_copyBack for copying real-valued arrays from mjModel back to mjSpec.
Also add `SaveAndReadXML` function to test fixture using `mjSpec` as input. PiperOrigin-RevId: 765393821 Change-Id: Ic257addd2fc89678fc11b226c168c077626cc51e
This commit is contained in:
committed by
Copybara-Service
parent
072c872deb
commit
84ad22a590
@@ -248,6 +248,26 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
),
|
||||
doc='Compile spec to model.',
|
||||
)),
|
||||
('mj_copyBack',
|
||||
FunctionDecl(
|
||||
name='mj_copyBack',
|
||||
return_type=ValueType(name='int'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='s',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjSpec'),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='m',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjModel', is_const=True),
|
||||
),
|
||||
),
|
||||
),
|
||||
doc='Copy real-valued arrays from model to spec, returns 1 on success.', # pylint: disable=line-too-long
|
||||
)),
|
||||
('mj_recompile',
|
||||
FunctionDecl(
|
||||
name='mj_recompile',
|
||||
|
||||
Reference in New Issue
Block a user