I’m trying to control the BlueROV2 thrusters autonomously with PWM values it receives via serial from a Raspberry Pi 3. I’ve referenced Pymavlink · GitBook and Pymavlink- heartbeat. What happens is that the thrusters don’t respond at the same rate as the data coming in from the Raspberry Pi.
The Raspberry Pi communicates through MAVLink (master = mavutil.mavlink_connection("/dev/ttyS0", baud=57600))
I know that all system components that communicate via MAVLink are expected to send a HEARTBEAT message at a constant rate of at least 1 Hz. Is there a method to ensure that Raspberry Pi sends a message at a rate of at least 1 Hz? Or other ideas?
Another issue I’m having is that waiting a heartbeat (master.wait_heartbeat()) takes 5 minutes or more to respond. I give up waiting for a response if it takes over 5 minutes. It shouldn’t take over 5 minutes for a response to occur. I’ve tried restarting the Pixhawk and Raspberry Pi and that doesn’t solve the problem. Any ideas how to fix this response issue?