Intro
Hi!
I am a researcher at University of Ljubljana, I use MuJoCo for my research.
My setup
MuJoCo 3.9.0 (C API), x86, Fedora 44 KDE
What's happening? What did you expect?
Changing the dimension of the mjSENS_USER sensor type does not result in the compiled-model's signature being different. As a result, models with different nsensordata end up having the same signature, despite having a different memory layout.
Steps for reproduction
- Use different sensor's
dim and type of sensor mjSENS_USER.
Minimal model for reproduction
No model needed (actually two different ones are needed for comparisson), specification creation is fine.
Code required for reproduction
Python:
import mujoco as mj
spec = mj.MjSpec()
world = spec.worldbody
sensor = spec.add_sensor()
sensor.type = mj.mjtSensor.mjSENS_USER
sensor.dim = 100
sensor.name = "user_sensor"
m = spec.compile()
print(f"M1 nsensordata: {m.nsensordata}")
model_1_signature = m.signature
spec.delete(spec.sensor("user_sensor"))
sensor = spec.add_sensor()
sensor.type = mj.mjtSensor.mjSENS_USER
sensor.dim = 200
sensor.name = "user_sensor"
m = spec.compile()
print(f"M2 nsensordata: {m.nsensordata}")
model_2_signature = m.signature
assert model_1_signature != model_2_signature
Confirmations
Intro
Hi!
I am a researcher at University of Ljubljana, I use MuJoCo for my research.
My setup
MuJoCo 3.9.0 (C API), x86, Fedora 44 KDE
What's happening? What did you expect?
Changing the dimension of the
mjSENS_USERsensor type does not result in the compiled-model's signature being different. As a result, models with differentnsensordataend up having the same signature, despite having a different memory layout.Steps for reproduction
dimand type of sensormjSENS_USER.Minimal model for reproduction
No model needed (actually two different ones are needed for comparisson), specification creation is fine.
Code required for reproduction
Python:
Confirmations