Error with Build from Source on Navio2

Hello everyone,

I try to install Arduplane 4.0.9 on Navio2 from sources.

Main goal was to use an openHD/RubyHD img then add the Navio2 APM layer.

So, the compilation seems to be ok, but when I launch the arduplane service, I obtain the following error, and the led on the Navio2 board stay fixed blue (and not the yellow blink as usual).

Output of systemctl status ardupilot :

● ardupilot.service - ArduPilot for Linux
Loaded: loaded (/etc/systemd/system/ardupilot.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2021-09-22 20:30:16 UTC; 14s ago
Docs: https://docs.emlid.com/navio2/navio-ardupilot/installation-and-running/#autostarting-ardupilot-on-boot
Process: 17908 ExecStart=/bin/sh -c /home/pi/ardupilot/build/navio2/bin/arduplane ${ARDUPILOT_OPTS} (code=exited, status=1/FAILURE)
Main PID: 17908 (code=exited, status=1/FAILURE)

Thank you for your Help

Regards

Marc

Hi Marc,

Welcome to our community forum!

Have you tried following these instructions? I suppose something is wrong with the configuration in the /etc/systemd/system/ardupilot.service file. You can post it here so I can take a look.

Hi liudmila slepova,

Yes, the link that you refers, is exactly what I used. My ardupilot.service file is the following:

[Unit]
Description=ArduPilot for Linux
After=systemd-modules-load.service
Documentation=https://docs.emlid.com/navio2/navio-ardupilot/installation-and-running/#autostarting-ardupilot-on-boot
Conflicts=arduplane.service arducopter.service ardurover.service

[Service]
EnvironmentFile=/etc/default/ardupilot

###############################################################################
####### DO NOT EDIT ABOVE THIS LINE UNLESS YOU KNOW WHAT YOU"RE DOING #########
###############################################################################

Uncomment and modify this line if you want to launch your own binary

#ExecStart=/bin/sh -c “/home/pi/ardupilot/build/navio2/bin/arduplane ${ARDUPILOT_OPTS}”

CAUTION

There should be only one uncommented ExecStart in this file

###############################################################################
######## DO NOT EDIT BELOW THIS LINE UNLESS YOU KNOW WHAT YOU"RE DOING ########
###############################################################################

Restart=on-failure

[Install]
WantedBy=multi-user.target

thanks for your support

Marc,

Oh, it seems that you just need to uncomment this line:

Please make sure to run sudo systemctl start ardupilot && sudo systemctl enable ardupilot afterward. Let me know whether it worked out.

Hi, i did typo error on my last reply.

I still uncomment the line where I defined the binaries location.

I use “sudo” to execute this and to enable auto launch.

Any other idea ?

Marc,

It’s hard to say right now. Please double-check that /home/pi/ardupilot/build/navio2/bin/arduplane is not empty.

You can run sudo journalctl -u ardupilot to see a more detailed launch status output. It can help you figure out why it didn’t get launched.

Liudmila,

there is the compiled binaries in the /home/…/navio2/bin/ folder (I also tried with precompiled binaries from ardupilot server).

If I try “sudo journalctl -u ardupilot” the output is : No journal files were found

I also have the following error : /sys/class/pwm/pwmchip0/pwm0/duty_cycle: No such file or directory

Is-it plan on Emlid side to provide a new image file with newest Arduplane/copter/rover version ?

If I try to install navio2 on other raspbian image, do I need other prerequisites files, emlid config tool, or other, i don’t know?

Marc

Hi Marc,

We don’t have such plans for the near future. But you should be able to use the custom binary of ArduPilot firmware. Some Navio2 users work with the newer versions.

Do you mean the official Raspberry Pi OS images? If so, it won’t be possible as those don’t have the configurations needed for Navio2 to work like RCIO code.

I believe it’s better to delete all the files and start over again. Maybe, something was lost during the installation.

This post was flagged by the community and is temporarily hidden.