Launch QGC with dronekit script part3


#1

Hi! i cannot find a solution for launchSitl basic_template.py? Do someone know how to solve this? i have been stuck here for a while now :confused:


#2

Hey there,

Solution 1:

  1. Try “sudo apt-get install screen”. Maybe your screen dependancy is not installed. After this run it again. It might work.

Solution 2:

  1. Maybe your pvmavlink is of a higher version, apparently pymavlink >2.0 has an issue so pip uninstall pymavlink and then pip install pymavlink==1.1.69. Maybe that is the issue.

Solution 3:

  1. Last solution I can think of is to try and modify the script.
  2. I found a similar problem on a previous thread, follow this and try:
    launchSitl

#3

Thanks for your time helping me :slight_smile: !

The second option was the solution get it through but now i am stuck waiting for the guided mode which i earlier solved by installing pymavlink==2.0.6. is there any ideas? :confused:





#4

Hey,

When you run …/Tools/autotest/sim_vehicle.py from ardupilot/ArduCopter, then wait for a minute or so until you see EKF2 and then type “mode guided”. Do this before you run anything else that you need guided mode for. After you run this, you can run the script. It should work.

Thanks

Jash


#5

Also maybe try posting this as a different doubt so that it can help others in case they face the same doubt, they will not be able to locate it on this chain


#6

i am doing something wrong here?


#7

Hey,

Try running …/Tools/autoset/sim_vehicle.py -f gazebo-iris -v ArduCopter from the ardupilot.ArduCopter directory. And then go into guided mode. After that run your script. If that doesn’t work please attach your script to check


#8


Sk%C3%A4rmbild%20(189)|690x388


#9

From what I can see you have still not run “…/Tools/autotest/sim_vehicle.py -f gazebo-iris -v ArduCopter”. I do not know why but in this text box, I am typing two dots but three dots are showing up in the command. That command should run, only then will your other script work.
image Run it with two dots like this.


#10


#11

Two dots, not three. And without the inverted commas.


#12

¨

same result :confused:

Thanks for your patience, i am in my learning process :slight_smile:


#13

Remove the quotation marks before and after the command


#14


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

Hmm this is progress. I think you haven’t installed ArduPilot correctly. Follow these steps once:

  1. Uninstall Ardupilot once (delete the repo)
  2. Go to the directory you want to install (on your terminal) and “git clone https://github.com/ArduPilot/ardupilot”
  3. Now just cd into the ardupilot directory and run “git submodule update --init --recursive”
  4. Then run “Tools/environment_install/install-prereqs-ubuntu.sh -y” from the ardupilot directory.
  5. Now cd to ardupilot/ArduCopter and run “…/Tools/autoset/sim_vehicle.py -f gazebo-iris”
    Hopefully this should work.

Then you can run whatever you want after putting in guided mode.


#16

sry, I am new to the coding launguage, what do you mean with delete the repo? is it a file or a map? or can i pip unistall ardupilot?


#17

Just delete the ardupilot folder


#18

bad news :frowning: any ideas where it went wrong?



But i can access sim_vehicle.py without starting with “…/Tools/autoset/sim_vehicle.py -f gazebo-iris”


still not in guided mode


#19

Hi!

it did not work to change mode to ‘guided’ under sim_vehicle.py.

is it possible to run to diffrent pymavlink (1.1.69 && 2.06) at the same time?


#20

Hi jashshah999!

For some reason i have to manually click takeoff at the QGC and ‘slide to confirm’ in order to make it work. But isn’t it supposed to do it by itself?