I am currently working on the blue rov , currently im trying to move a motor by using some sort of python script. I am struggling to connect (it never detects a heartbeat) currently im trying udp access, but before I was trying to do a serial connection both with no luck.
The ROV doesnt have wifi and I think its making it impossible for me to do any internet connection with it. I could be wrong, but as for as im aware this doenst have any local or public internet access.
I’ve looked at countless forums and I still am having zero luck with running any script through my surface laptop.
import time
from pymavlink import mavutil
class ROV_Infos:
def init(self, url: str): # Correct constructor
print(“ROV_Infos init”)
self.url = url
def connect(self):
master = mavutil.mavlink_connection(self.url)
# Wait for the connection to be established (unnecessary if pymavlink handles this internally)
master.wait_heartbeat() # This waits until the first heartbeat is received from the vehicle
# Get some information!
while True:
try:
print(master.recv_match().to_dict())
except:
pass
time.sleep(0.1)
if name == ‘main’: # Corrected if statement
print(“pymavlink.py”)
rov = ROV_Infos('udpin:198.168.2.2:14550')
rov.connect()
Ik the ip is 192.168.2.2 not really sure about the port number honestly, it seems like most people suggest 14550, this might be a problem not sure.
I went to 192.168.2.2/network and it shows me that it cant connect to any internet and it and it lists all these active services
- dvl-service
- mavlink2rest
- bridgemanager
- wldriver
- nmearx
- file-manager
- audio
- commrouter
- webterminal
- webui
- video
- mavproxy
Maybe im using the wrong port or something I’ve spent a week working on this part and I feel absolutely stuck at this point. Thank you guys so much in advanced.
Any hints on how to make this start working or how the connection even works to being with will be much appreciated.