Skip to content

Commit

Permalink
Patch release: Fix #58 and improve README (#59)
Browse files Browse the repository at this point in the history
* Add notes on PlotJuggler

* Fix #58
  • Loading branch information
pavel-kirienko authored May 8, 2022
1 parent e1b0c64 commit 996e646
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 3 deletions.
1 change: 1 addition & 0 deletions .idea/dictionaries/pavel.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ Installation & configuration screencasts are available for [Windows](https://for

Since Yakut heavily relies on YAML/JSON documents exchanged via stdin/stdout, [**`jq`**](https://stedolan.github.io/jq/) is often needed for any non-trivial usage of the tool, so consider installing it as well. Users of GNU/Linux will likely find it in the default software repositories (`pacman -S jq`, `apt install jq`, etc.).

- Cyphal/CAN on GNU/Linux: [`can-utils`](https://github.com/linux-can/can-utils)
[PlotJuggler](https://plotjuggler.io) is occasionally useful for real-time data visualization. Offline data analysis may be better addressed with Jupyter+Plotly+Pandas or whatever stack you prefer.

Transport layer inspection tools:

- Cyphal/CAN on GNU/Linux (candump, canbusload, etc.): [`can-utils`](https://github.com/linux-can/can-utils)
- Cyphal/UDP or Cyphal/CAN: [Wireshark](https://www.wireshark.org/)
(n.b.: Wireshark might label Cyphal captures as UAVCAN due to rebranding)

Expand Down Expand Up @@ -204,6 +208,18 @@ y --tsvh sub 1252 1255 --sync > ~/out.tsv

<img src="docs/jupyter.png" alt="Pandas import">

#### Real-time visualization

Being a CLI application, Yakut comes without built-in visualization facilities, but it can be easily combined with 3rd-party solutions.

[PlotJuggler](https://plotjuggler.io) can accept JSON streamed from Yakut via its UDP server. To use that, start an instance of PlotJuggler, enable the UDP streaming server in JSON mode, and then pipe the output of `yakut subscribe` to the UDP server via netcat like so:

```bash
y sub 33:uavcan.si.unit.angle.scalar 1250 --sync | nc -u localhost 9870 # 9870 is the UDP port set in PlotJuggler
```

<img src="docs/plotjuggler_plots.png" alt="subject synchronization">

### Publishing messages

Publishing a message twice (you can use a subscriber as explained earlier to see it on the bus):
Expand Down
Binary file added docs/plotjuggler_plots.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion yakut/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.11.0
0.11.1
6 changes: 5 additions & 1 deletion yakut/cmd/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <[email protected]>

import re
import http
import typing
import zipfile
Expand Down Expand Up @@ -154,7 +155,10 @@ def _fetch_archive_dirs(archive_uri: str) -> typing.List[Path]:
(inner,) = [d for d in Path(arch_dir).iterdir() if d.is_dir()] # Strip the outer layer, we don't need it

assert isinstance(inner, Path)
return [d for d in inner.iterdir() if d.is_dir()]
return [d for d in inner.iterdir() if d.is_dir() and _RE_VALID_ROOT_NAMESPACE_NAME.match(d.name)]


_RE_VALID_ROOT_NAMESPACE_NAME = re.compile(r"[a-zA-Z_]\w*")


def _generate_dsdl_packages(
Expand Down

0 comments on commit 996e646

Please sign in to comment.