You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In some environments (which don't look to have been merged yet, such as wiping environments in the vices_19 branch), sensor data from sensor with id sensor_id is referenced using env.sim.data.sensordata[sensor_id*3:sensor_id*3+3], where the magic number 3 is used based on the assumption that the previous sensors all have 3 values associated with them. If sensors with different dimensions are added (e.g. 1-dim contact sensors), the returned values for will be wrong.
Note: this is due to the fact that Mujoco/mujoco-py simply puts all sensor data in a single array in env.sim.data.sensordata (in the order that the sensors were added).
We will eventually need some way of tracking the kinds of sensors that have been added to mitigate the issue; filing the issue here for reference in the meantime. Users will have to manually keep track of what sensors are used and be careful with how they reference them.
The text was updated successfully, but these errors were encountered:
fixed. Note: we should avoid using sim.data.get_sensor("..."), as this returns an INCORRECT value since it only returns a scalar, irregardless of the dimensionality of the sensor being requested!
In some environments (which don't look to have been merged yet, such as wiping environments in the vices_19 branch), sensor data from sensor with id
sensor_id
is referenced usingenv.sim.data.sensordata[sensor_id*3:sensor_id*3+3]
, where the magic number3
is used based on the assumption that the previous sensors all have 3 values associated with them. If sensors with different dimensions are added (e.g. 1-dim contact sensors), the returned values for will be wrong.Note: this is due to the fact that Mujoco/mujoco-py simply puts all sensor data in a single array in
env.sim.data.sensordata
(in the order that the sensors were added).We will eventually need some way of tracking the kinds of sensors that have been added to mitigate the issue; filing the issue here for reference in the meantime. Users will have to manually keep track of what sensors are used and be careful with how they reference them.
The text was updated successfully, but these errors were encountered: