Package com.pathplanner.lib.util
Class PathPlannerLogging
java.lang.Object
com.pathplanner.lib.util.PathPlannerLogging
Utility class for handling custom logging callbacks
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidDisables all logging callbacks registered by this class.static voidlogActivePath(PathPlannerPath path) Log the active path.static voidlogCurrentPose(Pose2d pose) Log the current robot pose.static voidlogTargetPose(Pose2d targetPose) Log the target robot pose.static voidsetLogActivePathCallback(Consumer<List<Pose2d>> logActivePath) Set the logging callback for the active pathstatic voidsetLogCurrentPoseCallback(Consumer<Pose2d> logCurrentPose) Set the logging callback for the current robot posestatic voidsetLogTargetPoseCallback(Consumer<Pose2d> logTargetPose) Set the logging callback for the target robot pose
-
Constructor Details
-
PathPlannerLogging
public PathPlannerLogging()
-
-
Method Details
-
setLogCurrentPoseCallback
Set the logging callback for the current robot pose- Parameters:
logCurrentPose- Consumer that accepts the current robot pose. Can be null to disable logging this value.
-
setLogTargetPoseCallback
Set the logging callback for the target robot pose- Parameters:
logTargetPose- Consumer that accepts the target robot pose. Can be null to disable logging this value.
-
setLogActivePathCallback
Set the logging callback for the active path- Parameters:
logActivePath- Consumer that accepts the active path as a list of poses. Can be null to disable logging this value.
-
clearLoggingCallbacks
public static void clearLoggingCallbacks()Disables all logging callbacks registered by this class. -
logCurrentPose
Log the current robot pose. This is used internally.- Parameters:
pose- The current robot pose
-
logTargetPose
Log the target robot pose. This is used internally.- Parameters:
targetPose- The target robot pose
-
logActivePath
Log the active path. This is used internally.- Parameters:
path- The active path
-