IMU sensor update rate is overwritten by GPS sensor

asked 2019-02-11 20:08:38 -0600

dom gravatar image

updated 2019-02-12 17:08:45 -0600

When adding a GPS sensor to my model, the update rate it uses overwrites the update rate of my IMU. I wish to have for example then GPS sensor running at 5 Hz and the IMU at 100 Hz.

Here is a basic model which shows this behaviour for me:

<?xml version="1.0"?>
<robot name="GPSIMU" xmlns:xacro="http://ros.org/wiki/xacro">

    <link name="base">
        <inertial>
            <mass value="0.7" />
            <inertia ixx="0.1" ixy="0.0" ixz="0.0" iyy="0.1" iyz="0.0" izz="0.1" />
        </inertial>

        <visual>
            <geometry> <box size="1 1 1" /> </geometry>
        </visual>

        <collision>
            <geometry> <box size="1 1 1" /> </geometry>
        </collision>
    </link>

    <gazebo reference="base">
        <sensor type="gps" name="gps">
            <always_on>1</always_on>
            <update_rate>5</update_rate>
        </sensor>
    </gazebo>

    <gazebo reference="base">
        <sensor type="imu" name="imu">
            <always_on>1</always_on>
            <update_rate>100</update_rate>
        </sensor>
    </gazebo>

</robot>

gz topic -z /gazebo/default/GPSIMU/base/imu/imu gives me ~ 5 Hz, instead of 100 Hz.

I am using Gazebo 9.6.0 installed from the repos on Ubuntu 16.04

edit retag flag offensive close merge delete