Giter Site home page Giter Site logo

Comments (5)

Pexeus avatar Pexeus commented on July 30, 2024

I have the exact same issue. Any progress on this?

from dronekit-sitl.

krishnans2006 avatar krishnans2006 commented on July 30, 2024

Update: I have narrowed down the problem. It occurs when specifying the plane's model. Here is some example code:

from dronekit_sitl import SITL

sitl = SITL()
sitl.download('plane', '3.3.0', verbose=True)
sitl_args = ['--model', 'quad', ]
sitl.launch(sitl_args, await_ready=True, restart=True)

And the output (when running this):

SITL already Downloaded and Extracted.
Ready to boot.
Execute: /home/krishnan/.dronekit/sitl/plane-3.3.0/apm --model quad --home=-35.363261,149.165230,584,353 -I 0
SITL-0> Started model quad at -35.363261,149.165230,584,353 at speed 1.0
SITL-0.stderr> bind port 5760 for 0
SITL-0> Starting sketch 'ArduPlane'
SITL-0.stderr> Serial port 0 on TCP port 5760
SITL-0> Starting SITL input
SITL-0> Waiting for connection ....
Connecting to vehicle on: tcp:127.0.0.1:5760
SITL-0.stderr> bind port 5762 for 2
SITL-0.stderr> Serial port 2 on TCP port 5762
CRITICAL:autopilot:Calibrating barometer
SITL-0.stderr> bind port 5763 for 3
SITL-0.stderr> Serial port 3 on TCP port 5763
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:Ready to FLY.
CRITICAL:autopilot:init home
CRITICAL:autopilot:gps alt: 58400
CRITICAL:autopilot:ArduPlane V3.3.0 (d6053245)
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
Get some vehicle attribute values:
 GPS: GPSInfo:fix=3,num_sat=10
 Battery: Battery:voltage=12.587,current=0.0,level=100
 Last Heartbeat: 0.2501799449964892
 Is Armable?: False
 System status: STANDBY
 Mode: MANUAL
Completed

This works, but only because I have specified the model to be quad. When replacing this with plane, I get the issue described above.

I assume this is a bug with the plane model specifically, as when I run dronekit-sitl plane-3.3.0 (which assumes a plane model), I still get the heartbeat error when connecting. When I instead run dronekit-sitl plane-3.3.0 --model quad, by specifying the model to be quad it works perfectly.

from dronekit-sitl.

ocetin avatar ocetin commented on July 30, 2024

Update: I have narrowed down the problem. It occurs when specifying the plane's model. Here is some example code:

from dronekit_sitl import SITL

sitl = SITL()
sitl.download('plane', '3.3.0', verbose=True)
sitl_args = ['--model', 'quad', ]
sitl.launch(sitl_args, await_ready=True, restart=True)

And the output (when running this):

SITL already Downloaded and Extracted.
Ready to boot.
Execute: /home/krishnan/.dronekit/sitl/plane-3.3.0/apm --model quad --home=-35.363261,149.165230,584,353 -I 0
SITL-0> Started model quad at -35.363261,149.165230,584,353 at speed 1.0
SITL-0.stderr> bind port 5760 for 0
SITL-0> Starting sketch 'ArduPlane'
SITL-0.stderr> Serial port 0 on TCP port 5760
SITL-0> Starting SITL input
SITL-0> Waiting for connection ....
Connecting to vehicle on: tcp:127.0.0.1:5760
SITL-0.stderr> bind port 5762 for 2
SITL-0.stderr> Serial port 2 on TCP port 5762
CRITICAL:autopilot:Calibrating barometer
SITL-0.stderr> bind port 5763 for 3
SITL-0.stderr> Serial port 3 on TCP port 5763
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:Initialising APM...
CRITICAL:autopilot:Ready to FLY.
CRITICAL:autopilot:init home
CRITICAL:autopilot:gps alt: 58400
CRITICAL:autopilot:ArduPlane V3.3.0 (d6053245)
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
CRITICAL:autopilot:command received:
Get some vehicle attribute values:
 GPS: GPSInfo:fix=3,num_sat=10
 Battery: Battery:voltage=12.587,current=0.0,level=100
 Last Heartbeat: 0.2501799449964892
 Is Armable?: False
 System status: STANDBY
 Mode: MANUAL
Completed

This works, but only because I have specified the model to be quad. When replacing this with plane, I get the issue described above.

I assume this is a bug with the plane model specifically, as when I run dronekit-sitl plane-3.3.0 (which assumes a plane model), I still get the heartbeat error when connecting. When I instead run dronekit-sitl plane-3.3.0 --model quad, by specifying the model to be quad it works perfectly.

You are right, there is a bug for plane setup in dronekit-sitl. If I set "drone" I can connect dronekit-sitl via ardupilot mission planner successfully, but if I choose "plane" it is not working.

Besides if I attached --model plane, Mission Planner can connect SITL but most of the parameters are wrong for plane ....

I am trying to solve the problem during last 2 days. Please inform me if anyone manage to solve it, thanks...

from dronekit-sitl.

NaheelSalman avatar NaheelSalman commented on July 30, 2024

for my case running command:
dronekit-sitl --reset
then normal:
dronekit-sitl copter-3.3
Works

from dronekit-sitl.

nxxvaa avatar nxxvaa commented on July 30, 2024

I have the same issue with the latest update to ardupilot repo any updates on the plane issue?

from dronekit-sitl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.