-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comparing sensors data between Python and Simulate #719
Comments
Interesting! This could either be due to a bug in simulate or in the Python bindings. Could you please do the following two checks:
The numbers that you see correspond to which values? |
I took a look a quick look myself. |
I guess you already saw it: Only the visualization does not match, all other numbers do match |
But does it make sense that the z-axis value is constant? |
Yes, it makes sense since in torque-free rotation (which is the case since I set (Actually it should be the case also with gravity, since gravity operates on the center-of-mass so it is still torque-free) |
Just to be clear, this holds because of the inertial symmetry of the specific body I use (box with equal width and depth) |
The issue was: the plot was not being clipped, but the y-axis didn't have enough precision to show that. I.e., the y-axis was changing but you couldn't see it. So this is now fixed. |
Hi,
I am comparing the numerical values of accelerometer and gyro sensors with the visualization in the Simulate app, and get different results. I want to understand where does this difference come from (my code or something else). I'll focus on gyro since it's enough to demonstrate the issue.
Here is a model which explains my question:
Mujoco XML model
Python code
When I plot
gyro
I see that:z
component is constantx
component grows above the value of 1 and then drops to 0However, when looking at the sensor visualtization in Simulate, I see that
x
component does not grow above 1z
component oscillates between 1 and ~0.7.So, the
x
behavior may be explained if the value is just clipped to 1 by the graph's y-axis upper limit (that is, a visualization issue). But the behavior ofz
component cannot be explained. (btw as a sanity check I also compared withdata.qvel
and not surprisingly got the same values as indata.sensor(0).data
).Sensor visualization at
t=1.3
, demonstrating both issues:[EDIT] When I use the "watch" option in Simulate I see indeed the the
x
value is clipped by the visualization, but thez
value is constant at 1, like I get in Python, while in the graph it oscillates.The text was updated successfully, but these errors were encountered: