Device fault monitoring in tview
When using tview to monitor and control moteus controllers, there have
been a fair number of limitations and “gotchas”. One of the biggest
for newcomers is the distinction between error checking in the d pos
command, and faults that can occur during position mode itself. When
using the diagnostic protocol and issuing a command, for those
commands which direct moteus to perform some control action, the
controller will respond with an “OK” as long as the command itself is
syntactically correct. Only then is it submitted to the online
control loop, after which faults resulting from the command will
manifest as the controller reporting a mode of kFault or 1, with a
corresponding fault code. In the diagnostic tree view, those are
shown as servo_stats.mode
and servo_stats.fault
.
So, what many newcomers do is take a moteus board fresh from the factory, which starts with servopos.position_min=-0.01
and servopos.position_max=0.01
, and do the following in order:
- Issue a totally reasonable command like
d pos nan 0 nan
to command the motor to hold position - Observe an OK come back
- Don’t see the motor do anything
What those users don’t realize is that in order to see why moteus doesn’t move, you need to look at the current reported mode and fault, not at the response over the diagnostic channel.
Here I’d like to describe a solution to this problem that hopefully makes tview much easier in general with fewer instances of confusion resulting.