31 lines
794 B
Python
31 lines
794 B
Python
"""Utility functions and constants."""
|
|
from .common import (
|
|
gen_crc, float_to_hex, hex_to_float,
|
|
tau_to_hex, hex_to_tau,
|
|
kp_to_hex, hex_to_kp,
|
|
kd_to_hex, hex_to_kd,
|
|
decode_sn, decode_version,
|
|
)
|
|
from .constants import (
|
|
MCU_IP, MCU_PORT,
|
|
JOINT_NAMES, JOINT_TYPE, JOINT_ATTR,
|
|
JOINT_LIMITS, JOINT_LIMITS_MEASURED,
|
|
TAU_MAX, KT, CRITICAL_FACTOR,
|
|
DAMPING_POSE,
|
|
)
|
|
|
|
__all__ = [
|
|
# common
|
|
'gen_crc', 'float_to_hex', 'hex_to_float',
|
|
'tau_to_hex', 'hex_to_tau',
|
|
'kp_to_hex', 'hex_to_kp',
|
|
'kd_to_hex', 'hex_to_kd',
|
|
'decode_sn', 'decode_version',
|
|
# constants
|
|
'MCU_IP', 'MCU_PORT',
|
|
'JOINT_NAMES', 'JOINT_TYPE', 'JOINT_ATTR',
|
|
'JOINT_LIMITS', 'JOINT_LIMITS_MEASURED',
|
|
'TAU_MAX', 'KT', 'CRITICAL_FACTOR',
|
|
'DAMPING_POSE',
|
|
]
|