Rate of change of rangefinder sensor measurement #2473
-
IntroHi! I am a researcher at the University of Glasgow, I use MuJoCo for my research on in orbit robotics and reinforcement learning. My setupMuJoCo 3.3.0, Python My questionI am developing a controller, for which I need the rate of change of the distance measured by a rangefinder sensor. I was intending to measure this velocity and acceleration, via numerical differencing. The trouble is that I run many (100-1000) mujoco steps, per controller step, such that the simulation might run at 1000+ Hz while my controller runs at 10 Hz, I do this via:
As such I am really asking whether there is a better way to find the velocity and acceleration than:
because in the test I did I have found this to be considerably slower than the original. I have also considered, taking the sensor data from 100 steps ago, but I suspect this will give singificantly less accurate velocity measurements and also mean that the I get the first acceleration measurement only after 200 steps. Is there any better way to do this that I am not considering? Any advice, or comments appreciated! Minimal model and/or code that explain my questionNo response Confirmations
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Did you look at |
Beta Was this translation helpful? Give feedback.
-
This looks really useful. I am wondering how much speed I will gain over the python approach above, when I only have one simulation. I will do some testing. Thanks |
Beta Was this translation helpful? Give feedback.
Did you look at
mujoco.rollout
? It's much faster than Python and will give you all the intermediate sensor values.https://mujoco.readthedocs.io/en/latest/python.html#rollout