Unity BADQACC: NaN/inf in qacc. Error #2843
Unanswered
xodrn
asked this question in
Asking for Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Intro
Hello!
I'm using Mujoco for AI training.
My setup
MuJoCo : 3.2.1
Python3.9
Ubuntu21
Unity 2022.3.4f
My question
Hello. I am working on sending qpos data—obtained by running MJCF and .pt files in Python—to Unity, in order to control a MJCF model that has been imported into Unity. During this process, I encounter an error where qacc reaches a certain value and triggers the message: BADQACC: NaN/inf in qacc.
The following values of qacc are observed when the BADQACC: NaN/inf in qacc error occurs. After running the simulation for about 30 seconds, every time the error occurs, qacc is consistently fixed to these exact values.
2.2877298205454E-16
-1.5407890541557E-16
-9.81
7.45666074555763E-16
3.67163149315616E-16
-4.26109515333737E-14
1.01130904921998E-15
-8.92061449900887E-16
5.36868405731741E-14
-1.49104313064559E-14
1.37967169141966E-14
-5.5775946668187E-14
1.4604957894E-14
-5.71023233669563E-16
1.45055354582338E-15
5.42972109881531E-14
-1.69094916929193E-14
4.21513457102546E-14
-5.58155245887269E-14
-7.09456893841063E-14
-1.41072239123647E-15
-5.76745888178105E-16
5.15551049589898E-14
5.67763458315732E-16
2.09173965985596E-16
-8.37301774698947E-15
9.92280324320916E-16
-8.63878490911878E-16
-1.16592960517288E-14
5.5077300905746E-15
-6.72105858449673E-16
2.05511888671497E-15
-1.16592104879657E-14
5.06377500960214E-15
2.15807682063547E-15
-8.94415342561607E-15
-2.15807682063548E-15
8.94415342561607E-15
BADQACC: NaN/inf in qacc.
The code I used to obtain the qacc data is as follows:
for (int i = 0; i < Model->nv; i++)
{
Debug.Log(Data->qacc[i]);
}
The timestep value in the MJCF option is set to 0.001, while Unity's Fixed Timestep, Maximum Allowed Timestep, and Maximum Particle Timestep are all set to 0.01. The Time Scale is set to 1.
Even if the BADQACC: NaN/inf in qacc error cannot be resolved, is it possible to prevent the model's position from resetting to its default pose when the error occurs?
Minimal model and/or code that explain my question
If you encountered the issue in a complex model, please simplify it as much as possible (while still reproducing the issue).
Model:
minimal XML
Code:
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions