ModalAI Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    imu_apps Publish Frequency

    VOXL SDK
    2
    6
    463
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jenyeom
      last edited by

      With the updated SDK 1.1, I have noticed that the imu_apps publish frequency is maxed out at 500 Hz.
      Previously, I was able to set the imu_apps reliably even to ~900 Hz or so, by setting the "imu0_sample_rate_hz" value in 'voxl-imu-server.conf' file.
      Now, even when I set it to a higher than 500 Hz value, it continues to only publish at about 500 Hz.

      Has anyone else seen this issue or know if there is anything being done to support faster imu pub rates?
      Thank you in advance!

      Alex KushleyevA 1 Reply Last reply Reply Quote 0
      • Alex KushleyevA
        Alex Kushleyev ModalAI Team @jenyeom
        last edited by

        @jenyeom , how are you testing this?

        what do you see when you run

        voxl-inspect-imu -a imu_apps
        ...
        gravity| accl_x accl_y accl_z| gyro_x  gyro_y  gyro_z |  Temp | timestamp |  dt  |
          9.82 | -0.72   8.82   4.26 |  0.012  -0.001  -0.006 | 27.84 |  14760214 | 0.976|
        

        (dt is about 1ms)

        my /etc/modalai/voxl-imu-server.conf says "imu0_sample_rate_hz": 1000,

        I am using SDK 1.1.2

        J 1 Reply Last reply Reply Quote 0
        • J
          jenyeom @Alex Kushleyev
          last edited by jenyeom

          @Alex-Kushleyev
          Looks like I do have the same behavior (dt about 1ms) when I run the inspect-imu command with the rate set to 1000.

          However, the ROS2 topic of /quadrotor/imu_apps is currently only running at a max rate of ~550 Hz even with the "imu0_sample_rate_hz" set to 1000.
          It's interesting because the same ROS2 code prior to updating to SDK 1.1.2 (when it was at SDK 1.0) had no issue publishing the imu_apps topic at the requested rate.
          Maybe I'm missing something, but I can't think of anything else that would be different.
          I've dug into the imu_interface code in the voxl_mpa_to_ros2 package but haven't found anything related to publishing frequencies.
          Do you have any idea what might be throttling the imu_apps publish rate?

          Alex KushleyevA 1 Reply Last reply Reply Quote 0
          • Alex KushleyevA
            Alex Kushleyev ModalAI Team @jenyeom
            last edited by

            @jenyeom , how are you measuring the frequency of the imu messages on the ROS size? Did you do something like rostopic hz <topic>

            J 1 Reply Last reply Reply Quote 0
            • J
              jenyeom @Alex Kushleyev
              last edited by

              @Alex-Kushleyev
              Yes, also using the option -w 500 (or other numbers that I'm expecting)

              Alex KushleyevA 1 Reply Last reply Reply Quote 0
              • Alex KushleyevA
                Alex Kushleyev ModalAI Team @jenyeom
                last edited by

                @jenyeom , i am not sure, can you please try setting cpu mode to performance:

                voxl-set-cpu-mode perf
                

                This will prevent cpu from sleeping excessively in low power mode. Perhaps the dt is so low that the cpu oversleeps and does not handle all the imu messages.

                1 Reply Last reply Reply Quote 0
                • Morten NissovM Morten Nissov referenced this topic on
                • First post
                  Last post
                Powered by NodeBB | Contributors