Mode_setter.py getting hung up on waiting for GUIDED mode


#1

Hi -

I am making my way through the course and learning quite a bit!

However, finally running into a slight snag while working with the mode_setter.py script to set attributes in dronekit sitl.

The script works fine for waiting for the vehicle to become armable, however it then gets hung up on the request to set the vehicle mode to ‘GUIDED’. It gets stuck in the while loop outputting ‘Waiting for drone to enter ‘GUIDED’ flight mode’ and does not seem to be able to change in the guided mode. This is happening both on the virtual environment included with the course as well as the environment I set up from scratch following the course instructions.

Any help would be appreciated!


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

Hi there kwunder!

Hmm let’s get this figured out!

I just tested the mode_setter.py on the virtual machine included as a key to the course, and all seems to be working fine there:

Can you confirm that you were using virtualenv (dksitl) while testing the virtual machine version of mode_setter.py? If you were and your script was still spinning waiting for GUIDED mode, I may have to re-upload my virtual machine image to google drive.

Also, can you please run this command on your virtual machine, while using virtualenv dksitl, and tell me what versions you are getting?
pip freeze | grep -iE 'drone|mav'

I believe if you have the package versions listed below, everything should work. If your virtualenv is using these versions of python packages and it keeps spinning GUIDED, we’ll have to dig deeper!


#3

Hi Caleb -

Thanks so much for the reply!

It unfortunately had slipped my mind that I should be running the script in the ‘dksitl’ virtual environment. I just did so and it worked like a charm!

Thanks again for your quick response, I really appreciate the help.


#4

Great to hear kwunder, no problem!


#7

the Pymavlink=2.0.6 worked well for me to enter to the guided mode but prohibit me to launch the QGC with dronekit script (part3). Any ideas on how to solve this?


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

I would recommend setting up the pre-configured VM image. It is the course environment used throughout the lectures and you shouldn’t face any hiccups while in it. You can also use it to reverse engineer software versions if you wanted to use a different machine.


closed #9