Check that there are no pending keyframes while writing a spec.
This can happen when a body is detached without compiling or recompiling. Also added error catching when trying to delete a body instead of detaching it. Fixes #2327 PiperOrigin-RevId: 712526730 Change-Id: I4b48df83120fca12d475c85b3a54893841449653
This commit is contained in:
committed by
Copybara-Service
parent
b5df2c10bf
commit
f607d9554e
@@ -379,7 +379,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
type=ValueType(name='int'),
|
||||
),
|
||||
),
|
||||
doc='Save spec to XML file, return 1 on success, 0 otherwise.',
|
||||
doc='Save spec to XML file, return 0 on success, -1 otherwise.',
|
||||
)),
|
||||
('mj_step',
|
||||
FunctionDecl(
|
||||
@@ -9277,7 +9277,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
('mjs_delete',
|
||||
FunctionDecl(
|
||||
name='mjs_delete',
|
||||
return_type=ValueType(name='void'),
|
||||
return_type=ValueType(name='int'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='element',
|
||||
@@ -9286,7 +9286,7 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
),
|
||||
),
|
||||
),
|
||||
doc='Delete object corresponding to the given element.',
|
||||
doc='Delete object corresponding to the given element, return 0 on success.', # pylint: disable=line-too-long
|
||||
)),
|
||||
('mjs_addActuator',
|
||||
FunctionDecl(
|
||||
|
||||
Reference in New Issue
Block a user