GazeboRosMagnetic sensor seems to be mounted backwards by default - How to change the orientation?

asked 2017-02-03 10:02:22 -0600

nerdyTurtle gravatar image

updated 2017-02-03 10:02:49 -0600

Hi,

I am using GazeboRosMagnetic sensor plugin from hector_gazebo_plugins and due to some reason it seems to be mounted backwards. Because after reading the heading value, my robot turns and goes backwards when I need it to be facing and moving forwards. I tried changing the offset parameter but that didn't seem to help, maybe I am not using the correct values?

Here's my code:

<plugin name="magnetometer" filename="libhector_gazebo_ros_magnetic.so">
    <updateRate>20.0</updateRate>
    <bodyname>base_footprint</bodyname>
    <topicName>magnetometerStatus</topicName>
    <referenceHeading>0.0</referenceHeading>
    <declination>3.0333</declination>
    <inclination>60.0</inclination>
    <offset>0 0 0</offset>
    <driftFrequency>0 0 0</driftFrequency>
    <gaussianNoise>0 0 0</gaussianNoise>
</plugin>

Any help with this will be highly appreciated!

Many thanks

edit retag flag offensive close merge delete