Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it normal to get these errors using Madgwick filter? #191

Closed
faustodidomenico opened this issue Dec 11, 2023 · 0 comments
Closed

Is it normal to get these errors using Madgwick filter? #191

faustodidomenico opened this issue Dec 11, 2023 · 0 comments

Comments

@faustodidomenico
Copy link

faustodidomenico commented Dec 11, 2023

Hello, I'm trying to estimate the orientation using Madgwick filter in a simulated rosbag created with Gazebo, but the estimation has some errors compared to the ground-truth. I compare the results using https://github.com/MichaelGrupp/evo. Here is the graphic of the error in degrees:
image
I tried with different configurations and parameters values but this is the best I could get. As we can see, it has a maximum error of 8.8° and a mean of 4.2°. Is it normal to get these errors? or should it be something more precise?

The IMU is simulated with the Intel RealSense Gazebo ROS plugin (https://github.com/pal-robotics/realsense_gazebo_plugin) and the magnetometer with Hector Gazebo Ros Magnetic plugin (https://github.com/tu-darmstadt-ros-pkg/hector_gazebo)
The sensor configuration:

<sensor name="${camera_name}imu" type="imu">
        <always_on>true</always_on>
        <update_rate>${gyro_fps}</update_rate>
        <topic>${camera_name}/imu/sample</topic>
        <plugin name="${camera_name}imu" filename="libgazebo_ros_imu_sensor.so">
          <topicName>${camera_name}/imu/sample</topicName>
          <bodyName>${camera_name}_link</bodyName>
          <frameName>${gyro_optical_frame}</frameName>
          <updateRateHZ>${gyro_fps}</updateRateHZ>
          <gaussianNoise>0.0</gaussianNoise>
          <xyzOffset>0 0 0</xyzOffset>
          <rpyOffset>0 0 0</rpyOffset>
          <!-- Nota(Dante): añadido ver http://gazebosim.org/tutorials?tut=ros_gzplugins#IMU(GazeboRosImu) -->
          <initialOrientationAsReference>false</initialOrientationAsReference>
        </plugin>
      </sensor>
    </xacro:if>
    <!-- Accel and gyro -->
    <xacro:unless value="${unite_imu_method == 'copy' or unite_imu_method == 'linear_interpolation'}">
      <sensor name="${camera_name}accel" type="imu">
        <always_on>true</always_on>
        <update_rate>${accel_fps}</update_rate>
        <topic>${camera_name}/accel/sample</topic>
        <plugin name="${topics_ns}_accel_plugin" filename="librealsense_gazebo_accel_sensor.so">
          <topicName>${camera_name}/accel/sample</topicName>
          <bodyName>${camera_name}_link</bodyName>
          <updateRateHZ>${accel_fps}</updateRateHZ>
          <gaussianNoise>0.0</gaussianNoise>
          <xyzOffset>0 0 0</xyzOffset>
          <rpyOffset>0 0 0</rpyOffset>
          <frameName>${accel_optical_frame}</frameName>
          <initialOrientationAsReference>false</initialOrientationAsReference>
        </plugin>
        <pose>0 0 0 0 0 0</pose>
      </sensor>
      <sensor name="${camera_name}gyro" type="imu">
        <always_on>true</always_on>
        <update_rate>${gyro_fps}</update_rate>
        <topic>${camera_name}/gyro/sample</topic>
        <plugin name="${topics_ns}_gyro_plugin" filename="librealsense_gazebo_gyro_sensor.so">
          <topicName>${camera_name}/gyro/sample</topicName>
          <bodyName>${camera_name}_link</bodyName>
          <updateRateHZ>${gyro_fps}</updateRateHZ>
          <gaussianNoise>0.0</gaussianNoise>
          <xyzOffset>0 0 0</xyzOffset>
          <rpyOffset>0 0 0</rpyOffset>
          <frameName>${gyro_optical_frame}</frameName>
          <initialOrientationAsReference>false</initialOrientationAsReference>
        </plugin>
<plugin name="hector_magnetometer" filename="libhector_gazebo_ros_magnetic.so">
      <bodyName>magnetometer_link</bodyName>
      <frameId>magnetometer_link</frameId>
      <topicName>magnetometer/fix</topicName>
      <updateRate>300.0</updateRate>
      <referenceHeading>90</referenceHeading>
      <declination>-8.5985</declination>
      <inclination>-37.8919</inclination>
      <magnitude>22.5782e-06</magnitude>
      <gaussianNoise>0 0 0</gaussianNoise>
      <useMagneticFieldMsgs>true</useMagneticFieldMsgs>
      <useWorldSphericalCoordinates>false</useWorldSphericalCoordinates>
    </plugin>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants