Yakut: the new name for PyUAVCAN CLI tool

This change was first announced on GitHub two weeks ago and then the name for the new tool was briefly discussed on this forum.

Today I finally finished migrating the codebase, setting up the test rigging, and implementing the UX improvements I’ve long had in mind. This is no rocket science but it turned out to be much more time-consuming than I anticipated, but here we are – the first functional version 0.1 is already available from PyPI:

This is still early-stage so there are some insignificant usability issues but my extensive local testing indicates that it is at least generally functional. My next steps will include improving the docs and error reporting. Currently, the tool spits out long stack traces instead of concise messages; this is actually a regression compared to its original state caused by migration from argparse to Click.

The commands differ slightly compared to the original. First, there are two renamings:

  • pick-node-idaccommodate
  • dsdl-generate-packagecompile

Then, common arguments like --transport and --format now go before the subcommand name, not the other way around. It was like this:

pyuavcan pub --transport='MyTransport()' blah.Blah.1.0 '{}'

Now it is like this:

yakut --transport='MyTransport()' pub blah.Blah.1.0 '{}'

A brief hands-on intro is given in the README, and extra details are available from yakut --help, as always.

The name is after Yakutia because Yukon is taken.

1 Like

Hi.

To be clear:
Was the option “-M” of pyuavcan replaced by “-v” of yakut?

Thank you

No, -v just enables verbose logging.

yakut subscribe shows metadata by default because I observed that it is needed more often than it’s not. It can be disabled using --no-metadata or -M. For completeness, there is option --with-metadata or +M that has no effect for this command.

yakut call does not show metadata by default because it is much less relevant for service calls, but you can still see it if you pass the same option --with-metadata or +M. Conversely, option --no-metadata or -M has no effect here.

1 Like

ok, thanks for the clearification. I just noticed that “-M” behaves now differently.

Turns out I haven’t looked in the right help.

yakut sub --help shows all the info needed.

Hello, how is the right way to subscribe to a Heartbeat now?

It was something like that before:
uvc sub uavcan.node.Heartbeat.1.0

I have tried it with yakut this way:
yakut sub uavcan.node.Heartbeat.1.0
but got an error:
ValueError: The data spec string specifies a non-existent short type name: 'uavcan.node.Heartbeat.1.0'
I have tried it the other way:
yakut sub 7509.uavcan.node.Heartbeat.1.0

But the result was the same.

You seem to have the legacy library installed. Get rid of it to fix the problem: pip uninstall uavcan. The error is because the tool is looking for the data type in the library package instead of the compiled one. We should look into making the error message more meaningful here.

Thank you, it was really the case!

But is there a possibility to run both versions on the same PC without any collisions?

You can use venv or something of that sort: https://docs.python.org/3/library/venv.html