Pymavlink- heartbeat

What version of Ardusub are you running??

Experiment setting all channels to 1500 in the beggining of the code. I’m suspicious that the 65535 “don’t touch this channel” might not be working properly.


We sent 1500 to all channels we still can’t control the motors, they are still turning at very high speed until we cut the power. What can we do in order to 65535 ‘‘Don’t touch this channel’’ work properly?
image

do they stop if you send 1000 to all?

No they don’t. We can’t stop the motors . we gave pwm values from 1000 to 1700, but they keep working at full power .We use these esc

. we think that our esc can be the reason for this problem . can’t they ?

Yes, they are probably the main issue. even if you could stop them by sending 1000 or 1100, you wouldn’t be able to reverse

Thank you for your attention. We ordered the bluerobotic escs. We will try to use them tomorrow we hope that we will not face any problems.

You can try typing the time.sleep(5) command under set_rc_channel_pwm (5,1500). Since the codes are in a while, it may be passing the set_rc_channel_pwm(5,1500) command quickly.

time.sleep eklediğimizde hiç durduramadık. if ekleyerek döngüyü kontrol ettik. 1580 ile başlayıp 1512 verince durdu tekrar yapınca olmadı esclerın pwm değerleri gömülü olduğundan sanırım dışarıdan çok müdahale edemiyoruz.bunun sebebini esclerden kayaklandığını düşünüyoruz, çünkü 1500 orta pwm in bi tık üstünü vermemiz halinde bile son hızda çalışıyo r.BlueRobotics in esclerini aldık. Bu aldığımı escleri kalibrasyon yapmamıza gerek var ? Bu konu hakkında yardımcı olabilir misin ?
@enis.getmez

BlueRobotics escleri için herhangi bir kalibrasyon yapmanıza gerek yok. farklı bir esc kullanıyorsanız onu da parametrelerden aldığı pwm aralığını ayarlamanız gerekiyor. Sonra yazılımda da örneğin 1000-1700 arasındaysa 1350 motorları durdurur. Ama

def set_rc_channel_pwm(channel_id,pwm=1500):

kısmını
def set_rc_channel_pwm(channel_id,pwm=1350):
olarak gönder default olarak 1350 alsın

Bluerobotics esclerine geçtiyseniz sorun yok kodu olduğu gibi kullanabilirsiniz.

Hi,
I have tried the example again. Unfortunately I cannot get data. I don’t have any idea about what’s going on. Companion can communicate with QGroundControl. Everything is okey when I use mavlink on the companion, but the topside computer gives empty output everytime. I guess there is a mistake about connection.

from pymavlink import mavutil

master = mavutil.mavlink_connection('udpin:192.168.2.1:14550')

while True:
    try:
        print(master.recv_match().to_dict())
    except:
        pass
    time.sleep(0.1)

Hi @Sena, does QGC work in your surface computer ?
If so the following example also should work, are you running it under windows ? maybe can be a firewall configuration that you are missing for the python executable.

you can delete time.sleep()