0
$\begingroup$

How would you sync a real life accelerometer with an accelerometer in a simulation program. In this case I am using MuJoCo for simulation and a Gy-521 is my physical, real life accelerometer.

$\endgroup$
7
  • $\begingroup$ So, it gives the standard units for measuring acceleration? Is that what you're getting at? "Acceleration is quantified in the SI unit metres per second per second" $\endgroup$
    – Ant
    Commented Jan 26, 2022 at 23:48
  • $\begingroup$ I didn't get far in science class. I'm looking it up. Acceleration is change in velocity. Okay. Well, I was just using miles per hour to frame my problem with something known that has a know metric. You won't say if the accelerometer measures meter per second squared? I don't understand the metric. Not really. What is going relative to a meter per second squared? Because the measurements drop off. If it measures acceleration just tell me it measures acceleration. Okay, what's the next riddle? $\endgroup$
    – Ant
    Commented Jan 26, 2022 at 23:57
  • $\begingroup$ " it could be a change in frequency, or a change in voltage, or it could be a change in binary value" This is confusing me. I want to sync up the virtual accelerometer and the physical one. $\endgroup$
    – Ant
    Commented Jan 27, 2022 at 0:44
  • $\begingroup$ I deleted most after I am using MuJoCo. $\endgroup$
    – Ant
    Commented Jan 27, 2022 at 1:16
  • 1
    $\begingroup$ are you certain that you want to sync a real accelerometer with sim accelerometer? ... it is unclear what you mean by that ... maybe all you want is to feed the data from a real accelerometer into the simulation $\endgroup$
    – jsotola
    Commented Jan 28, 2022 at 8:04

2 Answers 2

0
$\begingroup$

Your question is very open ended as "syncing" is not clearly defined. I'm going to answer as best i can interpret your intent.

An accelerometer is a sensor which measures acceleration in the world. A simulated sensor in the simulation should likewise be measuring acceleration in the simulated world.

Do you that end to cause the simulated sensor to provide the same readings you should take the real sensors readings. Estimate the motions of the real system which caused those accelerations. Then send those motions to the simulator to be executed. And if you've estimated the motion accurately and modeled the system will enough in the simulation the accelerometers will be in sync, aka giving the same readings.

$\endgroup$
0
$\begingroup$

I assume you want a simulated input that would be identical to the actual input from a real accelerometer, as has happened during some experiments in the past.This is a typical need for debugging.

In the ROS environment, this can be most easily done by implementing the accelerometer as a separate ROS node that periodically publishes messages about the current acceleration on the ROS bus. You will need another node that listens to these messages and uses them.

With such a setup, it is possible to record the acceleration messages with the RosBag tool and then replay them during the simulation, getting exactly the same readings as from the real accelerometer.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.