Commands with dronekit codes

Hello
I want to control my navio2 with dronekit commands I tried to run this line in my navio2. python ./vehicle_state.py --connect udp:127.0.0.1:14550 While my navio and GCS connected to same wifi I put this command to navio and I had some errors like this:

Connecting to vehicle on: udp:127.0.0.1:14550
WARNING:dronekit:Link timeout, no heartbeat in last 5 seconds
ERROR:dronekit.mavlink:Exception in MAVLink input loop
Traceback (most recent call last):
File “/usr/local/lib/python2.7/dist-packages/dronekit/mavlink.py”, line 211, in mavlink_thread_in
fn(self)
File “/usr/local/lib/python2.7/dist-packages/dronekit/init.py”, line 1371, in listener
self._heartbeat_error)
APIException: No heartbeat in 30 seconds, aborting.
Traceback (most recent call last):
File “./vehicle_state.py”, line 38, in
vehicle = connect(connection_string, wait_ready=True)
File “/usr/local/lib/python2.7/dist-packages/dronekit/init.py”, line 3166, in connect
vehicle.initialize(rate=rate, heartbeat_timeout=heartbeat_timeout)
File “/usr/local/lib/python2.7/dist-packages/dronekit/init.py”, line 2275, in initialize
raise APIException(‘Timeout in initializing connection.’)
dronekit.APIException: Timeout in initializing connection.

How could I connect them and send commands from ssh to my navio?

Hi Ummuhan,

Please double-check the default ArduCopter is disabled on boot by running sudo emlidtool ardupilot . In the boot section, you need to select disable .

If it doesn’t help, you can try increasing the timeout parameter to 120 seconds or even more in the _ _ init _ _.py file from Dronekit. Sometimes, loading parameters may take up to 2 minutes, which causes this timeout issue.

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