[Rock-dev] Proposal: NDLCom and Rock
Martin Zenzes
martin.zenzes at dfki.de
Wed Dec 4 14:10:54 CET 2013
Hi,
looks like I got the task of implementing a general approach to
connecting Rock and NDLCom. So now
I am searching for advise, comments and corrections.
Ok, let's start *lotoftext*:
Some piece of code should allow Rock-based "High-Level" software to
speak in a generalized way with NDLCom-based "Low-Level" devices. These
are, for example:
- FPGA (Spartan3/6)
- Bare metal Microcontroller (STM32, Atmega)
- µC Linux based Microcontroller (Blackfin)
Such devices use a simple byte-stream based communication.
Message-length is crucial to keep buffer size limited. No attention is
paid to things such as Endianess or Compiler alignments. It just works
(tm) in the Moment ;-)
== Use-case ==
The intended first use-case would be to
- Coordinate lowest-level NDLCom-devices of the Sherpa1/2 (and Charlie)
robots
- All NDLCom-devices should be supported
- Legacy support of the old iStruct Gui
The general Rock-approach seems to implement as much as possible in
independent librarys, only providing the necessary glue-code in an
orogen-Task specification. Right?
== ndlcom::Communication ==
Therefore, I would propose the cpp-library "ndlcom::Communication" to
have the following properties:
- Open more than one "file descriptor" to read and write encoded NDLCom
Messages as serial data
- `/dev/ttyUSB0` - profane tty
- `$IP:port` -- TCP/UDP connections
- `/dev/can0` -- No CAN in Sherpa, but others use this already
- `/dev/ndlcom0` -- Custom kernel device from !GumBridge FPGA,
providing parsed and decoded messages
- Provide received Messages which are directed to the own receiverId as
`ndlcom::Message` at the `readMessage()` function to a caller
- Accept `ndlcom::Message` at the `writeMessage()` function to be sent
to the correct hardware interface
- Forward messages not directed at the own deviceId to the correct
hardware interface
- Handle broadcasts: resend the message on all other hardware interfaces
- Mirror all received and transmitted `ndlcom::Message` as encoded raw
NDLCom datastream via UDP. This would allow working with an unchanged
iStruct Gui. This is transitory, for legacy support of the iStruct
stack. Also easy access of all NDLCom-data without additional rock-code
- Statistics (bandwidth per interface, known devices, broken+missed packets)
See also the attached ASCII art...
=== iodrivers_base ===
The big question: Using `driver/iodrivers_base` makes things much
simpler, but adds a dependency to the Rock CMake macros. As far as I am
concerned this is ok.
There are some complex features in this library...
== Tests and Questions to the finished library ==
- How many NDLCom-Messages (~100byte) can be handled on a Gumstix?
- Routing, Broadcast...
- Write text about typical development-cycle for the lazy guys
== Rock Task ==
So, after *lotoftext*: This cpp-library is finally to be embedded in a
Rock-Task, providing the appropriate Rock-Ports and executing the needed
Hooks. Everything else, mapping certain NDLCom-Payload to certain
Rock-Types or providing services based on NDLCom Messages, is done by
other Rock-Tasks.
Greetings
Martin
--
M.Sc. Martin Zenzes
Space Robotics
Hauptgeschäftsstelle Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany
Phone: +49 (0) 421 178 45 - 6658
Fax: +49 (0) 421 178 45 - 4150
E-Mail: martin.zenzes at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ndlcom_Communication.png
Type: image/png
Size: 59466 bytes
Desc: not available
Url : http://www.dfki.de/pipermail/rock-dev/attachments/20131204/fcf691ec/attachment-0001.png
More information about the Rock-dev
mailing list