Package com.pathplanner.lib.util
Class PathPlannerLogging
java.lang.Object
com.pathplanner.lib.util.PathPlannerLogging
Utility class for handling custom logging callbacks
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
logActivePath
(PathPlannerPath path) Log the active path.static void
logCurrentPose
(Pose2d pose) Log the current robot pose.static void
logTargetPose
(Pose2d targetPose) Log the target robot pose.static void
setLogActivePathCallback
(Consumer<List<Pose2d>> logActivePath) Set the logging callback for the active pathstatic void
setLogCurrentPoseCallback
(Consumer<Pose2d> logCurrentPose) Set the logging callback for the current robot posestatic void
setLogTargetPoseCallback
(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.
-
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
-