Home        Store        Docs        Blog

Pymavlink with ardsubu beta

Anyone else experience troubles when trying to run the example code of pymavlink when using ardusub version beta (4.0.0) ?
setting pwm to channels works fine with stable version but as soon as im trying to arm the or set some thrust when using version 4.0.0 the thrusters turn in max speed

Hi @arend,

Do you mind testing 4.0.1 (ardusub-stable tag in github) or 4.1-dev (master in github)?
We are about to announce the 4.0.1 stable and I’m afraid your code could be a little outdated.

Hi @williangalvani

I’ve tried it again today. It seems that I’ve used some outdated set_rc_channel_pwm function. But, after updating the the current version (http://www.ardusub.com/developers/pymavlink.html) i get the following exception
TypeError: rc_channels_override_send() takes at most 12 arguments (21 given).

Im using version 4.0.1 and a companion with version 0.0.19.

To be more precise if im using the ols version of set_rc_channel_pwm then the the thrusters run at max no matter what pwm command im sending.

Hope you can help me further

Hi @arend,

Can you check your pymalink version with pip show pymavlink?

It works fine here with pymavlink==2.4.0

Hi @williangalvani.

I see that that I’m using pymavlink version 2.2.4. I’ll upgrade to 2.4.0 and check it again

Hi @williangalvani

I’ve just upgraded pymavlink to version 2.4.0. The error disappeared but now as before it runs the thrusters with full speed.

I’ve tested a bit more to try and localize the error and it seems that this thing happen as soon as i arm the system. I’ve commented the set_rc_channel command and as soon as the rov is being armed the thrusters run with full power…

Hi @arend

So you script is only arming? In Manual mode?
What is your setup? Is it a BlueRov?
What ESCs are you using?

Yes @williangalvani , I’ve commented everything out for debugging purposes and they only thing I’m doing now is arming the Rov.
It’s a blueRov with 8 thrusters and im suing bluerobotics basic ESC for all the thrusters.
companion version 0.0.19 and pixhawk firmware version 4.0.1

Hi @arend,

Can you share a log? Both Telemetry log and Dataflash log should be fine.

Hi @williangalvani

Here are the two logs files. Hope it helps. I really dont understand why it works fine with firmware version 3.5.4 but runs all thruster on max with version 4.0.0 or 4.0.1 with the same script

log_0_UnknownDate.bin (3.9 MB) log1.bin (1.8 MB)