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

dronekit-sitl does not change the mode. #1169

Closed
ghost opened this issue Oct 16, 2022 · 7 comments
Closed

dronekit-sitl does not change the mode. #1169

ghost opened this issue Oct 16, 2022 · 7 comments

Comments

@ghost
Copy link

ghost commented Oct 16, 2022

Hello.

below code does not change the mode.

def change_mode(self, mode):
print("Changing to mode: {0}".format(mode))

    self.vehicle.mode = VehicleMode(mode)
    while self.vehicle.mode.name != mode:
        print('  ... polled mode: {0}'.format(mode))
        # self.vehicle.mode = VehicleMode(mode)
        time.sleep(1)

if I run this code, there is only endless print statement "... polled mode : GUIDED"

I found this solution and tried :

#1041

but there is no more pymavlink 2.4.8

pymavlink is 2.4.36 already. 2.4.8 is too old and cannot be installed.

@ghost
Copy link
Author

ghost commented Oct 16, 2022

I tried so many versions of pymavlink but no works.

pymavlink 2.4.36 - 26 : cannot change mode
pymavlink 2.4.19 : cannot change mode
pymavlink 2.4.11 : time out in connection
pymavlink 2.4.0 - 9 : pip setup error

this consumes beginners time and effort. it will make beginners to give up at early time.

@ghost
Copy link
Author

ghost commented Oct 16, 2022

#1082

this link also have same problem with me.

@ghost
Copy link
Author

ghost commented Oct 18, 2022

#1138

this link also have same problem with me

@SarinleFreeman
Copy link

Having the same problem

@SarinleFreeman
Copy link

One fix is utilizing Ubuntu on your windows system. After setting up Ubuntu i downgraded pymavlink to 2.4.8 and mav_proxy to 1.7.1

sudo pip uninstall mavproxy
sudo pip install pymavlink==2.4.8
sudo pip install mavproxy==1.7.1

I will continue my analysis and see if i can find a solution for windows.

@ghost
Copy link
Author

ghost commented Nov 14, 2022

oh that solution seems to be really good to me

I will try it later.

I will close this issue. thanks

@ghost ghost closed this as completed Nov 14, 2022
@Xarbenence
Copy link

As someone who is also experiencing the same issue:

pymavlink 2.4.36 - 26 : cannot change mode
pymavlink 2.4.19 : cannot change mode
pymavlink 2.4.11 : time out in connection
pymavlink 2.4.0 - 9 : pip setup error

but on a Mac with M1, how would you advise me to work around this? I've tried to get Ubuntu up and running via virtual box, but even that isn't seeming to work. Any other recommendations and or versions of Ubuntu that are known to work well on Mac?

This issue was closed.
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