Support float32 precision for mjtNum in Python bindings.
PiperOrigin-RevId: 922959317 Change-Id: I384b3bdeabdc4d3f66c71cae41dabfaf51387be7
This commit is contained in:
committed by
Copybara-Service
parent
b612d352d4
commit
df6942eb39
@@ -156,8 +156,10 @@ def _array_binding_code(
|
||||
if classname == 'mjSpec': # raw mjSpec has a wrapper
|
||||
rawclassname = classname.replace('mjS', 'MjS')
|
||||
fullvarname = 'ptr->' + varname
|
||||
if innertype == 'double' or innertype == 'mjtNum':
|
||||
innertype = 'MjDouble' # custom Eigen type
|
||||
if innertype == 'mjtNum':
|
||||
innertype = 'MjNum' # custom Eigen type for mjtNum fields
|
||||
elif innertype == 'double':
|
||||
innertype = 'MjDouble' # custom Eigen type for double fields
|
||||
elif innertype == 'float':
|
||||
innertype = 'MjFloat' # custom Eigen type
|
||||
elif innertype == 'int':
|
||||
|
||||
Reference in New Issue
Block a user