To upgrade: pip install --upgrade yakut
Type discovery
Commands that operate on Cyphal ports (subscribe
, publish
, call
) can automatically discover the type of the port by querying the network. If the data type is specified manually, version numbers can be omitted (the latest available is chosen by default).
Where one used to say this:
y sub 1234:uavcan.si.sample.mass.Scalar.1.0
The following form can be used instead:
y sub 1234
Discovery can only succeed if there are other publishers or subscribers on this subject that support introspection (most nodes do).
The call
command now accepts a service name instead of service-ID, and the type is also optional. The required information will be sourced from the server beforehand. Verbose form:
y call 42 123:sirius_cyber_corp.PerformLinearLeastSquaresFit.1.0 'points: [{x: 10, y: 1}, {x: 20, y: 2}]'
New form (the old one is also supported ofc):
y q 42 least_squares '[[10, 1], [20, 2]]' # new alias, shorthand initialization
Subject synchronization
yakut subscribe
accepts multiple subjects for lockstep subscription:
$ y sub 100 110 120 140 150
---
100:
heartbeat:
readiness: {value: 3}
health: {value: 0}
demand_factor_pct: 2
110:
timestamp: {microsecond: 1650748118444258}
value:
kinematics:
angular_position: {radian: 5.42976188659668}
angular_velocity: {radian_per_second: 111.61508178710938}
angular_acceleration: {radian_per_second_per_second: -0.10802359879016876}
torque: {newton_meter: 0.012790549546480179}
120:
timestamp: {microsecond: 1650748118444258}
value:
current: {ampere: 0.055703502148389816}
voltage: {volt: 24.92441749572754}
140: {dc_voltage: 125, dc_current: 0, phase_current_amplitude: 4, velocity: 111, ratiometric_setpoint: 9}
150:
current: [0.0020294189453125, 0.70458984375]
voltage: [0.1893310546875, 1.3359375]
Behavior graphically:
Tweaks
yakut monitor
will truncate the output to avoid wrapping/scrolling so that it looks right even in small terminal windows.
yakut subscribe --redraw
will redraw the output in place instead of scrolling.
Ugly stack traces are no longer printed on error unless --verbose --verbose
is given.