Installation

Install the library from PyPI; the package name is pyuavcan. Specify the installation options (known as “package extras” in parseltongue) depending on which UAVCAN transports and features you are planning to use.

Installation options

Most of the installation options enable a particular transport or a particular media sublayer implementation for a transport. Those options are named uniformly following the pattern transport-<transport-name>-<media-name>, for example: transport-can-pythoncan. If there is no media sub-layer, or the media dependencies are shared, or there is a common installation option for all media types of the transport, the media part is omitted from the key; for example: transport-serial. Installation options whose names do not begin with transport- enable other optional features.

If you need full-featured library, use this and read no more:

pip install pyuavcan[transport-can-pythoncan,transport-serial,transport-udp]

If you want to know what exactly you are installing, read on.

can transport

This transport is implemented by pyuavcan.transport.can.CANTransport. This transport has no installation dependencies.

redundant transport

This transport is implemented by pyuavcan.transport.redundant.RedundantTransport. This transport has no installation dependencies.

loopback transport

This transport is implemented by pyuavcan.transport.loopback.LoopbackTransport. This transport has no installation dependencies.

udp transport

This transport is implemented by pyuavcan.transport.udp.UDPTransport. This transport has no installation dependencies.

serial transport

This transport is implemented by pyuavcan.transport.serial.SerialTransport. This transport has no installation dependencies.

Other installation options

These installation options are not related to any transport.

transport-can-pythoncan

This option pulls the following dependencies:

python-can[serial] ~= 3.3
transport-serial

This option pulls the following dependencies:

pyserial ~= 3.5
cobs     ~= 1.1.4
transport-udp

This option pulls the following dependencies:

libpcap >= 1.11.0b2, < 2.0.0

Use from source

PyUAVCAN requires no unconventional installation steps and is usable directly in its source form. If installation from PyPI is considered undesirable, the library sources can be just directly embedded into the user’s codebase (as a git submodule/subtree or copy-paste).

When doing so, don’t forget to let others know that you use PyUAVCAN (it’s MIT-licensed), and make sure to include at least its core dependencies, which are:

nunavut ~= 1.6
numpy   ~= 1.21