diff --git a/drivetrain/poseEstimation/drivetrainPoseTelemetry.py b/drivetrain/poseEstimation/drivetrainPoseTelemetry.py index 560490b..44483d5 100644 --- a/drivetrain/poseEstimation/drivetrainPoseTelemetry.py +++ b/drivetrain/poseEstimation/drivetrainPoseTelemetry.py @@ -1,12 +1,10 @@ import math import wpilib -from wpimath.units import metersToFeet from wpimath.trajectory import Trajectory from wpimath.geometry import Pose2d, Pose3d, Transform2d, Rotation2d, Translation2d from ntcore import NetworkTableInstance -from utils.signalLogging import addLog from utils.allianceTransformUtils import transform from drivetrain.drivetrainPhysical import ROBOT_TO_FRONT_CAM, ROBOT_TO_LEFT_CAM, ROBOT_TO_RIGHT_CAM, robotToModuleTranslations from wrappers.wrapperedPoseEstPhotonCamera import CameraPoseObservation diff --git a/robot.py b/robot.py index e82f440..6cd4489 100644 --- a/robot.py +++ b/robot.py @@ -1,8 +1,4 @@ -import math -import random import sys -import cProfile, pstats -from line_profiler import LineProfiler import wpilib from dashboard import Dashboard from drivetrain.controlStrategies.autoDrive import AutoDrive @@ -13,8 +9,7 @@ from humanInterface.ledControl import LEDControl from navigation.forceGenerators import PointObstacle from utils.segmentTimeTracker import SegmentTimeTracker -from utils.signalLogging import addLog, addLog, update -import utils.signalLogging +from utils.signalLogging import logUpdate from utils.calibration import CalibrationWrangler from utils.faults import FaultWrangler from utils.crashLogger import CrashLogger @@ -84,7 +79,7 @@ def robotPeriodic(self): self.ledCtrl.update() self.stt.mark("LED Ctrl") - update() + logUpdate() self.stt.end() ######################################################### diff --git a/utils/signalLogging.py b/utils/signalLogging.py index 635af3c..7968349 100644 --- a/utils/signalLogging.py +++ b/utils/signalLogging.py @@ -5,7 +5,6 @@ import wpiutil.log as wpilog # pylint: disable=import-error,no-name-in-module from utils.extDriveManager import ExtDriveManager from utils.singleton import Singleton -from collections import defaultdict BASE_TABLE = "SmartDashboard" @@ -76,7 +75,7 @@ def newLogVal(self, name:str, valGetter:Callable[[],float], units:str|None): _singletonInst = SignalWrangler() # cache a reference # Log a new named value -def update(): +def logUpdate(): _singletonInst.update() def addLog(alias: str, value_getter: Callable[[], float], units=None) -> None: