Python Example: Custom Logging - mjansen4857/pathplanner GitHub Wiki
PathPlannerLib provides the ability to set custom logging callbacks that will be called when the built in path following commands are running. You can set these callbacks through the PathPlannerLogging
class.
from pathplannerlib.logging import PathPlannerLogging
# Logging callback for current robot pose
PathPlannerLogging.setLogCurrentPoseCallback(lambda pose: print(pose))
# Logging callback for target robot pose
PathPlannerLogging.setLogTargetPoseCallback(lambda pose: print(pose))
# Logging callback for the active path, this is sent as a list of poses
PathPlannerLogging.setLogActivePathCallback(lambda poses: print(poses))