Servers by jDrones

Mavproxy got wait_heartbeat() timeout error with copter 3.6 or the latest daily version

Hello everyone,
i am try to test add some new mavlink message to common.xml, i followed the link: http://ardupilot.org/dev/docs/code-overview-adding-a-new-mavlink-message.html
and everythin just fine until i rebuild pymavlink to include my custom message,

after i remove pymavlink with sudo pip uninstall pymavlink, and cd to ardupilot/modules/mavlink/pymavlink, run python setup.py install --user, the install is succeed.

after that, run
cd ardupilot/ArduCopter
sim_vehicle.py -w

i got an mavproxy error:

SIM_VEHICLE: Using defaults from (/home/okfox/MyPiramid/APM/ardupilot/ardupilot/Tools/autotest/default_params/copter.parm)
SIM_VEHICLE: Run ArduCopter
SIM_VEHICLE: "/home/okfox/MyPiramid/APM/ardupilot/ardupilot/Tools/autotest/run_in_terminal_window.sh" "ArduCopter" "/home/okfox/MyPiramid/APM/ardupilot/ardupilot/build/sitl/bin/arducopter" "-S" "-I0" "--home" "-35.363261,149.165230,584,353" "-w" "--model" "+" "--speedup" "1" "--defaults" "/home/okfox/MyPiramid/APM/ardupilot/ardupilot/Tools/autotest/default_params/copter.parm"
SIM_VEHICLE: Run MavProxy
SIM_VEHICLE: "mavproxy.py" "--master" "tcp:127.0.0.1:5760" "--sitl" "127.0.0.1:5501" "--out" "127.0.0.1:14550" "--out" "127.0.0.1:14551"
RiTW: Starting ArduCopter : /home/okfox/MyPiramid/APM/ardupilot/ardupilot/build/sitl/bin/arducopter -S -I0 --home -35.363261,149.165230,584,353 -w --model + --speedup 1 --defaults /home/okfox/MyPiramid/APM/ardupilot/ardupilot/Tools/autotest/default_params/copter.parm
Connect tcp:127.0.0.1:5760 source_system=255
Log Directory: 
Telemetry log: mav.tlog
MAV> Waiting for heartbeat from tcp:127.0.0.1:5760
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 "**/usr/local/bin/mavproxy.py**", line 811, in main_loop
    master.wait_heartbeat(timeout=0.1)
**TypeError: wait_heartbeat() got an unexpected keyword argument 'timeout'**

before i rebuild pymavlink, sim_vehicle.py work perfectly. this error only show up after i rebuild pymavlink.

when i got the error, if i run sudo pip uninstall mavproxy,
then sudo pip install --update mavproxy,
sim_vehicle.py -w work fine, have no error, but my custom mavlink message can not route, that’s normal.

now , if i rebuild pymavlink, the error will show up again, so i can not test my custom mavlink message with SITL.

It seems like mavproxy have some problem.
Anyone got the same issue, can you give me some clue?

pip list
Package Version


adium-theme-ubuntu 0.3.4
cycler 0.9.0
decorator 4.0.6
dnspython 1.12.0
empy 3.3.2
future 0.17.1
lxml 4.2.5
matplotlib 1.5.1
MAVProxy 1.7.7
numpy 1.11.0
Pillow 3.1.2
pip 18.1
pycrypto 2.6.1
pymavlink 2.2.8
pyparsing 2.0.3
pyserial 3.4
python-dateutil 2.4.2
pytz 2014.10
scipy 0.17.0
setuptools 20.7.0
six 1.10.0
unity-lens-photos 1.0
wheel 0.29.0
wxPython 3.0.2.0
wxPython-common 3.0.2.0

You need to be using pymavlink 2.2.10 or newer. Since you’re building from source, you will need to pull in (known as “rebasing”) all the pymavlink changes from Github that came in after when you downloaded the source code.

@stephendade
thanks for reply,
where to get pymavlink 2.2.10 source code ?


or https://pypi.org/project/pymavlink/ ?

Yes, source code is from the Github link you posted.

@stephendade
i download the source code from github.
As you said, “you will need to pull in (known as “rebasing”) all the pymavlink changes from Github that came in after when you downloaded the source code.”
how to pull in all the pymavlink changes, can you tell me the command, i am a little confusing.

First cd to ardupilot
then git remote add upstream https://github.com/ArduPilot/ardupilot.git
then git pull --rebase upstream master

The first command you only need to run once - it adds the github repository as a link with the name “upstream”

The second command pulls in any changes to the ardupilot repository from github and puts it alongside your changes. Run this anytime to update the code.

Hi stephendade
thanks for reply,again.

i use pymavlink version 2.2.20, and the problem saved, thanks alot.

Servers by jDrones