Connection between dronekit-sitl and MAVProxy

Hello,

My goal is to connect mission Planner ( it runs on windows to simulate another PC different than the virtual machine ) to the dronekit-sitl by using the MAVProxy which also run on VM
i am new to the ardupilot community but i got some problems
i was able to build the ardupilot code using waf for ubuntu ( Ubuntu 16.04 in VMWare), i also install dronekit and dronekit-sitl with pip
i also install MAVProxy as the page explained

I was reading the example on how to connect dronekit-sitl using the MAVProxy but once i run the command in the terminal i got some errors.
I have 2 terminals:

  • the first one i run the following command dronekit-sitl copter in order to simulate a copter. This one runs fine and it is waiting for connection
  • the second terminal, i want to connect to the above simulated copter and then forward to the UDP port in order to be able to connect them with the GCS in windows. I am running this command

mavproxy.py --master tcp:127.0.0.1:5760 --out=udpout:THE_IP_OF_MY_WINDOWS_PC:14550

but i get this error

Connect tcp:127.0.0.1:5760 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from tcp:127.0.0.1:5760
MAV>

Init APM:Copter V3.3 (d6053245)

Free RAM: 4096
FW Ver: 120

load_all took 0us
0 0 0 online system 1
STABILIZE> Mode STABILIZE
Exception in thread main_loop:
Traceback (most recent call last):
File “/usr/lib/python2.7/threading.py”, line 801, in __bootstrap_inner
self.run()
File “/usr/lib/python2.7/threading.py”, line 754, in run
self.__target(*self.__args, **self.__kwargs)
File “/home/jimmyenroute/.local/bin/mavproxy.py”, line 783, in main_loop
master.wait_heartbeat()
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 383, in wait_heartbeat
return self.recv_match(type=‘HEARTBEAT’, blocking=blocking)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 344, in recv_match
m = self.recv_msg()
File “/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py”, line 318, in recv_msg
msg = self.mav.parse_char(s)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/dialects/v10/ardupilotmega.py”, line 9257, in parse_char
self.__callbacks(m)
File “/usr/local/lib/python2.7/dist-packages/pymavlink/dialects/v10/ardupilotmega.py”, line 9234, in __callbacks
self.callback(msg, *self.callback_args, **self.callback_kwargs)
File “/home/jimmyenroute/.local/lib/python2.7/site-packages/MAVProxy/modules/mavproxy_link.py”, line 460, in master_callback
mavutil.mavlink.MAV_TYPE_DODECAROTOR]:
AttributeError: ‘module’ object has no attribute ‘MAV_TYPE_DODECAROTOR’

i have tried to update the MAVProxy and pymavlink using pip but pip said that it is up to date

Does someone have an idea where i am doing something wrong?

thank you in advance

That’s the same error as here:

You should be running pymavlink 2.2.10

Thank you
after uninstall pymavlink and reinstall the correct one. it worked!

Thanks for the tip it only took me 4 hours before I found this! haha