Quantcast
Channel: ArduPlane - ArduPilot Discourse
Viewing all articles
Browse latest Browse all 7806

Using SITL with python script

$
0
0

@sripad_sahu wrote:

Hello,
I want to use python script to connect to the SITL that is running on my system. This is the command i use to connect:

from pymavlink import mavutil

import time

print(“before connecting”)
drone = mavutil.mavlink_connection(‘tcp:127.0.0.1:5760’)

drone.mav.command_long_send(
0, #system id
0, #component id
400,#command id
0,
1, #disarm/arm
0,
0,0,0,0,0)

the script executes without any error , but the Simulation plane is not armed.

Any suggestion as what can be the problem??

Posts: 3

Participants: 2

Read full topic


Viewing all articles
Browse latest Browse all 7806

Trending Articles