Controlling servos with mavros error

Hello

I have written a program that controls my 4 motors of my boat (based on the navio2 examples).
When ardupilot isn’t running, everything just works fine.
But if I run ardupilot, to get access to the mavros topics, my program won’t work anymore.
I get this error:

Is this a common problem?
And how can I fix it?

Thanks in advance!

Kind regards Robbe

Hi @rcommissaris11!
You can’t use ardupilot and your application in the same time, because they are using similar resources. Therefore this is a normal program execution result. :frowning:

Hello

Thanks for the reply!
I have just removed the navio.util.check_apm() and it works fine right now.
Will this give me problems?

@rcommissaris11, delete check_apm was great idea, because it really fixes your problem. :ok_hand: But right now you have new problem…

Your application and ardupilot use same motors, so you will get undefined behavior in time, when both programs try to change motor’s condition. Please, don’t use this hack in tests.

You can config your motors by QGroundControl. Have fun! :slightly_smiling_face:

1 Like

I don’t use motors in apm, so It didn’t assign them.
So I would think apm can’t control my motors and I have no problem.

APM uses motors without your control. Therefore you should set Airframe as undefined or change motors for ardupilot in QGC. Otherwise, you will have a problem.

Ok, thanks for the help!

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.