Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

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

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

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

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