launchSitl


#1

I am on the Script to Automatically launch QGC with dronekit script part 3 in the drone programming primer class and i cant get passed it. When i insert in launchSitl basic_template.py, its saying that there is no heartbeat i been stuck on this problem for so long and trying everything to get past it…
Thank you.

lorenzo@lorenzo:~/courseRoot/dk$ launchSitl basic_template.py
os: linux, apm: copter, release: stable
SITL already Downloaded and Extracted.
Ready to boot.
Execute: /home/lorenzo/.dronekit/sitl/copter-3.3/apm --home=44.5013, -88.0622,0,180 --model=quad -I 0
Options:
–home HOME set home location (lat,lng,alt,yaw)
–model MODEL set simulation model
–wipe wipe eeprom and dataflash
–rate RATE set SITL framerate
–console use console instead of TCP ports
–instance N set instance of SITL (adds 10*instance to all port numbers)
–speedup SPEEDUP set simulation speedup
–gimbal enable simulated MAVLink gimbal
–autotest-dir DIR set directory for additional files

Link timeout, no heartbeat in last 5 seconds
No heartbeat in 30 seconds, aborting.
Traceback (most recent call last):
File “basic_template.py”, line 63, in
vehicle = connectMyCopter()
File “basic_template.py”, line 23, in connectMyCopter
vehicle = connect(connection_string,wait_ready=True)
File “/home/lorenzo/.local/lib/python2.7/site-packages/dronekit/init.py”, line 2845, in connect
vehicle.initialize(rate=rate, heartbeat_timeout=heartbeat_timeout)
File “/home/lorenzo/.local/lib/python2.7/site-packages/dronekit/init.py”, line 2117, in initialize
raise APIException(‘Timeout in initializing connection.’)
dronekit.APIException: Timeout in initializing connection.
/usr/local/bin/launchSitl: line 27: 5360 Killed /usr/local/bin/QGC.AppImage 2> /dev/null


launchSitl "can't find '__main__' in module in ' ' error
Launch QGC with dronekit script part3
#2

I believe I had a similar problem. I modified the launchSitl script as follows:

##Launch a SITL instance

##/home/david/anaconda2/envs/dpp/bin/dronekit-sitl copter --home=44.5013,-88.0622,0,180 &

~/courseRoot/apm/ardupilot/build/sitl/bin/arducopter -S -I0 --home=44.5013,-88.0622,0,180 --model “+” --speedup 1 --defaults /home/david/courseRoot/apm/ardupilot/Tools/autotest/default_params/copter.parm &

I know this doesn’t specifically identify what was wrong, but it a least allowed me to get past the error.


Ubuntu 18.04.6 (course build); "Launch QGC with DK script part3" mode GUIDED loop hanging (launchSitl basic_template.py)
#3

Hey Dsetin, thank you. Found the file and edited it. Works perfect now
Thank you.


#5

1st: @dsetin19 10 points


closed #6