Giter Site home page Giter Site logo

pprzlink's Introduction

PPRZLINK

Overview

PPRZLINK is a messages toolkit (message definition, code generators, libraries) to be used with [Paparazzi UAV System] (https://paparazziuav.org) and compatible systems. One tool that uses PPRZLINK is the Flying Robot Commander, a web based, RESTful application for controlling multiple aircraft.

Documentation

Documentation is in the doc subdirectory and can be viewed on https://pprzlink.readthedocs.org

To build the docs locally:

sudo pip install sphinx sphinx-autobuild phinx_rtd_theme
cd doc && make html

Libraries

PPRZLINK libraries are available for the following programming languages:

Messages

Messages are defined in the messages.xml file and are grouped into the following message classes:

  • telemetry
  • datalink
  • ground
  • alert
  • intermcu

Please reference Paparazzi Messages Document for a more detailed overview.

Message Classes

Telemetry

Telemetry messages are sent from the aircraft to the ground and are defined in the telemetry class of the messages.xml file.

Datalink

Datalink messages are sent from the ground to the aircraft and are defined in the datalink class of the messages.xml file.

Ground

Ground messages are sent to the ground network agents(GCS, server, link, etc...) and are defined in the ground class of the messages.xml file.

Alert

TBD

InterMCU

TBD

Python Library

The python PPRZLINK ivy interface is defined in ivy.py. There is also a serial version of the interface in serial.py.

Ivy Message Call Sequence

Add Libraries to the Search Path

# if PAPARAZZI_SRC not set, then assume the tree containing this file is a reasonable substitute
PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '~/paparazzi/')))

sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python")

from pprzlink.ivy  import IvyMessagesInterface
from pprzlink.message   import PprzMessage
...

Create an Interface Instance

ivy_interface = IvyMessagesInterface("FlyingRobotCommander", start_ivy=False)
...

Subscribe to a Set of Messages

ivy_interface.subscribe(callback_aircraft_messages)
...

Start the Interface

ivy_interface.start()
...

Send Messages

# Main Loop
ivy_interface.send(msg)
ivy_interface.send_raw_datalink(msg)
...

Stop the Interface

ivy_interface.shutdown()
...

Ivy Message Construction

It's easy to construct messages to send over the ivy message bus. Here are a few example python functions for reference.

Datalink Message

def guidance(ac_id, flag, x, y, z, yaw):
    msg = PprzMessage("datalink", "GUIDED_SETPOINT_NED")
    msg['ac_id'] = ac_id
    msg['flags'] = flag
    msg['x']     = x
    msg['y']     = y
    msg['z']     = z
    msg['yaw']   = yaw

    ivy_interface.send_raw_datalink(msg)

Ground Message

def flightblock(ac_id, fb_id):
    msg = PprzMessage("ground", "JUMP_TO_BLOCK")
    msg['ac_id']    = ac_id
    msg['block_id'] = fb_id

    ivy_interface.send(msg)

Subscribing to Ivy Messages

TBD - Describe how to subscribe to message classes

pprzlink's People

Contributors

gautierhattenberger avatar flixr avatar podhrmic avatar kirkscheper avatar dewagter avatar fvantienen avatar noether avatar rijesha avatar kevindehecker avatar ewoudsmeur avatar coppolam avatar bartslinger avatar deonblaauw avatar hooperfly avatar mavlab-field avatar rmeertens avatar titusbraber avatar tomvand avatar guidoai avatar

Watchers

James Cloos avatar Kimberly N. McGuire avatar

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.