Viper Quadcopter

Still fighting with tooling here :cry:

$ git clone https://github.com/UAVCAN/pyuavcan && cd pyuavcan
$ python3.8 -m pip install .
$ git clone https://github.com/UAVCAN/public_regulated_data_types
$ export PYTHONPATH=$(pwd)
$ pyuavcan -v dsdl-gen-pkg public_regulated_data_types/uavcan

$ ls uavcan/
diagnostic  __init__.py  metatransport  pnp        __pycache__  si
file        internet     node           primitive  register     time

And now trying to publish some heartbeat with a command that worked in the past …

$ pyuavcan publish 32085.uavcan.node.Heartbeat.1.0 '{uptime: 9876, health: 0, mode: 3, vendor_specific_status_code: 5}' --tr='CAN(can.media.socketcan.SocketCANMedia("vcan0",8),13)'
Error: RuntimeError: Subsystem factory 'NodeFactory' for command 'publish' has failed: No module named 'cobs'

Any insight appreciated :pray:

This is an odd way of installing the library. Why not just pip install pyuavcan? Not saying it’s related though.

You tripped over https://github.com/UAVCAN/pyuavcan/issues/114 again. The tentative solution is to install all dependencies:

pip install pyuavcan[transport_can_pythoncan,transport_serial,cli]

I am almost there to start fixing these. Maybe tomorrow.

Good morning :coffee: :wave:

This

python 3.8 -m pip install pyuavcan[transport_can_pythoncan,transport_serial,cli]

did not solve my issue, however doing

python 3.8 -m pip install cobs

did.

As for the clumsy python 3.8 -m pip install whatever … as per earlier internet research this is the best way to avoid version/dependency f**kup which I somehow always manage to end up with. But I can’t claim any expertise insight here, all I can say is that since doing it that way I’ve had no dependency issues anymore.

Unfortunately I’m running straight into the next blocker, still the same command that worked nicely a couple of months ago:

pyuavcan publish 32085.uavcan.node.Heartbeat.1.0 '{uptime: 9876, health: 0, mode: 3, vendor_specific_status_code: 5}' --tr='CAN(can.media.socketcan.SocketCANMedia("vcan0",8),13)'
Error: TypeError: 'int' object is not iterable 

Um, that doesn’t sound plausible.

The next blocker is also a known issue: https://github.com/UAVCAN/pyuavcan/issues/116; it is now fixed in https://github.com/UAVCAN/pyuavcan/pull/132 (commit 03b95afe4da9a934a7fff23df208f9c4ecee0d4c).