Robotics StackExchange | Archived questions

IMU sensor update rate is overwritten by GPS sensor

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

Asked by dom on 2019-02-11 21:05:36 UTC

Comments

Answers