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

Export pprz messages into OpenDDS format #69

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Export pprz messages into OpenDDS format #69

wants to merge 3 commits into from

Conversation

podhrmic
Copy link
Member

@podhrmic podhrmic commented Dec 2, 2017

OpenDDS is an open source implementation of Publisher-Subscriber communication service (more info here http://opendds.org/).

This PR adds an option to generate OpenDDS compatible IDL format from messages.xml.

More information and an example of OpenDDS<-->Pprzlink communication will follow, but I am seeking some early feedback on the Python implementation. Plus this works as is.

if name != 'stdout':
f.close()

def eval_int(expr):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is it used ?

else:
f.opendds_type = 'void'

if not type(f.array_type) == type(None):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

usually something like if f.array_type is not None works


t = pprz_template.PPRZTemplate()

def generate_messages_h(directory, name, xml):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe find a better name, it is not a .h file

@gautierhattenberger
Copy link
Member

as a side note, where and how are you using this OpenDDS ?

@podhrmic
Copy link
Member Author

podhrmic commented Dec 4, 2017

I have to interface paparazzi with a system that uses OpenDDS - imagine a mission computer . The details are still in the working, but I wanted to share what I have so far.

@flixr
Copy link
Member

flixr commented Dec 4, 2017

Without looking at the details, this is not really OpenDDS specific, right?
It should work for any DDS compliant implementation... so this should probably be reflected in the naming i.e. PROTOCOL_DDS vs PROTOCOL_OPENDDS.

Also is it a spec on the DDS or RTPS (RealTimePublishSubscribe) level?

@podhrmic
Copy link
Member Author

podhrmic commented Dec 4, 2017

Good point - any system that understands IDL format can in theory use it.

From FAQ:

Starting with version 3.1, OpenDDS contains an implementation of the RTPS (Real Time Publish-Subscribe) specification required for interoperability.

Does that answer your question?

@podhrmic
Copy link
Member Author

podhrmic commented Jan 3, 2018

For bookkeeping purposes, I am describing here what needs to happen to make this actually useful.

Generated code

  • From Messages.xml generate $MSG_CLASS_NAME.idl for each class. Already done.
  • Generate type support for each class from the IDL file. Already done.
  • For each message generate DataReaderListener.h/.cpp that handles properly message variables (mostly for logging purposes).
  • Optional: figure out better type mappings than the current ones (i.e. char[] -> ?)

Topics

The suggested topics follow the message class names:

  • Telemetry
  • Datalink
  • etc...

Application code

In order to make a useful application (such as OpenDDs - Pprzlink translator), the following is needed (for a simple "link" application):

  • main.cpp with a reader and a writer for each message in given topic
  • Reader: gets OpenDDS message and writes pprz message on ivy bus
  • Writer: binds to ivy messages, once a new message is received, parse & write it to OpenDDS

@OpenUAS
Copy link

OpenUAS commented Sep 25, 2020

Integrating DDS would be welcomed, maybe I shoud add it to the "list" ;)

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

Successfully merging this pull request may close these issues.

None yet

4 participants