Skip to content

Ardupilot plugin implementation in python for creating integration of ArduPilot SITL with custom simulators

Notifications You must be signed in to change notification settings

TomerTip/PyArduPilotPlugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PyArduPilotPlugin

Implementation of the communication protocol between ArduPilot SITL and a physics simulator. This project is particularly useful if you want to develop your own simulator and integrate it with ArduPilot.

ArduPilot Simulator Communication Diagram

Installation

pip install .

Usage

Run ArduPilot SITL with JSON SITL interface:

sim_vehicle.py -v ArduCopter -f gazebo-iris --mode JSON --console --map

Run script:

import time
from ArduPilotPlugin import ArduPilotPlugin

ap = ArduPilotPlugin()
ap.drain_unread_packets()

sim_time = time.time()
while True:
    dt = time.time() - sim_time
    ap.pre_update(sim_time=dt)
    ap.post_update(sim_time=dt, sensor_data=ap.SensorData())
    time.sleep(0.01)

Resources

This communication module has been rewritten in Python, based by the original C++ code from the Gazebo and ArduPilot projects.

About

Ardupilot plugin implementation in python for creating integration of ArduPilot SITL with custom simulators

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages