Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can’t Change Flight Mode on DroneKit-SITL from Command Line #153

Open
ghost opened this issue Jul 2, 2021 · 2 comments
Open

Can’t Change Flight Mode on DroneKit-SITL from Command Line #153

ghost opened this issue Jul 2, 2021 · 2 comments

Comments

@ghost
Copy link

ghost commented Jul 2, 2021

I have been building a simple navigation (“go from Point A to Point B”) tool using Python 3 and DroneKit (with DroneKit-SITL for testing for now).

I set up DroneKit-SITL and MAVProxy on my Mac computer, and while I can get everything to configure, I cannot change the copter’s flight mode from “STABILIZE” to “GUIDED” (or any other mode) using the MAVProxy command line interface. Funnily enough, when I use DroneKit-SITL with Python to input commands (instead of the command line) such as changing the copter’s flight mode and navigating, it works.

I was wondering what might be causing the problem in changing the DroneKit-SITL copter’s mode from the command line? It seems that other people have had the same problem (#142) but I couldn’t find a solution that works. The suggestion to add firmware and rename “copter_36” to “apm” from the linked forum did not work on my Mac either.

I hope we can collaborate and find a solution — thanks!

@ghost ghost changed the title Cannot Change Flight Mode on DroneKit-SITL from Command Line Can’t Change Flight Mode on DroneKit-SITL from Command Line Jul 2, 2021
@viaSeunghyun
Copy link

Interestingly, or unfortunately, the simplest workaround for most mode change issues is to use python2.

It appears to have been recently ported to support python3 via 2to3, but there are still issues with python3 and it is not officially supported.

@i-vis
Copy link

i-vis commented Aug 9, 2024

There is a fix in PR #145, although you might need to modify some lines in that PR. After changing .venv/lib/python3.12/site-packages/dronekit_sitl/init.py it should download latest SITL binary and issues like this get fixed. It worked for me and downloaded new files to ~/.dronekit/sitl/copter-stable/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants