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

I can't change to Vehicle Mode #150

Open
zatek5 opened this issue Nov 17, 2020 · 4 comments
Open

I can't change to Vehicle Mode #150

zatek5 opened this issue Nov 17, 2020 · 4 comments

Comments

@zatek5
Copy link

zatek5 commented Nov 17, 2020

I am using this code ;
`#!/usr/bin/env python

-- coding: utf-8 --

"""
© Copyright 2015-2016, 3D Robotics.
simple_goto.py: GUIDED mode "simple goto" example (Copter Only)

Demonstrates how to arm and takeoff in Copter and how to navigate to points using Vehicle.simple_goto.

Full documentation is provided at http://python.dronekit.io/examples/simple_goto.html
"""

from future import print_function
import time
from dronekit import connect, VehicleMode, LocationGlobalRelative

Set up option parsing to get connection string

import argparse
parser = argparse.ArgumentParser(description='Commands vehicle using vehicle.simple_goto.')
parser.add_argument('--connect',
help="Vehicle connection target string. If not specified, SITL automatically started and used.")
args = parser.parse_args()

connection_string = args.connect
sitl = None

Start SITL if no connection string specified

if not connection_string:
import dronekit_sitl
sitl = dronekit_sitl.start_default()
connection_string = sitl.connection_string()

Connect to the Vehicle

print('Connecting to vehicle on: %s' % connection_string)
vehicle = connect(connection_string, wait_ready=True)

while vehicle.mode.name != "POSHOLD":
vehicle.mode = VehicleMode("POSHOLD")
print("in loop")
time.sleep(0.1)

Close vehicle object before exiting script

print("Close vehicle object")
vehicle.close()

Shut down simulator if it was started.

if sitl:
sitl.stop()`


And output ;

Starting copter simulator (SITL)
SITL already Downloaded and Extracted.
Ready to boot.
Connecting to vehicle on: tcp:127.0.0.1:5760
CRITICAL:autopilot:APM:Copter V3.3 (d605324)
CRITICAL:autopilot:Frame: QUAD
CRITICAL:autopilot:Calibrating barometer
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:barometer calibration complete
CRITICAL:autopilot:GROUND START
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
in loop
.
.
.

@JesperA75
Copy link

I have the same issue - is there a known dronekit version that I can revert back to?

@walchko
Copy link

walchko commented Jan 9, 2021

same issue

@Jovian-Dsouza
Copy link

Jovian-Dsouza commented Jan 13, 2021

I had the same issue , I solved by updating to copter-3.6 as given in #142

Here are the steps I followed

cd ~/.dronekit/sitl/copter-3.3
rm *
wget https://github.com/dronekit/dronekit-sitl/files/3514761/firmware_36.zip
unzip firmware_36.zip
mv copter_36 apm
sudo chmod -R a+rwx ~/.dronekit/sitl/copter-3.3/

@Mettikodeva
Copy link

I had the same issue , I solved by updating to copter-3.6 as given in #142

Here are the steps I followed

cd ~/.dronekit/sitl/copter-3.3
rm *
wget https://github.com/dronekit/dronekit-sitl/files/3514761/firmware_36.zip
unzip firmware_36.zip
mv copter_36 apm
sudo chmod -R a+rwx ~/.dronekit/sitl/copter-3.3/

how to update the copter firmware in windows?
thanks

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

5 participants