I have a question about Navio2 and raspberry pi

You have “Save File” and “Load File” to computer disk option

and “Read or Write” waypoints to Navio2.

So when connecting each unit to computer you can write the same mission to memory.

I think I didn’t get the answer I wanted and since I’m asking you questions, I’ll ask you more questions.
First, you said that the mission file is stored as a parameter in the memory of Navio2, and then unless you save it on your computer for edit or future use.
Then how can you save the parameters stored in the memory of Navio2 on your computer?
Secondly, you said that the binary file of the arducopter is located at /opt/ardupilot/navio2/arducopter-4.0/bin/arducopter. Is it simply a source code for operating the arducopter?
Or does it include anything else?
Thirdly, as I asked you above, it’s about the power of the drone’s motor.
Does the operator installed in the raspberry pi receive the mission file and various sensor data stored in Navio2 to determine the motor output?
Fourthly, it’s about Navio2 pinout.
Is it a PIN that I can use at random in the picture shown in green in the Navio2 document below?
I wonder if GP26 HEADER PIN, GP18 GPIO18_DF13, and GP17 GPIO17_DF13 can be used arbitrarily.
Link: Pinout | Navio2

I’m sorry I have so many questions.

Please check the above information.
I’m telling you again because there was no reply.

Hi @osung1598,

Raspberry Pi with attached Navio2 doesn’t save the file with the mission data in its memory. Its memory only has the records of the configured parameters that are being sent from Mission Planner. It’s not possible to access some regular files with mission data on the Navio2 that you can use later on.

You can save the list of configured parameters from Mission Planner on your PC. For this, you need to click on the Save to file button. This file can be used only on the PC. It can’t be transferred to Navio2 for usage.

The binary files consist of complex structured data that are meant to be read by the applications. It’s used to run the autopilot software.

In Auto Mode, the drone will follow a configured mission made up of navigation commands (i.e. waypoints). Auto Mode incorporates the altitude control from AltHold Mode and position control from Loiter Mode. The autopilot uses a barometer that measures air pressure to determine altitude and GPS readings to determine the heading.

I suggest checking out the Auto Mode guide to learn more about it.

I see that Artem has already answered you regarding GPIO pins in this thread:

Hello
I checked what you sent me.
In the second response, you said that the binary file of the arducopter is used to run the autopilot software.
For example, suppose you are synchronizing the arducopter binary file.
So if raspberry pi 1 was working and it was turned off due to an accident, would raspberry pi 2 be operated automatically?
The example above is based on the assumption that raspberry pi 1 and navio2 were connected and raspberry pi 2 was connected when raspberry pi 1 was turned off.

Hi @osung1598,

This binary file is used to run the autopilot software. It doesn’t contain the information about the mission configuration. If the second Raspberry Pi uses our image, it has this file by default.

As I wrote before, you can not run the ardupilot binary on a RPi with no Navio2 connected. Ardupilot needs the sensors on the Navio to be present, or it will not start.
You will also not be able to connect the Navio2 to the second RPi and then start ardupilot while flying. What will control the drone while ardupilot is starting? There will also be problems with sensor calibration, EKF estimations, GPS might not have a fix immediatly again and certainly a load of other things. You could make something like this work with a rover, which can simply stand and wait till the control is ready on the other hardware, but on a copter you do not have time, perhaps not even miliseconds, before it falls out of the sky.

Thank you for your answers.
I asked where the mission is stored above.
And I remember you answered that the mission is stored in the navio2 memory.
The binary file in raspberry pi is understood to read and operate the mission in navio2.
That’s why I asked you this question.
First of all, if GCS hands over the mission mission with a drone, we will save the mission mission mission in the memory of navio2 and proceed in the form of raspberry pi 2 when raspberry pi 1 is down while raspberry pi 1 is down.
However, the power of the navio2 is still on and only the gpio pin is switched on.
Then, since the mission tasks stored in navio2 remain the same, wouldn’t binary files in raspberry pi 2 be able to read and act on the mission tasks in the memory of navio2?
This is how my idea works.
Please give me some advice if there’s anything I’m missing.

It may be difficult to understand because I am not good at English and translating with a translator.
Please excuse me.
Thank you.

Hello
Thank you for your answers.
Once you have found a way to operate the booted rpi without navio2.
We initially assumed that there was a rpi booted without navio2 and later connected navio2.
It didn’t work immediately when I did the above, but when I did the sudo systemctl start arducopter, I found it working properly.
And as you said, I know it’s very dangerous to switch from raspberry pi 1 to 2 in the air.
So I want to develop technology through trial and error.
And I’m writing to the Navio2 community to get advice from people who are smarter and more skilled than me.

Finally, I couldn’t switch from raspberry pi 1 to 2 in the air.
Could you tell me what it means to say that you can’t run an adupilot on a flight?

Please check.
Thank you.

Hello
Let me tell you what I want to do first.
I am producing redundant FC with raspberry pi computer module.
We are building a PCB board that can connect two raspberry pi computer modules, and we are configuring a pin map such as raspberry pi 3b+ to connect the navio2.
In addition, the two-way switching circuit is configured so that the raspberry pi 1 and 2 gpipins can be connected to the pin map.
Also, 5V, 3.3V, and GND supplied to navio2 are configured to be uninterrupted using power supplied to the board.

First of all, I understand that the ardupilot software and navio2 in raspberry pi are connected and the drone is working.
And if GCS takes a waypoint and gives a mission to the drone, it stores the mission contents in the navio2 memory, and I understand that the arupilot software in raspberry pi reads the mission tasks in the navio2 memory and performs the mission.
So, if raspberry pi 1 is first performed and raspberry pi 1 is down, I think raspberry pi 2 will be able to perform the mission by running “sudo systemctl start arducopter” and reading the mission in navio2’s memory.
Is there anything that you think is impossible or unreasonable about what I think?
If you do, please let me know.
Please check it.
Thank you.

I wish you all the best for your project, but there are a few things bothering me:

  1. Two RPis and one Navio is not truely redundant. For redundancy, you would also need two Navios.

  2. This is a very complicated solution for a problem that very rarely occurs. How long does a copter usually fly? 20mins, 30mins? How big is the chance for the RPi to fail in that timespan?

  3. Navio2 has no “memory”. It is just a sensor HAT. You can not get the mission from one RPi to the other without using a some form of GCS. If you have two complete FCs, you could upload the mission to both and let the second FC take over in flight.

  4. For ardupilot (copter, plane, rover) to work, the vehicle needs to be motionless during startup, so the gyroscopes can be calibrated. You could perhaps get away with skipping this step on a rover, but not on a plane or a copter.

Thank you for your answer.
I’ll reply to what you said.

  1. You said that two rpi and one navio2 don’t really overlap, can you tell me why?
    First, we’re going to create a model that uses two rpi and one navio2 and a model that uses two rpi and two navio2.
    So what we’re developing first is a model that uses two rpi and one navio2.

  2. What you said is the correct answer.
    There is a slim chance that rpi will fail during drone flight.
    But I don’t think my project will be completely useless.
    I think we can apply that technology elsewhere.

  3. I think I read above that the mission data is stored in the memory of navio2.
    It’s in an article posted on December 20, 2020.
    Mission data is stored in memory as a parameter, not as a file.
    Is the memory mentioned above raspberry pi, not navio2?
    I wonder who is right.

  4. Before flying for the first time, we would like to calibrate the gyroscope by connecting both rpi 1 and 2 with navio2.
    And then I’m going to start flying, will it be a problem?

Please check.
Thank you.

Why do you want to develop the more complicated version first?

Redundancy is a very complicated topic. A FC usually consists of a brain (MCU or in your case the RPi) and a set of sensors. If you only double the brain and not the sensors, the sensors are still a single point of failure.
The mission data is stored in eeprom on MCU based flightcontrollers. Eeprom gets emulated as a file on CPU based flightcontrollers as far as I know. The mission data is not stored on the Navio itself.

It does not work that way. Ardupilot can not run without access to the sensors. It will not start and it will crash as soon as it looses connection to the sensors. The gyro calibration is done on every startup. As soon as ardupilot is shutdown/crashed there will be a new calibration during the next startup. So you can switch the Navio back and forth, but you will never have two flightready instances of ardupilot.

  1. [quote=“schuermannsebastian, post:36, topic:22787”]
    The mission data is stored in eeprom on MCU based flightcontrollers. Eeprom gets emulated as a file on CPU based flightcontrollers as far as I know.
    [/quote]

The RPi is a CPU based flightcontroller.

I am sorry, you can keep asking the same questions, but I can only give you the same answers again and again.
In my opinion there is no way to make your project (two RPis, one Navio) work.

Hello.
Let me ask you one last question.
Rpi is a cpu-based flight control computer.
And you said that the cpu-based flight control computer is emulated as a file, so I wonder exactly where it is.
I want to synchronize the files.
First of all, as mentioned above, I think the mission and log remain in the var/lib position, is that right?
I’m curious about this.

Hi @osung1598,

Navio2 is a customizable product, so there can be many things you can do with it. However, I agree with Sebastian that the system you described doesn’t seem feasible to implement. Navio2 needs to have its own compatible Raspberry Pi with the installed image to operate correctly. I believe you can stick to the suggestions that Marc and Sebastian have provided previously to make an approachable setup.

We can’t confirm that your setup will work correctly without any hardware or software related issues as you plan to use the configuration outside of the tested ones. The only configuration we can recommend is the one that is described in our and ArduPilot’s docs.