How to Synchronize SOFA simulation with real robot? #3836
-
Hi, Currently I want to do softrobot dynamic control based on SOFA simulation, I have the simulation of the robot that acts as an estimator and I have the real robot. I'm using Dt = 0.01s (simulation step) and I have an 60 FPS. My problem is with time, What I want is to synchronized the simulation with the real robot so that if the simulated robot is in a state at t=1s (simulation time) the real robot is in ideally (or close enough) the same state at t=1s (real time) so that as could consider the simulation as an observer of the real robot state. Do you know how I can do that with a pythoncontroller ? What I've tried so far is to enable the realtime flag and compared the time on SOFA GUI with a real clock but there is a big gap, I don't understand why. If you have any idea how to do what I want to do, please let me know. Best regard, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Strange indeed @ouafi98 it was what the RealTime flag was used for but you're right it does not work properly in the release version (it works well in the master branch though). I don't know where does this difference come from. Indeed you could bypass the issue with a python script changing the time step the way it is done here in cpp |
Beta Was this translation helpful? Give feedback.
Strange indeed @ouafi98 it was what the RealTime flag was used for but you're right it does not work properly in the release version (it works well in the master branch though). I don't know where does this difference come from.
Indeed you could bypass the issue with a python script changing the time step the way it is done here in cpp