Wrong direction of gravity
So I built a human-like robot with some 3d models. It worked pretty well with the default inertial settings. But after I tried to simulate using real inertia parameters, following the tutorial, it just behave strangely (exploding, jittering, etc.). So at the end I have to pretend it is a robot one order of magnitude greater (so the mass and inertia tensor are much greater as well). The new inertia tensor pretty much solved my problems except for one new problem. When gravity is on, one of the arms just rotate by itself as the photo below shows:
When robot just spawned in the world
After a few second
If I turned off the gravity for this arm (for both upper arm and forearm, turning off one segment doesn't help) it will be alright. And I also tried to detach the arm from the shoulder (remove the joint), even on the ground it is moving by itself toward the same direction. I literally copied the setting of the normal arm and applied it on this problematic arm (changed the direction of course), no help. In the world sdf file I explicitly defined the gravity direction to be 0 0 -9.8, nothing changed. I adjusted the damping and friction of the shoulder and elbow joint from 0 to several thousand, still the same.
It seems like the gravity of this arm has a different direction and there is no way to fix it. Does anyone have any idea what could be the cause of the problem? Thanks a lot!
Edit: I attached the sdf file. But I am not sure if it helps, because I can't upload proprietary model files so it is hard to replicate the problem. But the model files for both arms are also identical except for the orientation so it should not be the cause of the problem. C:\fakepath\model.sdf
Edit2: I also attached the sdf file with real inertia. But the assumed damping and friction may not be very accurate. C:\fakepath\model real inertia.sdf
If you can share the sdf causing the problem it might help. Have you inspected the joints to see they're properly placed?
Hi chapulina, thanks for the comment. I did inspected the joints and I also copied the settings of joints on the normal side, but this strange phenomenon still occurred. And I attached the sdf file. But probably it is not very helpful as I am not allowed to provide the model files.
To my experience, this kind of error can apper for two reasons: 1) Two joined link have a difference of inertials in an order of magnitude higher than 10. 2) The iterations for the physic engine solver are two low. Can you verify that ?
Hi debz. The two joined links (right upper arm and forearm) are very close in inertia. The shoulder, though, is almost an order of magnitude smaller, strangely if that is the cause it did not affect the left arm. For the iterations, currently I am using the default value (50), and increased it to 200 doesn't solve this. So I am not sure if 50 too low. But still it cannot explain why the problem only happened on right arm