You are welcome, glad to be of help!
Ubuntu 20 + Python3 setup
Hi, thank you so much for your help!
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
Any advice would be appreciated
launchSitl "can't find '__main__' in module in ' ' error
I am running SITL in 20.04 without issue.
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?
This guide was super amazing. You’re awesome.
I was able to finish the course with Python3 and Ubuntu 20.04!
I was also able to test all codes for the drone programming primer on an ARM version of Ubuntu on Paralles on my M1 Mac with few binary builds.
I hope to provide some guides too.
You’re welcome.
Have you been able to finish with the precision landing course using Ubuntu 20.04, Python3 and ROS2 as you purported?
I’d love to know about your experience and possible issues with that as I’m about to engage with the course.
Thanks.
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
Any help please
I am running this as you want configured, but also with double aruco markers.
Try running the sim_vehicle first and wait a bit, then in a 2nd terminal run gazebo and it should connect.
…/Tools/autotest/sim_vehicle.py -f gazebo-iris
roslaunch gazebo_ros iris_world.launch
or in my case:
roslaunch gazebo_ros iris_world.launch world_name:=“2_arucos.world”
Also note: https://community.dojofordrones.com/t/full-gz-sim-on-22-04-lts/805/6
I just get Link 1 down
I need a full setup guide for Ubuntu 20 + python3. I might be missing something I feel. I’ll start a new thread so others can refer as well.
Is there anything else specifically that I need to do? I’m facing the same issue again, just getting 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:
Mav proxyside:
STABILIZE> AP: ArduCopter V4.5.0-dev (73480438)
AP: 9fad16e380df4b3eb4b4973ca08fc722
AP: Frame: QUAD/PLUS
Got COMMAND_ACK: REQUEST_AUTOPILOT_CAPABILITIES: ACCEPTED
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…
should be using Copter V3.3 when using ./launchSitl basic_template.py (or any of the template scripts)
to run dronekit SITL instance, MAVProxy, QGC, dronekit script.
restart and install from scratch.
you can install
MAVProxy==1.8.34
pymavlink==2.4.8
dronekit==2.9.2
dronekit-sitl==3.3.0
I have been able to get past ‘Launch QGC with DroneKit Script part 3’ after properly installing
after cloning repo
git clone -b Copter-4.3.7
don’t forget to run
./install-prereqs-ubuntu.sh
then
git submodule update --init --recursive
SEE:
Failed for submodule update --init --recursive - Course Questions - Drone Dojo (dojofordrones.com)
and review this thread from the top.
Watch the videos as you follow along with building.
(I just ran using Python 3.8.10)
@dash @jax200 thank you for all your hard work and dedication. Thank you to everyone who has been working on this project. Have a blessed holiday.