Add mjtState enum and related mj_stateSize, mj_getState and mj_setState functions.
PiperOrigin-RevId: 539667943 Change-Id: I14c34be8ce4c287e529380257b5c5bffc3ab45ce
This commit is contained in:
committed by
Copybara-Service
parent
84c33e53df
commit
f67e359532
@@ -1783,6 +1783,84 @@ FUNCTIONS: Mapping[str, FunctionDecl] = dict([
|
||||
),
|
||||
doc='Compute efc_state, efc_force, qfrc_constraint, and (optionally) cone Hessians. If cost is not NULL, set *cost = s(jar) where jar = Jac*qacc-aref.', # pylint: disable=line-too-long
|
||||
)),
|
||||
('mj_stateSize',
|
||||
FunctionDecl(
|
||||
name='mj_stateSize',
|
||||
return_type=ValueType(name='int'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='m',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjModel', is_const=True),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='spec',
|
||||
type=ValueType(name='unsigned int'),
|
||||
),
|
||||
),
|
||||
doc='Return size of state specification.',
|
||||
)),
|
||||
('mj_getState',
|
||||
FunctionDecl(
|
||||
name='mj_getState',
|
||||
return_type=ValueType(name='void'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='m',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjModel', is_const=True),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='d',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjData', is_const=True),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='state',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjtNum'),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='spec',
|
||||
type=ValueType(name='unsigned int'),
|
||||
),
|
||||
),
|
||||
doc='Get state.',
|
||||
)),
|
||||
('mj_setState',
|
||||
FunctionDecl(
|
||||
name='mj_setState',
|
||||
return_type=ValueType(name='void'),
|
||||
parameters=(
|
||||
FunctionParameterDecl(
|
||||
name='m',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjModel', is_const=True),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='d',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjData'),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='state',
|
||||
type=PointerType(
|
||||
inner_type=ValueType(name='mjtNum', is_const=True),
|
||||
),
|
||||
),
|
||||
FunctionParameterDecl(
|
||||
name='spec',
|
||||
type=ValueType(name='unsigned int'),
|
||||
),
|
||||
),
|
||||
doc='Set state.',
|
||||
)),
|
||||
('mj_addContact',
|
||||
FunctionDecl(
|
||||
name='mj_addContact',
|
||||
|
||||
Reference in New Issue
Block a user