I just would like to thank you dash for sharing your experience here. Thanks to your information, I just went through the DPP course successfully! Mine was as follows.
As you suggested, what I did was to downgrade pymavlink==2.4.15–>>pymavlink==2.4.8 in the virtual environment and hand over vehicle object to some functions. Since I use a very old laptop (EPSON Endeavor) in which Ubuntu 20.04.2 LTS was already installed, your information helped me a lot!
I have however been experiencing the following timeout error and have no idea why…
Starting copter simulator (SITL)
SITL already Downloaded and Extracted.
Ready to boot.
Connecting to vehicle on: tcp:127.0.0.1:5760
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/python3.8/dist-packages/dronekit/mavlink.py”, line 211, in mavlink_thread_in
fn(self)
File “/usr/local/lib/python3.8/dist-packages/dronekit/init.py”, line 1370, in listener
raise APIException(‘No heartbeat in %s seconds, aborting.’ %
dronekit.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/python3.8/dist-packages/dronekit/init.py”, line 3166, in connect
vehicle.initialize(rate=rate, heartbeat_timeout=heartbeat_timeout)
File “/usr/local/lib/python3.8/dist-packages/dronekit/init.py”, line 2275, in initialize
raise APIException(‘Timeout in initializing connection.’)
dronekit.APIException: Timeout in initializing connection
I can tell from your other posts you have a better grasp on code than I, so my only take is either you did not install something correctly or you ran the SITL incorrectly.
Is this through the bash launchSitl or sim_vehicle.py ?
Are you in virtualenv ?
If you want to print out your install steps and how you executed the SITL I would be happy to look at it. Maybe list out your bash file too.
Hey @dash! Thank you very much for this huge update! I tried the drone programming course with the old set-up but ran into the “submodule update --init recursive” issue so I am going to scrap it and try with updated versions of software. Have you also done the prcision landing module with this updated software?
Hi @dash I am struggling to get stuff set up with python3, ros noetic and ubuntu 20. It would really help me if you had a detailed FULL setup because I am facing issues otherwise. If you can create a detailed guide it would be great. Thanks.
I am getting this when I run …/Tools/autotest/sim_vehicle.py -f gazebo-iris
I am using gazebo-11 btw. And I ran gazebo before I ran this command.
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/jashshah999/courseRoot/apm/ardupilot/build/sitl/bin/arducopter -S -I0 --model gazebo-iris --speedup 1 --defaults /home/jashshah999/courseRoot/apm/ardupilot/Tools/autotest/default_params/copter.parm,/home/jashshah999/courseRoot/apm/ardupilot/Tools/autotest/default_params/gazebo-iris.parm
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> link 1 down
Anyone get the following error when setting up the initial dronekit template with python 3.10?
AttributeError: module ‘collections’ has no attribute ‘MutableMapping’
I looked it up and tried all the fixes from here for the collections issues in the Init PY file, but none of them seemed to work for me still get the same error. Anyone have any ideas?
I then updated dronekit via the github and removed the pip version and its hanging on the connection and timing out.. going to play with it a bit.. I se the following in the mavproxy terminal so its connecting.. but nothing is returned as in the video output instead just times out on the python side like its waiting for something that never returns:
Python Side:
File “/usr/local/lib/python3.10/dist-packages/dronekit-2.9.2-py3.10.egg/dronekit/init.py”, line 2419, in wait_ready
dronekit.TimeoutError: wait_ready experienced a timeout after 30 seconds.
OK I mostly fixed it for now… I removed wait_ready = True
It didnt return the data but it did loop till I was armable and switched the modes… so its working but its not as interactive since you can wait on returning data. If anyone has any ideas on why mavlink might not be responding let me know…