Sampling data at a lower frequency

Hello all and happy new year:)

I was recording data using the OSL running the FSM with a set frequency at 200Hz, which is also the default set within the OSL github repos. However, I noticed that the t variable I am getting from the clock is actually at a much lower frequency (~30Hz). I noticed that while running the newest version of the FSM walking controller. Using the legacy version of the FSM, I am recording data at the set frequency (200Hz), but I am not sure why the frequency is kept in one version of the code and not the other.

Am I missing something here? Any ideas or insights would be appreciated.

Hello and happy new year !

It is strange to reach this low frequency. Can you be more precise on which version of the codes you are using (referencing commit id or branches would help). Also are you using the same python environment for running both code ?

Louis

Hi Louis. I am working with virtual environments, so I have 2 separate environments.

  1. using the opensourceleg 3.4.1 version (Commit 6a8ef34, main branch)
  2. using the opensourceleg 2.3.0 version (branch: legacy-opensourceleg)

I am running Python 3.11.2 in both environments.

In both cases, the FSM code is different with respect to dependencies and packages, but effectively, it’s the same functionality. When using the most recent version of the osl (1), I am getting a data sampling frequency between 30 and 70Hz, although the set frequency in the code is 200Hz. The same happens when I set the frequency to 100Hz, I am still getting between 30-70Hz. As a sidenote, if I run the FSM code without commanding impedance, it seems like I am getting close to the 200Hz. However, once I send impedance commands to the motors (just uncommenting the section that is commented out in this code), I am getting about 70Hz. Although I would expect some delay, going from 200Hz to 70Hz or lower is drastical.

When using the legacy version, the sampling rate is consistent with the set frequency.