|
sas
Modularised monitoring, logging, and control of robots.
|
Functions | |
| dict[str, bool] | normalize_verbose (Verbose verbose) |
| str | _tag (str category, int index) |
| None | _violation (str description) |
| None | debug_rcm (dict[str, bool] verbose, int index, float signed_error, float vfi_gain) |
Variables | |
| tuple | CONSTRAINT_CATEGORIES |
| Verbose = bool | dict[str, bool] | |
Standardized debug output for the ICRA 2019 task-space controller. Every debug line starts with a fixed-width category tag (for example ``[rcm #0]``) followed by ``key=value`` fields with a fixed numeric format, so the per-constraint margins printed at a control step are easy to read and to grep. The available categories are listed in :data:`CONSTRAINT_CATEGORIES`; the ``verbose`` argument accepted by the public API has the type :data:`Verbose` (``True`` enables every category, ``False`` disables all of them, and a mapping selects individual categories).
|
protected |
Return the fixed-width debug tag for a category and entity index.
Args:
category: One of :data:`CONSTRAINT_CATEGORIES`.
index: Index of the entity the message refers to (RCM constraint).
Returns:
A tag such as ``[rcm #0]``.
|
protected |
Print an indented red line describing a violated constraint.
Args:
description: Human-readable description of the violation, including
any measured depth.
| None debug_rcm | ( | dict[str, bool] | verbose, |
| int | index, | ||
| float | signed_error, | ||
| float | vfi_gain ) |
Print the RCM-constraint debug block for one constraint.
Args:
verbose: Per-category flags from :func:`normalize_verbose`.
index: RCM constraint index.
signed_error: Signed line-to-point error scaled by the VFI gain
(m^2).
vfi_gain: VFI gain applied to the constraint; the violation depth
is recovered as ``sqrt(-signed_error / vfi_gain)``.
| dict[str, bool] normalize_verbose | ( | Verbose | verbose | ) |
Normalize a ``verbose`` setting into a per-category flag mapping.
Args:
verbose: ``True`` enables every category, ``False`` disables all of
them, and a mapping selects individual categories.
Returns:
A mapping with one boolean entry per
:data:`CONSTRAINT_CATEGORIES` category.
Raises:
ValueError: If the mapping contains an unknown category name.
TypeError: If ``verbose`` is neither a bool nor a mapping.
| tuple core.papers.icra2019._debug.CONSTRAINT_CATEGORIES |