Publisher / subscriber for distributed fault tolerant real-time onboard systems in 1500 lines of code

Sap, kittens.



I came to tell you about the UAVCAN project - a new network standard for organizing the interaction of nodes and components of modern vehicles with a high level of autonomy / automation. The name is an acronym for U ncomplicated A pplication-level V ehicular C ommunication A nd N etworking (uncomplicated on-board networks and application-level communications).



This publication explains the current state of affairs and trends in complex airborne systems, existing and future problems, how we are solving them and what successes have been achieved. In the second part, our colleagues from Innopolis University will highlight in detail the practical side of UAVCAN implementation using the example of specific projects.





Conjuncture



The first pancake of the project was laid in 2014. From the very beginning, it was an experiment in minimalism: is it possible to rely on powerful abstractions in the development of complex distributed airborne systems, while avoiding the increase in implementation complexity and the associated difficulties of validation and verification .



We are seeing a rapid increase in the complexity of on-board systems associated with the development of the functionality of vehicles (especially unmanned vehicles) in general, and automatic control systems in particular. " ", , ; , / , , , (, ), , , ..



() 20- ; , , 21099:





: β€” . , ( β€” ; β€” ), . , , , -, ?



- , / , (), . NASA, . ( Tesla Model 3, ), ( ).



, . " ". , , , : , , . , , , , . , /. , ( Mars Climate Orbiter, Airbus A400M , Ariane 5, ..).



. , ( , , , , , , , ). Safety Element out of Context (SEooC), ISO 26262. , , β€” , .



; . , , / .



, . , - ( ) . , , ́ , (schedulability analysis). , ( , 3D ). ; . , ; .



( ). , . . , , , .





, : Casey Handmer, () . .



, , . , ( AFDX) , , , . , . , .



, ( : , , TCP/IP , , , etc.) .



: , , , . , .





. , . , , CiA/SAE/RTCA/EUROCAE/AUTOSAR/OMG/etc. .



. , : . .



1.



. , , , . 21099 .



/ , , , ..



2.



. , /, .



: . : -(), , .



. , ́ () . , / . ARINC 429 β€” , 18- () . :





"The Evolution of Avionics Networks From ARINC 429 to AFDX", Fuchs, 2012.



ARINC 429 β€” - ( DShot MAVLink; , ). , ́ . , . , ( , ).



( , ). , CAN ; . FlexRAY, LIN, MIL-STD-1553 Ethernet ( Ethernet ).



CAN . 1986 MTU 8 . 2012 CAN FD MTU 64 . 2018 CAN XL MTU 2 ( ISO 2021 ).



, Wireless Avionics Intra-Communications (WAIC). WAIC , . , , /, ( ). , , - , , :





WAIC.



, , . (, ) , . SpaceWire ( ; , ) , , Ethernet.



Avionics Full-Duplex Switched Ethernet (AFDX) , (. Boeing 787). , ARINC 429, - . , . AFDX , . ( ) . AFDX ; ARINC 429, ( ), :





"Communications for Integrated Modular Avionics", Alena, 2007.



. , , (, , ) - . , , AFDX ( ) UDP/IPv4. "" TCP/IP , β€” .



, . , 21099. , , . 2020 , .



3.



, . , -, . .



, , . - .



, Robot Operating System (ROS) ( , ROS , ). ROS SDK PR2 Willow Garage, ( ), . ROS , , , , .. , ( ) , .





ROS. - . , -.



ROS Why ROS 2 [Gerkey], , , . , , ( ). ROS, , . , , , - β€” Data Distribution Services (DDS).



DDS CORBA, - ( - , ). DDS , , (, ROS 2) . Future Airborne Capability Environment (DDS FACE) ; , , DDS , .



, DDS CORBA β€” . , . "The Design of the TAO Real-Time Object Request Broker" [Schmidt et al, 1999] , β€” ́ . CORBA ; :





, . "The Design of the TAO Real-Time Object Request Broker", Schmidt et al, 1999.



C++ TAO (The ACE ORB), DDS. TAO DDS, . TAO DDS , , β€” eProsima Fast-DDS ( , ) β€” C++ ( ). DDS.



, DDS , . β€” DDS For Extremely Resource Constrained Environments (DDS-XRCE). , , . , micro-ROS.



SOME/IP β€” AUTOSAR v4+, IP. DDS, SOME/IP . ( ) SOME/IP DDS.



MQTT , .



, . , ( SOME/IP), . (, , ) .





, , UAVCAN v1. , , :



  1. . , . (.., ): ; .
  2. . . , .
  3. . . , (, ), (, ).
  4. . , . . .
  5. . , , . , . (CC BY, MIT) .




Raft, , , , . , , , , . Raft, (N.B.: 43- , ). , , UAVCAN " " ( ):





libuavesp. , , β€” . , "UAV" "UAVCAN" , .



, UAVCAN , ROS, DDS, AFDX, WAIC CAN , . , , , , " ". UAVCAN ( OSI ):



  • . : , , , , , .. . : - (.. ).
  • - . - , : Data Structure Description Language (DSDL). DSDL- ( ).
  • - . , :

    • UAVCAN/CAN CAN CAN FD. , CAN XL, .
    • UAVCAN/UDP UDP/IP. 2020- , ( ).
    • UAVCAN/serial - (UART, RS-232/422/485, USB CDC ACM) . .
    • , . , , IEEE 802.15.4.


, . , UAVCAN , , , .



: (, CAN Ethernet, ) . , , , , , ; , , , , , . , . ( , ). Idempotent interfaces and deterministic data loss mitigation. , .



. , , . UAVCAN ; , - , (. SOME/IP, DDS, ROS, MQ*, etc.), UAVCAN , .



, . ( AFDX) , , , . , Alternative transport protocols in UAVCAN.



, , , . . -, , ; , , , ( ), , , .



, plug-and-play (, UAVCAN/UDP DHCP). , Raft.



. , DSDL , , , /, , , . DSDL- uavcan.diagnostic.Record, , 112- ( UTF-8):



# Generic human-readable text message for logging and displaying purposes.
# Generally, it should be published at the lowest priority level.

uavcan.time.SynchronizedTimestamp.1.0 timestamp
# Optional timestamp in the network-synchronized time system; zero if undefined.
# The timestamp value conveys the exact moment when the reported event took place.

Severity.1.0 severity

uint8[<=112] text
# Message text.
# Normally, messages should be kept as short as possible, especially those of high severity.

@assert _offset_ % 8 == {0}
@assert _offset_.max <= (124 * 8)     # Two CAN FD frames max


, CAN FD .



, . DSDL, ( , ) . , - ( , , β€” ), . ( , ) .



( , ). ( ) , , , .. , (, ) .



, , . , , . ( ) ASN.1 UPER ( ), ( , DSDL).



uint16 VALUE_LOW  = 1000
uint16 VALUE_HIGH = 2000
uint16 VALUE_MID = (VALUE_HIGH + VALUE_LOW) / 2
#    !

uint16 value
uint8[<=100] key  #    0  100 .


, , value=1234 key=Hello world!, :



D2 04 0C 48 65 6C 6C 6F 20 77 6F 72 6C 64 21


D2 04 1234, 0C β€” ( 255 , ), .



CAN β€” CAN ( , CAN FD ):



$ candump -decaxta any
(7.925)  vcan2  TX - -  1013373B   [8]  D2 04 0C 48 65 6C 6C A0   '...Hell.'
(7.925)  vcan2  TX - -  1013373B   [8]  6F 20 77 6F 72 6C 64 00   'o world.'
(7.925)  vcan2  TX - -  1013373B   [4]  21 F9 02 60               '!..`'


. .



0x1013373B CAN ID, . 0x1337 (4919 ), (subject-identifier) β€” ( DDS), UAVCAN , ( SOME/IP CAN). , .



UAVCAN/UDP localhost. Wireshark, , UAVCAN, , :





, 21303, , (4919 ) 16384. , UAVCAN . . (D2 04 0C ...) 24 , UAVCAN; , ( ) .



, UAVCAN/UDP IP . IP , TCP/IP, UDP/IP. C , Lifelover 2011- " ".



, . PyUAVCAN, ( ).



, . , β€” . . PyUAVCAN.



. : DSDL, () . ( , , , , ..) , UAVCAN, .



UAVCAN , USB USB, CANopen Bluetooth, DDS FACE DDS. :





β€” Drone Standard 15, DS-015, , , Dronecode Foundation. , UAVCAN β€” .



, . . , , ( , , , ..), . , -, , , . β€” , , . UAVCAN Interface Design Guidelines.





, , , , . , , , , .. , . , 21- , , . , , . , , , PDF ; , .



UAVCAN , : CC BY 4.0, β€” MIT. , .



, , . 2020 , .



, GitHub β€” 90% , . , , .



, Libcanard β€” UAVCAN/CAN C11, . uavcan.rs β€” Rust, 2020 .



Yukon β€” - , UAVCAN , RViz, Wireshark LabView. PyQt , , Yukon. , - . :





API ROS UAVCAN DDS. , ROS UAVCAN, UAVCAN , ROS. "An exploratory study: UAVCAN as a middleware for ROS"; .



, , NXP Semiconductors. "Getting started using UAVCAN v1 with PX4 on the NXP UAVCAN Board", , , - UAVCAN .



Amazon Prime Air . , β€” .



UAVCAN- , , , , , , .



, 2019 , , UAVCAN (~10% ) (~80% ) , (~5% , 2020 20 , ), ( ) . , , ; . .





-: DDS ; - .



, , : 47% , UAVCAN . , .



uavcan.org



  • Digital Avionics Handbook (3rd edition) – Spitzer, Ferrell, 2017
  • Computers in Spaceflight: The NASA Experience – Kent, Williams, 2009
  • The Evolution of Avionics Networks From ARINC 429 to AFDX – Fuchs, 2012
  • Communications for Integrated Modular Avionics – Alena, 2007
  • Safety and Certification Approaches for Ethernet-Based Aviation Databuses – Yann-Hang Lee et al, 2005
  • The Design of the TAO Real-Time Object Request Broker – Schmidt, Levine, Mungee, 1999
  • In Search of an Understandable Consensus Algorithm – Ongaro, Ousterhout, 2014
  • Starlink is a very big deal – Handmer, 2019
  • Why ROS 2? – Gerkey, 2015
  • ROS on DDS – Woodall, 2015
  • Safe Micromobility – Santacreu, 2020
  • Understanding Service-Oriented Architecture – Sprott, Wilkes, 2009


.



. :






All Articles