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

libhector_gazebo_ros_magnetic.so : magnetometer measurements drifting #81

Open
PizzocaroSolomon opened this issue Dec 12, 2020 · 0 comments

Comments

@PizzocaroSolomon
Copy link

PizzocaroSolomon commented Dec 12, 2020

Hi!
first of all I want to thank you for the grate work that you shared with us :)

I added in my Gazebo model the "libhector_gazebo_ros_magnetic" plugin to have magnetometer measurements.
I noticed that the measurements are drifting rapidly over time. I wonder if it's a problem of incorrent I'm setting of the plugin and the magnetic field components or is something inside the plugin code.

This is how I'm including the plugin in my .sdf file :

...
<plugin filename="libhector_gazebo_ros_magnetic.so" name="magnetometer">
    <robotNamespace>/</robotNamespace> 
    <bodyName>base_link</bodyName>
    <topicName>imu/mag</topicName> 

    <updateRate>50</updateRate> 
    <magnitude>47.71</magnitude> 
    <referenceHeading>0.0</referenceHeading> 
    <declination>3.0</declination> 
    <inclination>60.0</inclination> 

    <offset>0.0 0.0 0.0</offset> 
    <drift>0.0 0.0 0.0</drift> 
    <driftFrequency>1 1 1</driftFrequency> 
    <gaussianNoise>0.0 0.0 0.0</gaussianNoise>
 </plugin>

In my .world file these are the environment info:

<spherical_coordinates>
      <surface_model>EARTH_WGS84</surface_model>
      <latitude_deg>45.22159023006877</latitude_deg>
      <longitude_deg>11.993919883456432</longitude_deg>
      <elevation>0</elevation>
      <heading_deg>0</heading_deg>
 </spherical_coordinates>

  <gravity>0 0 -9.81</gravity>
  <magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant