Inaccurate acceleration values when applying friction #2037
Unanswered
wykang2
asked this question in
Asking for Help
Replies: 1 comment
-
@Balint-H any help on this will be very helpful! thanks! |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Intro
Hi!
I am a student using mujoco to simulate different basic systems. Currently, I am trying to simulate a basic system with friction applied and trying to get accurate acceleration values.
My setup
My first attempt at simulating friction was to slide a block down a 30 degree ramp with friction being applied.
Here is an image of what the basic setup looks like:
In addition to a sliding joint on the x axis (along the ramp), I added a z axis sliding joint (perpendicular to the ramp) to make sure that the block made contact with the ramp. The xml for my setup can be seen below. I also wrote a python script to simulate and graph some of the relevant values (shown below as well)
My question
My concern is with the measured acceleration. Since there was only 1 object moving, I first tried graphing the acceleration measured with data.qacc
The average acceleration from qacc was very close (within 0.01) to the theoretical acceleration that the block should have had. However, I am concerned about the flutuations in the values of the accelerations on the graph and worried that this may cause larger discrepancies for larger graphs.
I also graphed the acceleration recorded by an accelerometer (note that these values are negative of the previous values):
For this graph, we are looking at the acceleration with respect to the x axis labeled on the graph, since it is aligned with the ramp. The average acceleration differed by a larger amount from the the theoretical acceleration of the block (0.2). Additionally, there was the same issue of flutuation values on the acceleration values measured by the accelerometer
My questions are if there was any way I could fix my system so that the acceleration values measured (by the accelerometer mainly) would not flutuate so much and also so that the accelerometer would measure a more accurate value?
Minimal model and/or code that explain my question
Model:
minimal XML
Code:
Confirmations
Beta Was this translation helpful? Give feedback.
All reactions