Wrong heading/yaw from Navio2 operating indoors

Hello,

We installed a Navio2 on an unmanned boat for experiments in an indoor tank and we are using the mavros package.
The readings of the yaw from the IMU (heading from the compass) are wrong.
Does anyone encountered this issue or have ideas of how to solve this issue?

Your advice would be much appreciated.

Thanks,
Coral

1 Like

Hi and welcome on Emlid forum!

We’ll need the following information to better understand your setup:

  1. Image and ArduPilot version.
  2. Detailed problem description. How does observed behavior differ from the expected one?
  3. Your step by step actions.
  4. Picture of the setup and connection scheme.
  5. If using any additional hardware please provide exact make and model.
  1. We don’t have Ardupilot installed on the Navio2, only ROS with the mavros package. It is used to get the data stream from the IMU.
    I saw in the documentation that there is an option to do a compass calibration from the Ardupilot. Is that the only way to calibrate the compass? If so, I will have to install an Ardupilot.

  2. When the boat performs 360-degree rotation, the heading readings don’t show 360-degree turn. The range of values is roughly between 69-129 degrees. For example, heading output is ~95 degrees while the real value is 260 degrees. Another example, heading shows 69 degrees for real value of ~6 degrees.

  3. Step by step actions:
    3.1. connect the batteries, which supplies power to all systems onboard and power them all up.
    3.2. there are 2 Raspberry Pi’s on the ASV. one of them is RPi 3 dedicated only for the Navio2,
    and the other is RPi 4 for our ROS work environment and backseat driver.
    So the second stage would be to start the mavros node on its RPi3. (using the ROS MASTER
    on the other RPi4).
    3.3. launch the ASV launch file of RPi4.
    3.4 On the operator side, launch the operator launch file.
    The heading value is calculated from the yaw value that comes out from the Navio2
    magnetometer/compass. The two outputs of the yaw and the heading correspond to each other
    (each one in its own convention) , so there is no mistake in calculations. Plus we have been
    using the same code with other IMUs for the past couple of years with no issues.

  4. I don’t have one available at the moment , I am working on making one ( a rough scheme) for you.

  5. additional ardware:
    5.1 ASV computer that came with the company for low lever control ( e.g. motor controller)
    5.2 Power distribution system
    5.3. Axis camera
    5.4 Velodyne Lidar VLP16.
    5.5 2 Raspberry Pi’s
    5.6 Navio2 IMU
    5.7 GPS system (that can be unplugged when working indoors).
    5.8 WiFi communication

Hope this help in the meantime, while working on the connection scheme for you. Let me know if you need anything else.

Also, please let me know if I have to have Ardupilot installed and if that is the only way to calibrate the compass?

Thank you,
Coral

The question that occurs to me is: where does mavros connect to if no version of ardupilot is running on the Raspberry Pi/Navio2?

You are right, my appologies. I am new and didn’t install the system, so learning as I go.

  1. Image is 4.14.95-emlid-v7+, and not sure how to find the version of the ardurover.

Running any version of ardupilot (arduboat in your case, I guess) without calibration/tuning, will not produce the expected results. Do a complete sensor calibration with Missionplanner or Qgroundcontrol.

Thanks, that worked. However, I could not find a way to save to calibration values. Therefore, must calibrate everytime I power up the system.
Is there a way to save the calibration values so that the IMU will use that calibration with every start?
My OS is Ubuntu 18.04 and the ground control station I used for calibration is APMPlanner 2.

The magnetometer offsets should be saved in the ardupilot parameters, if the calibration finishes sucessfully. I never use APMPlanner, so I do not know how recent the latest version is. I would try to use Qgroundcontrol for Linux or even MissionPlanner with mono on Linux.